atg.commerce.search.refinement.admin
Class CustomRefinementConfigurationCollector

java.lang.Object
  extended by atg.commerce.search.refinement.admin.RefinementConfigurationCollector
      extended by atg.commerce.search.refinement.admin.CommerceRefinementConfigurationCollector
          extended by atg.commerce.search.refinement.admin.CustomRefinementConfigurationCollector

public class CustomRefinementConfigurationCollector
extends CommerceRefinementConfigurationCollector

Extension of CommerceRefinementConfigurationCollector that can process custom catalogs.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
protected  RepositoryItem mCurrentCatalog
           
protected  java.util.Set mCurrentCatalogElements
           
 
Fields inherited from class atg.commerce.search.refinement.admin.CommerceRefinementConfigurationCollector
REPOSITORY_NOT_MUTABLE_MSG
 
Fields inherited from class atg.commerce.search.refinement.admin.RefinementConfigurationCollector
mConfigurationToElements, mElementSourceMap, mElementsToConfigurations, mExistingNameMap
 
Constructor Summary
CustomRefinementConfigurationCollector()
           
 
Method Summary
protected  void addAdditionalElements(RepositoryItem pRefineConfig, java.util.Set pElements)
           
protected  java.util.Set getAllRootCategoriesForCatalog(RepositoryItem pCatalog, java.util.Set pVisited, java.util.Set pSeedCategories)
          Gets the root categories for the catalog, and all of its subcatalogs.
 java.lang.String getCatalogChildCatalogsPropertyName()
          Gets the property name of a catalog that designates its child catalogs.
 java.lang.String getCatalogRefineConfigPropertyName()
          Gets the catalog property name that contains the refinement configuration item.
 Repository getCatalogRepository()
          Gets the catalog repository.
 java.lang.String getCatalogRootCategoriesPropertyName()
          Gets the name of the root categories property of the catalog item.
 java.lang.String getCategoryChildCatalogsPropertyName()
          Gets the property name of a category that designated its child catalogs.
 java.lang.String getCategoryInfoCatalogPropertyName()
          Gets the name of the category-info catalog property.
 java.lang.String getCategoryInfoCategoryItemPropertyName()
          Gets the name of the category-info category item property.
 java.lang.String getCategoryInfoItemDescriptorName()
          Gets the name of the category info item descriptor.
 java.lang.String getCategoryInfoRefineConfigPropertyName()
          Gets the name of the category-info refine config property.
 RepositoryItem getCurrentRootCatalog()
          get CurrentRootCatalog
 CustomCatalogTools getCustomCatalogTools()
          Gets the custom catalog tools component.
 CustomRefinementConfigurationPropertyManager getCustomRefinementConfigurationPropertyManager()
           
protected  RefinementConfigurationContainer getRefineConfigContainerForCategory(RepositoryItem pCategory, RepositoryItem pParentRefineConfig, java.util.Set pPath)
          Use the "current category" field to look up, via the catalog info items, the proper refinement configuration.
protected  RefinementConfigurationContainer getRefineConfigForCatalog(RepositoryItem pCatalog, RepositoryItem pParentRefineConfig, java.util.Set pPath)
          Gets the refinement configuration container for the give catalog item.
protected  void processCatalog(RepositoryItem pCatalog, java.util.Collection pParentCatalogElementIds, java.util.Set pPath, RepositoryItem pParentRefineConfig)
          Process a catalog item, recursing into subcatalogs and root categories as necessary.
protected  void processCatalog(RepositoryItem pCatalog, java.util.Collection pParentCatalogElementIds, java.util.Set pPath, RepositoryItem pParentRefineConfig, java.lang.String pPrefix)
          Process a catalog item, recursing into subcatalogs and root categories as necessary.
protected  void processCategoryChildren(RepositoryItem pCategory, java.util.Set pParentAndLocalREs, java.util.Set pPath, java.lang.String pPrefix)
          Process child categories, then child catalogs.
 void setCatalogChildCatalogsPropertyName(java.lang.String pCatalogChildCatalogsPropertyName)
          Sets the property name of a catalog that designates its child catalogs.
 void setCatalogRefineConfigPropertyName(java.lang.String pCatalogRefineConfigPropertyName)
          Sets the catalog property name that contains the refinement configuration item.
 void setCatalogRootCategoriesPropertyName(java.lang.String pCatalogRootCategoriesPropertyName)
          Sets the name of the root categories property of the catalog item.
 void setCategoryChildCatalogsPropertyName(java.lang.String pCategoryChildCatalogsPropertyName)
          Sets the property name of a category that designated its child catalogs.
 void setCategoryInfoCatalogPropertyName(java.lang.String pCategoryInfoCatalogPropertyName)
          Sets the name of the category-info catalog property.
 void setCategoryInfoCategoryItemPropertyName(java.lang.String pCategoryInfoCategoryItemPropertyName)
          Sets the name of the category-info category item property.
 void setCategoryInfoItemDescriptorName(java.lang.String pCategoryInfoItemDescriptorName)
          Sets the name of the category info item descriptor.
 void setCategoryInfoRefineConfigPropertyName(java.lang.String pCategoryInfoRefineConfigPropertyName)
          Sets the name of the category-info refine config property.
 void setCurrentRootCatalog(RepositoryItem pCurrentRootCatalog)
          set CurrentRootCatalog
 void setCustomCatalogTools(CustomCatalogTools pCustomCatalogTools)
          Sets the custom catalog tools component.
