atg.commerce.search.refinement.admin
Class RefineConfigAdapter

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.search.adapter.customization.CustomizationDataAdapterImpl
              extended by atg.commerce.search.refinement.admin.RefineConfigAdapter
All Implemented Interfaces:
NameContextBindingListener, NameContextElement, NameResolver, AdminableService, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, atg.search.adapter.customization.CustomizationDataAdapter, java.util.EventListener

public class RefineConfigAdapter
extends atg.search.adapter.customization.CustomizationDataAdapterImpl

Search customization adapter for commerce refinements. Called by a search admin indexing job to provide refine-config xml for the catalog facets.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
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
RefineConfigAdapter()
          Constructs an instanceof RefineConfigAdapter
 
Method Summary
 void doStartService()
          start the service, verify that required properties are set
 java.util.List enumerateAutoApplyCustomizationItemsByTypeAndProject(atg.search.adapter.customization.CustomizationType pCustomizationType, java.lang.String pProjectId)
          This method will enumerate all refineConfig items that are to be auto-applied.
 java.util.List enumerateCustomizationItems()
          return list of refine config ids
 java.util.List enumerateCustomizationItemsByType(atg.search.adapter.customization.CustomizationType pCustomizationType)
          If the pCustomizationType parameter matches CustomizationType.REFINEMENT_CONFIGURATION, then this will return the same List of refine config ids as the enumerateCustomizationItems() method above.
 atg.search.adapter.customization.CustomizationItem getCustomizationItem(atg.search.adapter.customization.CustomizationType pCustomizationType, java.lang.String pCustomizationItemId)
          Checks the pCustomizationType parameter.
 java.lang.String getDisplayName()
          get DisplayName
 RefinementConfigurationGenerator getRefinementConfigurationGenerator()
          get RefinementConfigurationGenerator
 java.util.Collection getSupportedCustomizationTypes()
          get a list of supported customization types
 boolean isAutoApplyAll()
          auto apply all should always be true
 void setDisplayName(java.lang.String pDisplayName)
          set DisplayName
 void setRefinementConfigurationGenerator(RefinementConfigurationGenerator pRefinementConfigurationGenerator)
          set RefinementConfigurationGenerator
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStopService, getAbsoluteName, getAdminServlet, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, 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
 
Methods inherited from interface atg.naming.NameContextElement
getName, getNameContext
 
Methods inherited from interface atg.naming.NameContextBindingListener
nameContextElementBound, nameContextElementUnbound
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string

Constructor Detail

RefineConfigAdapter

public RefineConfigAdapter()
Constructs an instanceof RefineConfigAdapter

Method Detail

setDisplayName

public void setDisplayName(java.lang.String pDisplayName)
set DisplayName

Parameters:
pDisplayName - the DisplayName

getDisplayName

public java.lang.String getDisplayName()
get DisplayName

Specified by:
getDisplayName in interface atg.search.adapter.customization.CustomizationDataAdapter
Specified by:
getDisplayName in class atg.search.adapter.customization.CustomizationDataAdapterImpl
Returns:
the DisplayName

setRefinementConfigurationGenerator

public void setRefinementConfigurationGenerator(RefinementConfigurationGenerator pRefinementConfigurationGenerator)
set RefinementConfigurationGenerator

Parameters:
pRefinementConfigurationGenerator - the RefinementConfigurationGenerator

getRefinementConfigurationGenerator

public RefinementConfigurationGenerator getRefinementConfigurationGenerator()
get RefinementConfigurationGenerator

Returns:
the RefinementConfigurationGenerator

doStartService

public void doStartService()
                    throws ServiceException
start the service, verify that required properties are set

Overrides:
doStartService in class GenericService
Throws:
ServiceException - if the Service had a problem starting up

enumerateCustomizationItems

public java.util.List enumerateCustomizationItems()
return list of refine config ids

Specified by:
enumerateCustomizationItems in interface atg.search.adapter.customization.CustomizationDataAdapter
Specified by:
enumerateCustomizationItems in class atg.search.adapter.customization.CustomizationDataAdapterImpl
Returns:
List of refine config ids

enumerateCustomizationItemsByType

public java.util.List enumerateCustomizationItemsByType(atg.search.adapter.customization.CustomizationType pCustomizationType)
If the pCustomizationType parameter matches CustomizationType.REFINEMENT_CONFIGURATION, then this will return the same List of refine config ids as the enumerateCustomizationItems() method above. Otherwise, an empty List is returned.

Specified by:
enumerateCustomizationItemsByType in interface atg.search.adapter.customization.CustomizationDataAdapter
Specified by:
enumerateCustomizationItemsByType in class atg.search.adapter.customization.CustomizationDataAdapterImpl
Parameters:
pCustomizationType - the customization type, must be of type REFINEMENT_CONFIGURATION or else an empty list is returned
Returns:
List of refine config ids

enumerateAutoApplyCustomizationItemsByTypeAndProject

public java.util.List enumerateAutoApplyCustomizationItemsByTypeAndProject(atg.search.adapter.customization.CustomizationType pCustomizationType,
                                                                           java.lang.String pProjectId)
                                                                    throws atg.search.adapter.exception.CustomizationItemNotFoundException
This method will enumerate all refineConfig items that are to be auto-applied.

Specified by:
enumerateAutoApplyCustomizationItemsByTypeAndProject in interface atg.search.adapter.customization.CustomizationDataAdapter
Overrides:
enumerateAutoApplyCustomizationItemsByTypeAndProject in class atg.search.adapter.customization.CustomizationDataAdapterImpl
Parameters:
pCustomizationType - the customization type
pProjectId - the search project id
Returns:
List of refine config ids
Throws:
atg.search.adapter.exception.CustomizationItemNotFoundException - if there was an error getting the refine configs

getCustomizationItem

public atg.search.adapter.customization.CustomizationItem getCustomizationItem(atg.search.adapter.customization.CustomizationType pCustomizationType,
                                                                               java.lang.String pCustomizationItemId)
                                                                        throws atg.search.adapter.exception.CustomizationItemNotFoundException
Checks the pCustomizationType parameter. If this is set to CustomizationType.REFINEMENT_CONFIGURATION, then the repository item for the given customization id is retrieved from the refinement repository and used to construct a RefineConfigItem object, which is then returned.

Specified by:
getCustomizationItem in interface atg.search.adapter.customization.CustomizationDataAdapter
Specified by:
getCustomizationItem in class atg.search.adapter.customization.CustomizationDataAdapterImpl
Parameters:
pCustomizationType - the type
pCustomizationItemId - the item id
Returns:
the customization item
Throws:
CustomizationItemNotFoundExcpetion - if there was an error getting the item
atg.search.adapter.exception.CustomizationItemNotFoundException

getSupportedCustomizationTypes

public java.util.Collection getSupportedCustomizationTypes()
get a list of supported customization types

Specified by:
getSupportedCustomizationTypes in interface atg.search.adapter.customization.CustomizationDataAdapter
Specified by:
getSupportedCustomizationTypes in class atg.search.adapter.customization.CustomizationDataAdapterImpl
Returns:
a Collection containing a single item of type CustomizationType with the value REFINEMENT_CONFIGURATION

isAutoApplyAll

public boolean isAutoApplyAll()
auto apply all should always be true

Specified by:
isAutoApplyAll in interface atg.search.adapter.customization.CustomizationDataAdapter
Overrides:
isAutoApplyAll in class atg.search.adapter.customization.CustomizationDataAdapterImpl