atg.commerce.search.refinement
Class CommerceFacetTrailTools

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.repository.search.refinement.FacetTrailTools
              extended by atg.commerce.search.refinement.CommerceFacetTrailTools
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:
CustomCatalogFacetTrailTools

public class CommerceFacetTrailTools
extends FacetTrailTools


Nested Class Summary
 
Nested classes/interfaces inherited from class atg.repository.search.refinement.FacetTrailTools
FacetTrailTools.FacetTrailElements
 
Field Summary
static java.lang.String CLASS_VERSION
          Class version string
protected  java.lang.String mCategoryRefineConfigPropertyName
           
 
Fields inherited from class atg.nucleus.GenericService
SERVICE_INFO_KEY
 
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging
DEFAULT_LOG_TRACE_STATUS
 
Fields inherited from interface atg.nucleus.logging.ApplicationLogging
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
 
Constructor Summary
CommerceFacetTrailTools()
          Constructs an instanceof CommerceFacetTrailTools
 
Method Summary
 java.lang.String getCategoryRefineConfigPropertyName()
           
 CommerceRefinementConfiguration getCommerceRefinementConfiguration(RepositoryItem pItem)
          Uses the commerce facet manager to get the commerce refine config property manager service which can populate a CommerceRefinementConfiguration object from a repository item.
 FacetValue getFacetValue(atg.repository.search.refinement.Facet pFacet, java.lang.String pFacetValueString)
          Returns the facet value object for the given facet and value string.
 RepositoryItem getRefinementConfigurationItemFromCategory(RepositoryItem pCategory)
          Gets the refinement configuration item from the given category item.
 void removeFacetValue(java.util.ArrayList pFacetValueList, FacetValue pValue)
          Removes a facet value and it's dependants from the list.
 void setCategoryRefineConfigPropertyName(java.lang.String pCategoryRefineConfigPropertyName)
           
 
Methods inherited from class atg.repository.search.refinement.FacetTrailTools
createFacetTrail, getAddFacetParameterName, getAndValueIndicatorSeparator, getFacet, getFacetManager, getFacetTrailElements, getFacetTrailSeparator, getLastRangeValueIndicator, getOrValueIndicatorSeparator, getRefinementConfiguration, getRemoveAllFacetsParameterName, getRemoveFacetParameterName, getRemoveFacetTypeParameterName, getSortByParameterName, getTrailParameterName, parseFacetValueString, parseTrailStringIntoPairs, processAddFacet, processAddMultipleFacets, processRemoveFacet, setAddFacetParameterName, setAndValueIndicatorSeparator, setFacetManager, setFacetTrailSeparator, setLastRangeValueIndicator, setOrValueIndicatorSeparator, setRemoveAllFacetsParameterName, setRemoveFacetParameterName, setRemoveFacetTypeParameterName, setSortByParameterName, setTrailParameterName
 
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
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string


mCategoryRefineConfigPropertyName

protected java.lang.String mCategoryRefineConfigPropertyName
Constructor Detail

CommerceFacetTrailTools

public CommerceFacetTrailTools()
Constructs an instanceof CommerceFacetTrailTools

Method Detail

getCategoryRefineConfigPropertyName

public java.lang.String getCategoryRefineConfigPropertyName()

setCategoryRefineConfigPropertyName

public void setCategoryRefineConfigPropertyName(java.lang.String pCategoryRefineConfigPropertyName)

removeFacetValue

public void removeFacetValue(java.util.ArrayList pFacetValueList,
                             FacetValue pValue)
Removes a facet value and it's dependants from the list. In DCS only Category facet values have dependants. When a category facet value is removed then all sub category facet values need to be removed. Then a final check needs to be made that any facet values on the trail are still allowed based on the categories left.

Overrides:
removeFacetValue in class FacetTrailTools
Parameters:
pFacetValueList - ArrayList of FacetValue objects to update.
pValue - FacetValue object to remove and all it's dependants

getFacetValue

public FacetValue getFacetValue(atg.repository.search.refinement.Facet pFacet,
                                java.lang.String pFacetValueString)
Returns the facet value object for the given facet and value string.

Overrides:
getFacetValue in class FacetTrailTools
Parameters:
pFacet - Facet for the facet value
pFacetValueString - String value
Returns:
FacetValue object

getCommerceRefinementConfiguration

public CommerceRefinementConfiguration getCommerceRefinementConfiguration(RepositoryItem pItem)
                                                                   throws atg.repository.search.refinement.FacetException
Uses the commerce facet manager to get the commerce refine config property manager service which can populate a CommerceRefinementConfiguration object from a repository item.

Parameters:
A - refineConfig repository item
Returns:
A CommerceRefinementConfiguration object
Throws:
atg.repository.search.refinement.FacetException - for problems getting a CommerceRefinementConfiguration object

getRefinementConfigurationItemFromCategory

public RepositoryItem getRefinementConfigurationItemFromCategory(RepositoryItem pCategory)
Gets the refinement configuration item from the given category item.