atg.commerce.search.refinement.admin
Class CustomRefinementConfigurationGenerator

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.commerce.search.refinement.admin.RefinementConfigurationGenerator
              extended by atg.commerce.search.refinement.admin.CustomRefinementConfigurationGenerator
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

public class CustomRefinementConfigurationGenerator
extends RefinementConfigurationGenerator

Refinement configuration generator for custom catalogs.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
protected  CustomCatalogTools mCustomCatalogTools
           
 
Fields inherited from class atg.commerce.search.refinement.admin.RefinementConfigurationGenerator
mCommerceRefinementConfigurationPropertyManager, mFacetSourceGenerator, mIdGenerator, mIdSpace, mRefinementElementPropertyManager, mRefinementRepository, mTransactionManager
 
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
CustomRefinementConfigurationGenerator()
           
 
Method Summary
 RefinementConfigurationCollector collect()
          Run the custom catalog refinement configuration collector, and generate the refinement configuration XML files necessary to support each category and catalog.
 RefinementConfigurationCollector collect(boolean pUpdateRepositories, Repository pProductCatalogRepository, Repository pRefinementRepository, atg.commerce.search.refinement.admin.RefinementGenerationDeploymentHelper pRefinementGenerationDeploymentHelper)
          Run the custom catalog refinement configuration collector, and generate the refinement configuration XML files necessary to support each category and catalog.
 RefinementConfigurationCollector collect(atg.search.index.IndexInfo pIndexInfo)
          Convenience method to call generate with a null XML handler, which tells it to update the refinement configuration generated refinement elements, but not create the XML.
protected  boolean doCollect(CustomRefinementConfigurationCollector pCollector, atg.search.index.IndexInfo pIndexInfo)
          Does the actual business of refinement collection.
 void generate(RefinementConfigurationCollector pCollector, RefinementConfigurationXMLHandler pHandler)
          Generate the refinement configurations.
 Repository getCatalogRepository()
          Gets the catalog repository
 RepositoryItem[] getCatalogs()
          Get the catalogs that will be used to generate refinement configurations.
protected  RepositoryItem[] getCatalogs(atg.search.index.IndexInfo pIndexInfo)
          Get the catalogs that will be used to generate refinement configurations.
 RepositoryItem[] getCatalogs(Repository pProductCatalogRepository)
           
protected  RepositoryItem[] getCatalogs(Repository pProductCatalogRepository, atg.search.index.IndexInfo pIndexInfo)
           
protected  atg.repository.ContextFilteringRule[] getContextFilteringRulesForSites(java.util.Collection<java.lang.String> pSites)
          Gets a array of ContextFilteringRules for an array of site ids.
 CustomCatalogTools getCustomCatalogTools()
          Gets the custom catalog tools component.
 void setCustomCatalogTools(CustomCatalogTools pCustomCatalogTools)
          Sets the custom catalog tools component.
 
Methods inherited from class atg.commerce.search.refinement.admin.RefinementConfigurationGenerator
createCollector, createCollector, generateXMLsAndSubmitToEngine, getCollectorFactory, getCommerceRefinementConfigurationPropertyManager, getFacetSourceGenerator, getIdGenerator, getIdSpace, getRefineConfigXMLGenerator, getRefinementElementItemDescriptorName, getRefinementElementPropertyManager, getRefinementRepository, getRepositoryItemPropertyValueVariations, getTransactionManager, setCollectorFactory, setCommerceRefinementConfigurationPropertyManager, setFacetSourceGenerator, setIdGenerator, setIdSpace, setRefineConfigXMLGenerator, setRefinementElementPropertyManager, setTransactionManager, updateCollectedRefineConfigs, updateRepositoryItem, valueMatchesItemPropertyValue
 
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


mCustomCatalogTools

protected CustomCatalogTools mCustomCatalogTools
Constructor Detail

CustomRefinementConfigurationGenerator

public CustomRefinementConfigurationGenerator()
Method Detail

setCustomCatalogTools

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


getCustomCatalogTools

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


getCatalogRepository

public Repository getCatalogRepository()
Gets the catalog repository


getCatalogs

public RepositoryItem[] getCatalogs()
                             throws RepositoryException
Get the catalogs that will be used to generate refinement configurations. The default implementation returns all catalogs in the repository. For efficiency, subclasses can override this method to limit the catalogs that are used for faceting- typically, this would include only those catalogs that are "assignable" to users.

Throws:
RepositoryException

getCatalogs

public RepositoryItem[] getCatalogs(Repository pProductCatalogRepository)
                             throws RepositoryException
Throws:
RepositoryException

getCatalogs

protected RepositoryItem[] getCatalogs(atg.search.index.IndexInfo pIndexInfo)
                                throws RepositoryException
Get the catalogs that will be used to generate refinement configurations.

Parameters:
pIndexInfo -
Returns:
catalogs - catalogs relevant to the current indexing operation
Throws:
RepositoryException

getCatalogs

protected RepositoryItem[] getCatalogs(Repository pProductCatalogRepository,
                                       atg.search.index.IndexInfo pIndexInfo)
                                throws RepositoryException
Throws:
RepositoryException

getContextFilteringRulesForSites

protected atg.repository.ContextFilteringRule[] getContextFilteringRulesForSites(java.util.Collection<java.lang.String> pSites)
Gets a array of ContextFilteringRules for an array of site ids.

Parameters:
pSites - The array of site ids
Returns:
The array of ContextFilteringRules for the given site ids.

collect

public RefinementConfigurationCollector collect()
Run the custom catalog refinement configuration collector, and generate the refinement configuration XML files necessary to support each category and catalog.

Specified by:
collect in class RefinementConfigurationGenerator

collect

public RefinementConfigurationCollector collect(atg.search.index.IndexInfo pIndexInfo)
Description copied from class: RefinementConfigurationGenerator
Convenience method to call generate with a null XML handler, which tells it to update the refinement configuration generated refinement elements, but not create the XML.

Specified by:
collect in class RefinementConfigurationGenerator

collect

public RefinementConfigurationCollector collect(boolean pUpdateRepositories,
                                                Repository pProductCatalogRepository,
                                                Repository pRefinementRepository,
                                                atg.commerce.search.refinement.admin.RefinementGenerationDeploymentHelper pRefinementGenerationDeploymentHelper)
Run the custom catalog refinement configuration collector, and generate the refinement configuration XML files necessary to support each category and catalog.

Parameters:
pShadowRepositoryHelper -

doCollect

protected boolean doCollect(CustomRefinementConfigurationCollector pCollector,
                            atg.search.index.IndexInfo pIndexInfo)
Does the actual business of refinement collection. The operation is performed within a transaction and the method swallows any exceptions. The outcome of the collection is passed back to the caller in the return value.

Parameters:
pCollector - - fully initialized CustomRefinementConfigurationCollector
pIndexInfo - - IndexInfo encapsulating the sites relevant to this indexing operation
Returns:
- true if refinement collection completes successfully; otherwise false

generate

public void generate(RefinementConfigurationCollector pCollector,
                     RefinementConfigurationXMLHandler pHandler)
Description copied from class: RefinementConfigurationGenerator
Generate the refinement configurations.

Specified by:
generate in class RefinementConfigurationGenerator