atg.repository.search.refinement
Class FacetTrailTools
java.lang.Object
atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.repository.search.refinement.FacetTrailTools
- All Implemented Interfaces:
- atg.naming.AbsoluteNameable, NameContextBindingListener, NameContextElement, atg.naming.NameContextParentable, NameResolver, AdminableService, atg.nucleus.Configured, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, java.util.EventListener
- Direct Known Subclasses:
- CommerceFacetTrailTools
public class FacetTrailTools
- extends GenericService
Field Summary |
static java.lang.String |
CLASS_VERSION
Class version string |
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
DEFAULT_LOG_TRACE_STATUS |
Constructor Summary |
FacetTrailTools()
Constructs an instanceof FacetTrailTools |
Method Summary |
FacetTrail |
createFacetTrail(FacetTrailTools.FacetTrailElements pFacetTrailElements,
RefinementConfiguration pRefinementConfiguration)
|
java.lang.String |
getAddFacetParameterName()
|
java.lang.String |
getAndValueIndicatorSeparator()
|
atg.repository.search.refinement.Facet |
getFacet(java.lang.String pFacetString)
|
FacetManager |
getFacetManager()
|
FacetTrailTools.FacetTrailElements |
getFacetTrailElements(java.lang.String pTrail,
java.lang.String pSortBy,
java.lang.String pAddFacet,
java.lang.String pRemoveFacet,
java.lang.String pRemoveAllFacets,
java.lang.String pRemoveFacetType)
|
java.lang.String |
getFacetTrailSeparator()
|
FacetValue |
getFacetValue(atg.repository.search.refinement.Facet pFacet,
java.lang.String pFacetValueString)
|
java.lang.String |
getLastRangeValueIndicator()
|
java.lang.String |
getOrValueIndicatorSeparator()
|
protected RefinementConfiguration |
getRefinementConfiguration(RepositoryItem pItem)
Uses the facet manager to get the refine config property manager service which
can populate a RefinementConfiguration object from a repository item. |
java.lang.String |
getRemoveAllFacetsParameterName()
|
java.lang.String |
getRemoveFacetParameterName()
|
java.lang.String |
getRemoveFacetTypeParameterName()
|
java.lang.String |
getSortByParameterName()
|
java.lang.String |
getTrailParameterName()
|
java.util.ArrayList |
parseFacetValueString(java.lang.String pFacetValueString,
java.lang.String pRemoveFacetType)
Method to parse a facet:facet value paired string into FacetValue objects. |
java.util.ArrayList<FacetValue> |
parseTrailStringIntoPairs(java.lang.String pTrailString)
Parses a facet trail string 'facet1Id:value1|value2|..|valuen:facet2Id:etc.' into a list of
strings 'facetId:value'. |
void |
processAddFacet(java.util.ArrayList pFacetValueList,
java.lang.String pAddFacet)
|
void |
processAddMultipleFacets(java.util.ArrayList<FacetValue> pFacetValueList,
java.util.List<java.lang.String> pAddFacetList)
Allows multiple 'facet:facet value' string pairs to be added to the trail. |
void |
processRemoveFacet(java.util.ArrayList pFacetValueList,
java.lang.String pRemoveFacet)
|
void |
removeFacetValue(java.util.ArrayList pFacetValueList,
FacetValue pValue)
|
void |
setAddFacetParameterName(java.lang.String pAddFacetParameterName)
|
void |
setAndValueIndicatorSeparator(java.lang.String pValueIndicatorSeparator)
|
void |
setFacetManager(FacetManager pFacetManager)
|
void |
setFacetTrailSeparator(java.lang.String pFacetTrailSeparator)
|
void |
setLastRangeValueIndicator(java.lang.String pLastRangeValueIndicator)
|
void |
setOrValueIndicatorSeparator(java.lang.String pValueIndicatorSeparator)
|
void |
setRemoveAllFacetsParameterName(java.lang.String pRemoveAllFacetsParameterName)
|
void |
setRemoveFacetParameterName(java.lang.String pRemoveFacetParameterName)
|
void |
setRemoveFacetTypeParameterName(java.lang.String pRemoveFacetTypeParameterName)
|
void |
setSortByParameterName(java.lang.String pSortByParameterName)
|
void |
setTrailParameterName(java.lang.String pTrailParameterName)
|
Methods inherited from class atg.nucleus.GenericService |
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CLASS_VERSION
public static java.lang.String CLASS_VERSION
- Class version string
FacetTrailTools
public FacetTrailTools()
- Constructs an instanceof FacetTrailTools
setTrailParameterName
public void setTrailParameterName(java.lang.String pTrailParameterName)
getTrailParameterName
public java.lang.String getTrailParameterName()
setSortByParameterName
public void setSortByParameterName(java.lang.String pSortByParameterName)
getSortByParameterName
public java.lang.String getSortByParameterName()
setAddFacetParameterName
public void setAddFacetParameterName(java.lang.String pAddFacetParameterName)
getAddFacetParameterName
public java.lang.String getAddFacetParameterName()
setRemoveFacetParameterName
public void setRemoveFacetParameterName(java.lang.String pRemoveFacetParameterName)
getRemoveFacetParameterName
public java.lang.String getRemoveFacetParameterName()
setRemoveAllFacetsParameterName
public void setRemoveAllFacetsParameterName(java.lang.String pRemoveAllFacetsParameterName)
getRemoveAllFacetsParameterName
public java.lang.String getRemoveAllFacetsParameterName()
setRemoveFacetTypeParameterName
public void setRemoveFacetTypeParameterName(java.lang.String pRemoveFacetTypeParameterName)
getRemoveFacetTypeParameterName
public java.lang.String getRemoveFacetTypeParameterName()
getFacetTrailSeparator
public java.lang.String getFacetTrailSeparator()
setFacetTrailSeparator
public void setFacetTrailSeparator(java.lang.String pFacetTrailSeparator)
setAndValueIndicatorSeparator
public void setAndValueIndicatorSeparator(java.lang.String pValueIndicatorSeparator)
getAndValueIndicatorSeparator
public java.lang.String getAndValueIndicatorSeparator()
setOrValueIndicatorSeparator
public void setOrValueIndicatorSeparator(java.lang.String pValueIndicatorSeparator)
getOrValueIndicatorSeparator
public java.lang.String getOrValueIndicatorSeparator()
setLastRangeValueIndicator
public void setLastRangeValueIndicator(java.lang.String pLastRangeValueIndicator)
getLastRangeValueIndicator
public java.lang.String getLastRangeValueIndicator()
setFacetManager
public void setFacetManager(FacetManager pFacetManager)
getFacetManager
public FacetManager getFacetManager()
createFacetTrail
public FacetTrail createFacetTrail(FacetTrailTools.FacetTrailElements pFacetTrailElements,
RefinementConfiguration pRefinementConfiguration)
throws atg.repository.search.refinement.FacetException
- Throws:
atg.repository.search.refinement.FacetException
getFacetTrailElements
public FacetTrailTools.FacetTrailElements getFacetTrailElements(java.lang.String pTrail,
java.lang.String pSortBy,
java.lang.String pAddFacet,
java.lang.String pRemoveFacet,
java.lang.String pRemoveAllFacets,
java.lang.String pRemoveFacetType)
throws atg.repository.search.refinement.FacetException
- Throws:
atg.repository.search.refinement.FacetException
parseFacetValueString
public java.util.ArrayList parseFacetValueString(java.lang.String pFacetValueString,
java.lang.String pRemoveFacetType)
- Method to parse a facet:facet value paired string into FacetValue objects.
If a facet corresponds to the passed in disallowed facet then it is ignored.
- Parameters:
pFacetValueString
- String to parse.pRemoveFacetType
- String facet id to ignore or null.
- Returns:
- ArrayList of FacetValue object parsed out
getFacet
public atg.repository.search.refinement.Facet getFacet(java.lang.String pFacetString)
getFacetValue
public FacetValue getFacetValue(atg.repository.search.refinement.Facet pFacet,
java.lang.String pFacetValueString)
processRemoveFacet
public void processRemoveFacet(java.util.ArrayList pFacetValueList,
java.lang.String pRemoveFacet)
removeFacetValue
public void removeFacetValue(java.util.ArrayList pFacetValueList,
FacetValue pValue)
processAddFacet
public void processAddFacet(java.util.ArrayList pFacetValueList,
java.lang.String pAddFacet)
processAddMultipleFacets
public void processAddMultipleFacets(java.util.ArrayList<FacetValue> pFacetValueList,
java.util.List<java.lang.String> pAddFacetList)
- Allows multiple 'facet:facet value' string pairs to be added to the trail.
It adds them to the passed in pFacetValueList which must not be null.
The method assumes that values sharing the same facet should be OR'd on the trail.
- Parameters:
pFacetValueList
- ArrayList for the current FacetValue trail to be added to.pAddFacetList
- List of String 'facet:value' pairs.
parseTrailStringIntoPairs
public java.util.ArrayList<FacetValue> parseTrailStringIntoPairs(java.lang.String pTrailString)
- Parses a facet trail string 'facet1Id:value1|value2|..|valuen:facet2Id:etc.' into a list of
strings 'facetId:value'.
e.g. the string 'facet1:valueA:facet2:valueB:facet3:valueC|valueD' will be returned as a list of string
with 4 entries: 'facet1:valueA', 'facet2:valueB', 'facet3:valueC' and 'facet4:valueD'
- Parameters:
pTrailString
- facet trail String
- Returns:
- ArrayList of FacetValue, one for each distinct facet:value pair
getRefinementConfiguration
protected RefinementConfiguration getRefinementConfiguration(RepositoryItem pItem)
throws atg.repository.search.refinement.FacetException
- Uses the facet manager to get the refine config property manager service which
can populate a RefinementConfiguration object from a repository item.
- Parameters:
A
- refineConfig repository item
- Returns:
- A RefinementConfiguration object
- Throws:
FacetException
- for problems getting a RefinementConfiguration object