atg.projects.store.collections.filter
Class ColorSorter

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.service.collections.filter.CachedCollectionFilter
              extended by atg.projects.store.collections.filter.ColorSorter
All Implemented Interfaces:
atg.naming.NameContextBindingListener, atg.naming.NameContextElement, atg.naming.NameResolver, atg.nucleus.AdminableService, atg.nucleus.logging.ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, atg.nucleus.logging.VariableArgumentApplicationLogging, atg.nucleus.naming.ComponentNameResolver, atg.nucleus.Service, atg.nucleus.ServiceListener, java.util.EventListener

public class ColorSorter
extends atg.service.collections.filter.CachedCollectionFilter

This filter sorts a collection of color names.

Caching should not be enabled for this filter.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string.
protected  StoreCatalogTools mCatalogTools
          Catalog tools.
 
Fields inherited from class atg.service.collections.filter.CachedCollectionFilter
FILTER_CACHE_COMPONENT, mCache, mCacheEnabled
 
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
ColorSorter()
           
 
Method Summary
 java.lang.Object generateContextKey(java.util.Collection pUnfilteredCollection, java.lang.String pCollectionIdentifierKey, atg.repository.RepositoryItem pProfile)
          Generates a context key for this filter.
protected  java.util.Collection generateFilteredCollection(java.util.Collection pUnfilteredCollection, java.lang.String pCollectionIdentifierKey, atg.repository.RepositoryItem pProfile)
          Generates a sorted collection.
 StoreCatalogTools getCatalogTools()
           
 void setCatalogTools(StoreCatalogTools pCatalogTools)
           
 boolean shouldApplyFilter(java.util.Collection pUnfilteredCollection, java.lang.String pKey, atg.repository.RepositoryItem pProfile)
          
 
Methods inherited from class atg.service.collections.filter.CachedCollectionFilter
dumpCache, filterCollection, filterCollection, filterCollection, filterCollection, flushCache, generateCacheKey, generateCacheKey, generateContextKey, generateFilteredCollection, generateNewCollectionObject, getCache, getDefaultProfile, isCacheEnabled, setCache, setCacheEnabled, shouldApplyFilter, stringIt
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStartService, 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, reResolveThis, 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
 

Field Detail

CLASS_VERSION

public static final java.lang.String CLASS_VERSION
Class version string.

See Also:
Constant Field Values

mCatalogTools

protected StoreCatalogTools mCatalogTools
Catalog tools.

Constructor Detail

ColorSorter

public ColorSorter()
Method Detail

getCatalogTools

public StoreCatalogTools getCatalogTools()
Returns:
catalog tools.

setCatalogTools

public void setCatalogTools(StoreCatalogTools pCatalogTools)
Parameters:
pCatalogTools - - catalog tools.

generateContextKey

public java.lang.Object generateContextKey(java.util.Collection pUnfilteredCollection,
                                           java.lang.String pCollectionIdentifierKey,
                                           atg.repository.RepositoryItem pProfile)
Generates a context key for this filter. This method always returns null with the assumption that caching is turned off.

Overrides:
generateContextKey in class atg.service.collections.filter.CachedCollectionFilter
Parameters:
pUnfilteredCollection - the collection to be filtered
pCollectionIdentifierKey - the key that uniquely identifies the unfiltered collection
pProfile - the user profile
Returns:
the context key object

shouldApplyFilter

public boolean shouldApplyFilter(java.util.Collection pUnfilteredCollection,
                                 java.lang.String pKey,
                                 atg.repository.RepositoryItem pProfile)

Overrides:
shouldApplyFilter in class atg.service.collections.filter.CachedCollectionFilter
Returns:
true

generateFilteredCollection

protected java.util.Collection generateFilteredCollection(java.util.Collection pUnfilteredCollection,
                                                          java.lang.String pCollectionIdentifierKey,
                                                          atg.repository.RepositoryItem pProfile)
                                                   throws atg.service.collections.filter.FilterException
Generates a sorted collection.

Overrides:
generateFilteredCollection in class atg.service.collections.filter.CachedCollectionFilter
Parameters:
pUnfilteredCollection - the unfiltered collection
pCollectionIdentifierKey - the key the uniquely identifies the unfiltered collection (ignored)
pProfile - the user profile
Returns:
the sorted collection
Throws:
atg.service.collections.filter.FilterException - This exception indicates that a severe error occurs while performing sortColors method