protected  void updateInheritFlags(RefinementConfigurationContainer pContainer, RepositoryItem pRefineConfig, RepositoryItem pParentRefineConfig)
          Handles updates to the inheritance flags.
 
Methods inherited from class atg.commerce.search.refinement.admin.CommerceRefinementConfigurationCollector
canInheritParentFacetInheritanceFlags, createOrUpdateCategoryRefineConfig, hasLocalRefineElements, processCategory, processCategory, resolveInheritValues
 
Methods inherited from class atg.commerce.search.refinement.admin.RefinementConfigurationCollector
addToElementSources, addToMap, getCategoryChildCategoriesPropertyName, getCategoryRefineConfigPropertyName, getCommerceRefinementConfigurationPropertyManager, getConfigurationsForElements, getConfigurationsToElements, getElementsForConfiguration, getElementSourceMap, getElementsToConfigurations, getExistingNameMap, getGlobalMappingValue, getGlobalRefinementConfiguration, getGlobalRefinementConfigurationQuery, getGlobalRefinementElements, getLog, getPropagateFacetInheritanceFlagsValues, itemsToIds, processGlobal, resetMaps, setCategoryChildCategoriesPropertyName, setCategoryRefineConfigPropertyName, setCommerceRefinementConfigurationPropertyManager, setGlobalMappingValue, setLog, setPropagateFacetInheritanceFlagsValues
 
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


mCurrentCatalog

protected RepositoryItem mCurrentCatalog

mCurrentCatalogElements

protected java.util.Set mCurrentCatalogElements
Constructor Detail

CustomRefinementConfigurationCollector

public CustomRefinementConfigurationCollector()
Method Detail

getCatalogRefineConfigPropertyName

public java.lang.String getCatalogRefineConfigPropertyName()
Gets the catalog property name that contains the refinement configuration item.


setCatalogRefineConfigPropertyName

public void setCatalogRefineConfigPropertyName(java.lang.String pCatalogRefineConfigPropertyName)
Sets the catalog property name that contains the refinement configuration item.


getCatalogChildCatalogsPropertyName

public java.lang.String getCatalogChildCatalogsPropertyName()
Gets the property name of a catalog that designates its child catalogs.


setCatalogChildCatalogsPropertyName

public void setCatalogChildCatalogsPropertyName(java.lang.String pCatalogChildCatalogsPropertyName)
Sets the property name of a catalog that designates its child catalogs.


getCategoryChildCatalogsPropertyName

public java.lang.String getCategoryChildCatalogsPropertyName()
Gets the property name of a category that designated its child catalogs.


setCategoryChildCatalogsPropertyName

public void setCategoryChildCatalogsPropertyName(java.lang.String pCategoryChildCatalogsPropertyName)
Sets the property name of a category that designated its child catalogs.


getCustomCatalogTools

public CustomCatalogTools getCustomCatalogTools()
Gets the custom catalog tools component.


setCustomCatalogTools

public void setCustomCatalogTools(CustomCatalogTools pCustomCatalogTools)
Sets the custom catalog tools component.


getCatalogRepository

public Repository getCatalogRepository()
Gets the catalog repository.


getCatalogRootCategoriesPropertyName

public java.lang.String getCatalogRootCategoriesPropertyName()
Gets the name of the root categories property of the catalog item.


setCatalogRootCategoriesPropertyName

public void setCatalogRootCategoriesPropertyName(java.lang.String pCatalogRootCategoriesPropertyName)
Sets the name of the root categories property of the catalog item.


getCategoryInfoItemDescriptorName

public java.lang.String getCategoryInfoItemDescriptorName()
Gets the name of the category info item descriptor.


setCategoryInfoItemDescriptorName

public void setCategoryInfoItemDescriptorName(java.lang.String pCategoryInfoItemDescriptorName)
Sets the name of the category info item descriptor.


getCategoryInfoCatalogPropertyName

public java.lang.String getCategoryInfoCatalogPropertyName()
Gets the name of the category-info catalog property.


