|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.nucleus.logging.VariableArgumentApplicationLoggingImpl atg.nucleus.GenericService atg.service.collections.filter.CachedCollectionFilter atg.service.collections.filter.ChainedFilter
public class ChainedFilter
This filter chains together two or more CachedCollectionFilters. Each filter in the chain is executed in succession, where the output from one filter becomes input into the next.
isCacheEnabled()
,
generateContextKey(java.util.Collection, java.lang.String, atg.repository.RepositoryItem, java.util.Map)
,
generateFilteredCollection(java.util.Collection, java.lang.String, atg.repository.RepositoryItem, java.util.Map)
,
CachedCollectionFilter
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
|
protected CachedCollectionFilter[] |
mFilters
Sets the array of filters that will be executed in succession to produce the final filtered results. |
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 | |
---|---|
ChainedFilter()
|
Method Summary | |
---|---|
java.lang.Object |
generateContextKey(java.util.Collection pUnfilteredCollection,
java.lang.String pCollectionIdentifierKey,
RepositoryItem pProfile,
java.util.Map pExtraParameters)
Generates a context key for the chained filter execution. |
protected java.util.Collection |
generateFilteredCollection(java.util.Collection pUnfilteredCollection,
java.lang.String pCollectionIdentifierKey,
RepositoryItem pProfile,
java.util.Map pExtraParameters)
Called by the filterCollection method to generate the filtered collection. |
CachedCollectionFilter[] |
getFilters()
Returns the array of filters that will be executed in succession to produce the final filtered results. |
boolean |
isCacheEnabled()
Returns if caching is enabled. |
void |
setFilters(CachedCollectionFilter[] pFilters)
|
boolean |
shouldApplyFilter(java.util.Collection pUnfilteredCollection,
java.lang.String pCollectionIdentifierKey,
RepositoryItem pProfile,
java.util.Map pExtraParameters)
This method is called by filterCollection prior to looking up the filtered collection in the cache or generating a new filtered collection. |
Methods inherited from class atg.service.collections.filter.CachedCollectionFilter |
---|
dumpCache, filterCollection, filterCollection, filterCollection, filterCollection, flushCache, generateCacheKey, generateCacheKey, generateContextKey, generateFilteredCollection, generateNewCollectionObject, getCache, getDefaultProfile, setCache, setCacheEnabled, shouldApplyFilter, stringIt |
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 |
---|
public static final java.lang.String CLASS_VERSION
protected CachedCollectionFilter[] mFilters
Constructor Detail |
---|
public ChainedFilter()
Method Detail |
---|
public void setFilters(CachedCollectionFilter[] pFilters)
public CachedCollectionFilter[] getFilters()
public boolean isCacheEnabled()
CachedCollectionFilter
This method will return false if the filter does not have a cache component configured.
isCacheEnabled
in class CachedCollectionFilter
public java.lang.Object generateContextKey(java.util.Collection pUnfilteredCollection, java.lang.String pCollectionIdentifierKey, RepositoryItem pProfile, java.util.Map pExtraParameters)
generateContextKey
in class CachedCollectionFilter
pUnfilteredCollection
- the unfiltered collectionpCollectionIdentifierKey
- the key that was passed to the filterCollection
method.pProfile
- the user profilepExtraParameters
- map containing key-value pairs with extra parameters
public boolean shouldApplyFilter(java.util.Collection pUnfilteredCollection, java.lang.String pCollectionIdentifierKey, RepositoryItem pProfile, java.util.Map pExtraParameters)
CachedCollectionFilter
shouldApplyFilter
in class CachedCollectionFilter
pUnfilteredCollection
- the unfiltered collectionpCollectionIdentifierKey
- the key param as passed to filterCollectionpProfile
- the user profilepExtraParameters
- key-value pairs with extra parameters
atg.serivce.collections.filter.CachedCollectionFilter#shouldApplyFilter
protected java.util.Collection generateFilteredCollection(java.util.Collection pUnfilteredCollection, java.lang.String pCollectionIdentifierKey, RepositoryItem pProfile, java.util.Map pExtraParameters) throws FilterException
Each filter in the chain is executed by calling its filterCollection method.
The first filter in the chain is called with consultCache and updateCache as true. All other filters in the chain are called with consultCache and updateCache as false.
This behavior is the same regardless of how the consultCache and updateCache flags are set when the chained filter's filterCollection method is called.
If the pCollectionIdentifierKey is null or empty, all the filters in the chain are executed with the consultCache and updateCache flags as false.
generateFilteredCollection
in class CachedCollectionFilter
pUnfilteredCollection
- the unfiltered collectionpCollectionIdentifierKey
- the key the uniquely identifies the unfiltered collection.pProfile
- user profilepExtraParameters
- extra parameters
FilterException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |