atg.commerce.search.refinement.admin
Class RefinementConfigurationCollector

java.lang.Object
  extended by atg.commerce.search.refinement.admin.RefinementConfigurationCollector
Direct Known Subclasses:
CommerceRefinementConfigurationCollector

public abstract class RefinementConfigurationCollector
extends java.lang.Object

Base class for catalog refinement configuration collectors.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
protected  java.util.Map mConfigurationToElements
           
protected  java.util.Map mElementSourceMap
           
protected  java.util.Map mElementsToConfigurations
           
protected  java.util.Map mExistingNameMap
           
 
Constructor Summary
RefinementConfigurationCollector()
           
 
Method Summary
protected  void addToElementSources(java.lang.String pElementId, RepositoryItemDescriptor pItemDescriptor, java.lang.String pSourceItemId)
          Add the element id to the element source map.
 void addToMap(java.util.Set pRefinementElementIds, RefinementConfigurationContainer pRefinementConfigurationContainer)
          If the refinement configuration is already associated with a collection of elements, remove the association, and associate it with the collection of elements that includes the new elements.
 java.lang.String getCategoryChildCategoriesPropertyName()
          Gets the name of the property of the category item descriptor that contains the collection of child categories.
 java.lang.String getCategoryRefineConfigPropertyName()
          Gets the name of the property of the category item descriptor that contains the refineConfig.
 CommerceRefinementConfigurationPropertyManager getCommerceRefinementConfigurationPropertyManager()
          Gets the commerce refinement configuration manager.
 java.util.Set getConfigurationsForElements(java.util.Collection pElements)
          Get the collection of refinement configuration repository item ids whose refinement elements are the given collection of element ids.
 java.util.Map getConfigurationsToElements()
          Gets the map if configuration id to Set of element ids.
 java.util.Set getElementsForConfiguration(RefinementConfigurationContainer pRefinementConfigurationContainer)
          Get the collection of element ids for a given configuration id.
 java.util.Map getElementSourceMap()
          Gets the map of element ids to ElementSource objects.
 java.util.Map getElementsToConfigurations()
          Gets the Map of List of element ids to Set of configuration containers.
 java.util.Map getExistingNameMap()
          Gets the map of element ids to the name of an existing refinement cofiguration with those elements.
 java.lang.String getGlobalMappingValue()
          Gets the mapping value of the global refinement configuration.
 RepositoryItem getGlobalRefinementConfiguration()
          Get the repository item that is considered "global".
protected  Query getGlobalRefinementConfigurationQuery()
          Gets the query that can return the global refinement configuration.
 java.util.Collection getGlobalRefinementElements()
          Get the collection of refinement elements for the global refinement confuguration.
 ApplicationLogging getLog()
          Gets the application logging component that will be used for logging.
 java.lang.Boolean getPropagateFacetInheritanceFlagsValues()
           
 java.util.Collection itemsToIds(java.util.Collection pSource)
          Return a collection of repository item ids for a given collection of repository items.
 void processGlobal()
          Add the global element set to the confiugration maps.
 void resetMaps()
          Reset the elements to configurations map, and the configuration to elements map.
 void setCategoryChildCategoriesPropertyName(java.lang.String pCategoryChildCategoriesPropertyName)
          Sets the name of the property of the category item descriptor that contains the collection of child categories.
 void setCategoryRefineConfigPropertyName(java.lang.String pCategoryRefineConfigPropertyName)
          Sets the name of the property of the category item descriptor that contains the refineConfig.
 void setCommerceRefinementConfigurationPropertyManager(CommerceRefinementConfigurationPropertyManager pManager)
          Sets the commerce refinement configuration manager.
 void setGlobalMappingValue(java.lang.String pGlobalMappingValue)
          Sets the mapping value of the global refinement configuration.
 void setLog(ApplicationLogging pLog)
          Sets the application logging component that will be used for logging.
 void setPropagateFacetInheritanceFlagsValues(java.lang.Boolean propagateFacetInheritanceFlagsValues)
           
 
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


mElementsToConfigurations

protected java.util.Map mElementsToConfigurations

mConfigurationToElements

protected java.util.Map mConfigurationToElements

mElementSourceMap

protected java.util.Map mElementSourceMap

mExistingNameMap

protected java.util.Map mExistingNameMap
Constructor Detail

RefinementConfigurationCollector

public RefinementConfigurationCollector()
Method Detail

getElementsToConfigurations

public java.util.Map getElementsToConfigurations()
Gets the Map of List of element ids to Set of configuration containers.


getConfigurationsToElements

public java.util.Map getConfigurationsToElements()
Gets the map if configuration id to Set of element ids.


getElementSourceMap

public java.util.Map getElementSourceMap()
Gets the map of element ids to ElementSource objects. This tells the UI where a particular element was first encountered.


getExistingNameMap

public java.util.Map getExistingNameMap()
Gets the map of element ids to the name of an existing refinement cofiguration with those elements.


setCommerceRefinementConfigurationPropertyManager

public void setCommerceRefinementConfigurationPropertyManager(CommerceRefinementConfigurationPropertyManager pManager)
Sets the commerce refinement configuration manager.


getCommerceRefinementConfigurationPropertyManager

public CommerceRefinementConfigurationPropertyManager getCommerceRefinementConfigurationPropertyManager()
Gets the commerce refinement configuration manager.


setCategoryRefineConfigPropertyName

public void setCategoryRefineConfigPropertyName(java.lang.String pCategoryRefineConfigPropertyName)
Sets the name of the property of the category item descriptor that contains the refineConfig.


getCategoryRefineConfigPropertyName

public java.lang.String getCategoryRefineConfigPropertyName()
Gets the name of the property of the category item descriptor that contains the refineConfig.


getPropagateFacetInheritanceFlagsValues

public java.lang.Boolean getPropagateFacetInheritanceFlagsValues()

setPropagateFacetInheritanceFlagsValues

public void setPropagateFacetInheritanceFlagsValues(java.lang.Boolean propagateFacetInheritanceFlagsValues)

setCategoryChildCategoriesPropertyName

public void setCategoryChildCategoriesPropertyName(java.lang.String pCategoryChildCategoriesPropertyName)
Sets the name of the property of the category item descriptor that contains the collection of child categories.


getCategoryChildCategoriesPropertyName

public java.lang.String getCategoryChildCategoriesPropertyName()
Gets the name of the property of the category item descriptor that contains the collection of child categories.


setLog

public void setLog(ApplicationLogging pLog)
Sets the application logging component that will be used for logging.


getLog

public ApplicationLogging getLog()
Gets the application logging component that will be used for logging.


setGlobalMappingValue

public void setGlobalMappingValue(java.lang.String pGlobalMappingValue)
Sets the mapping value of the global refinement configuration.


getGlobalMappingValue

public java.lang.String getGlobalMappingValue()
Gets the mapping value of the global refinement configuration.


getGlobalRefinementConfigurationQuery

protected Query getGlobalRefinementConfigurationQuery()
                                               throws RepositoryException
Gets the query that can return the global refinement configuration.

Throws:
RepositoryException

getGlobalRefinementConfiguration

public RepositoryItem getGlobalRefinementConfiguration()
                                                throws RepositoryException
Get the repository item that is considered "global". Issues a warning if more than one is found, adds a new one if none is found.

Throws:
RepositoryException

getGlobalRefinementElements

public java.util.Collection getGlobalRefinementElements()
                                                 throws RepositoryException
Get the collection of refinement elements for the global refinement confuguration.

Throws:
RepositoryException

processGlobal

public void processGlobal()
                   throws RepositoryException
Add the global element set to the confiugration maps.

Throws:
RepositoryException

addToElementSources

protected void addToElementSources(java.lang.String pElementId,
                                   RepositoryItemDescriptor pItemDescriptor,
                                   java.lang.String pSourceItemId)
Add the element id to the element source map.


itemsToIds

public java.util.Collection itemsToIds(java.util.Collection pSource)
Return a collection of repository item ids for a given collection of repository items.


addToMap

public void addToMap(java.util.Set pRefinementElementIds,
                     RefinementConfigurationContainer pRefinementConfigurationContainer)
If the refinement configuration is already associated with a collection of elements, remove the association, and associate it with the collection of elements that includes the new elements.


getConfigurationsForElements

public java.util.Set getConfigurationsForElements(java.util.Collection pElements)
Get the collection of refinement configuration repository item ids whose refinement elements are the given collection of element ids.


getElementsForConfiguration

public java.util.Set getElementsForConfiguration(RefinementConfigurationContainer pRefinementConfigurationContainer)
                                          throws RepositoryException
Get the collection of element ids for a given configuration id.

Throws:
RepositoryException

resetMaps

public void resetMaps()
Reset the elements to configurations map, and the configuration to elements map.