setCategoryInfoCatalogPropertyName

public void setCategoryInfoCatalogPropertyName(java.lang.String pCategoryInfoCatalogPropertyName)
Sets the name of the category-info catalog property.


getCategoryInfoCategoryItemPropertyName

public java.lang.String getCategoryInfoCategoryItemPropertyName()
Gets the name of the category-info category item property.


setCategoryInfoCategoryItemPropertyName

public void setCategoryInfoCategoryItemPropertyName(java.lang.String pCategoryInfoCategoryItemPropertyName)
Sets the name of the category-info category item property.


getCategoryInfoRefineConfigPropertyName

public java.lang.String getCategoryInfoRefineConfigPropertyName()
Gets the name of the category-info refine config property.


setCategoryInfoRefineConfigPropertyName

public void setCategoryInfoRefineConfigPropertyName(java.lang.String pCategoryInfoRefineConfigPropertyName)
Sets the name of the category-info refine config property.


getCustomRefinementConfigurationPropertyManager

public CustomRefinementConfigurationPropertyManager getCustomRefinementConfigurationPropertyManager()

setCurrentRootCatalog

public void setCurrentRootCatalog(RepositoryItem pCurrentRootCatalog)
set CurrentRootCatalog

Parameters:
pCurrentRootCatalog - the CurrentRootCatalog

getCurrentRootCatalog

public RepositoryItem getCurrentRootCatalog()
get CurrentRootCatalog

Returns:
the CurrentRootCatalog

getRefineConfigForCatalog

protected RefinementConfigurationContainer getRefineConfigForCatalog(RepositoryItem pCatalog,
                                                                     RepositoryItem pParentRefineConfig,
                                                                     java.util.Set pPath)
                                                              throws RepositoryException
Gets the refinement configuration container for the give catalog item.

Throws:
RepositoryException

processCatalog

protected void processCatalog(RepositoryItem pCatalog,
                              java.util.Collection pParentCatalogElementIds,
                              java.util.Set pPath,
                              RepositoryItem pParentRefineConfig)
                       throws RepositoryException
Process a catalog item, recursing into subcatalogs and root categories as necessary.

Throws:
RepositoryException

processCatalog

protected void processCatalog(RepositoryItem pCatalog,
                              java.util.Collection pParentCatalogElementIds,
                              java.util.Set pPath,
                              RepositoryItem pParentRefineConfig,
                              java.lang.String pPrefix)
                       throws RepositoryException
Process a catalog item, recursing into subcatalogs and root categories as necessary.

Throws:
RepositoryException

getRefineConfigContainerForCategory

protected RefinementConfigurationContainer getRefineConfigContainerForCategory(RepositoryItem pCategory,
                                                                               RepositoryItem pParentRefineConfig,
                                                                               java.util.Set pPath)
                                                                        throws RepositoryException
Use the "current category" field to look up, via the catalog info items, the proper refinement configuration. If there is no catalog-info refine-config for this catalog-category then we need to create one using the category refine-config.

Overrides:
getRefineConfigContainerForCategory in class CommerceRefinementConfigurationCollector
Returns:
Throws:
RepositoryException

getAllRootCategoriesForCatalog

protected java.util.Set getAllRootCategoriesForCatalog(RepositoryItem pCatalog,
                                                       java.util.Set pVisited,
                                                       java.util.Set pSeedCategories)
                                                throws RepositoryException
Gets the root categories for the catalog, and all of its subcatalogs. This method can be called with pVisitied and pSeedCategories as null- they will be created if necessary.

Throws:
RepositoryException

processCategoryChildren

protected void processCategoryChildren(RepositoryItem pCategory,
                                       java.util.Set pParentAndLocalREs,
                                       java.util.Set pPath,
                                       java.lang.String pPrefix)
                                throws RepositoryException
Process child categories, then child catalogs.

Overrides:
processCategoryChildren in class CommerceRefinementConfigurationCollector
Throws:
RepositoryException

addAdditionalElements

protected void addAdditionalElements(RepositoryItem pRefineConfig,
                                     java.util.Set pElements)
Overrides:
addAdditionalElements in class CommerceRefinementConfigurationCollector

updateInheritFlags

protected void updateInheritFlags(RefinementConfigurationContainer pContainer,
                                  RepositoryItem pRefineConfig,
                                  RepositoryItem pParentRefineConfig)
                           throws RepositoryException
Handles updates to the inheritance flags.

Overrides:
updateInheritFlags in class CommerceRefinementConfigurationCollector
Parameters:
pContainer - The refine config container.
pRefineConfig - The refine config to be updated
pParentRefineConfig - The parent refine config to retrieve inheritance values from.
Throws:
RepositoryException