|
|||||||||
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.commerce.collections.filter.ItemSiteFilter
public class ItemSiteFilter
Implementation of CachedCollectionFilter
which filters input products collection by their site IDs.
This filter will return only products whose site IDs intersect with site IDs from the current sharing group
defined by the shareableTypeId
property. This filter can also be provided with a sites or siteScope
parameter to filter based on the inputted sites rather than a shareableTypeId
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version |
protected boolean |
mIncludeDisabledSites
|
protected boolean |
mIncludeInactiveSites
|
protected boolean |
mIncludeUnsitedItems
|
protected java.lang.String |
mShareableTypeId
|
protected SiteGroupManager |
mSiteGroupManager
|
protected java.lang.String |
mSiteGroupsPropertyName
|
protected SiteManager |
mSiteManager
|
protected java.lang.String |
mSitesPropertyName
|
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 | |
---|---|
ItemSiteFilter()
|
Method Summary | |
---|---|
java.util.Collection |
generateFilteredCollection(java.util.Collection pUnfilteredCollection,
java.lang.String pCollectionIdentifierKey,
RepositoryItem pProfile)
This method filters the passed in collection by the current site. |
java.util.Collection |
generateFilteredCollection(java.util.Collection pUnfilteredCollection,
java.lang.String pCollectionIdentifierKey,
RepositoryItem pProfile,
java.util.Map pExtraParameters)
This method filters the passed in collection by the current or passed in site. |
java.lang.String |
getShareableTypeId()
This property contains a shareable ID to be used when determining sharing sites. |
protected SiteGroupManager |
getSiteGroupManager()
Returns the SiteGroupManager instance |
java.lang.String |
getSiteGroupsPropertyName()
Get the site group property name |
SiteManager |
getSiteManager()
This property contains a reference to SiteManager to be used when determining active
and disabled sites. |
java.lang.String |
getSitesPropertyName()
This property contains the name of the property that holds references to an item's sites. |
boolean |
isIncludeDisabledSites()
Returns the includeDisabledSites property. |
boolean |
isIncludeInactiveSites()
Returns the includeInactiveSites property. |
boolean |
isIncludeUnsitedItems()
Whether or not items without any site membership should be included in the results |
void |
setIncludeDisabledSites(boolean pIncludeDisabledSites)
Sets the includeDisabledSites property. |
void |
setIncludeInactiveSites(boolean pIncludeInactiveSites)
Sets the includeInactiveSites property. |
void |
setIncludeUnsitedItems(boolean pIncludeUnsitedItems)
Set the IncludeUnsitedItems property |
void |
setShareableTypeId(java.lang.String pShareableTypeId)
|
void |
setSiteGroupManager(SiteGroupManager pSiteGroupManager)
Sets the SiteGroupManager instance |
void |
setSiteGroupsPropertyName(java.lang.String pSiteGroupsPropertyName)
Sets the SiteGroupPropertyName |
void |
setSiteManager(SiteManager pSiteManager)
Sets the SiteManager instance |
void |
setSitesPropertyName(java.lang.String pSitesPropertyName)
Sets the sites property name |
Methods inherited from class atg.service.collections.filter.CachedCollectionFilter |
---|
dumpCache, filterCollection, filterCollection, filterCollection, filterCollection, flushCache, generateCacheKey, generateCacheKey, generateContextKey, generateContextKey, generateNewCollectionObject, getCache, getDefaultProfile, isCacheEnabled, setCache, setCacheEnabled, shouldApplyFilter, shouldApplyFilter, stringIt |
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 |
---|
public static java.lang.String CLASS_VERSION
protected java.lang.String mShareableTypeId
protected java.lang.String mSitesPropertyName
protected java.lang.String mSiteGroupsPropertyName
protected boolean mIncludeUnsitedItems
protected boolean mIncludeDisabledSites
protected boolean mIncludeInactiveSites
protected SiteGroupManager mSiteGroupManager
protected SiteManager mSiteManager
Constructor Detail |
---|
public ItemSiteFilter()
Method Detail |
---|
public java.lang.String getShareableTypeId()
public void setShareableTypeId(java.lang.String pShareableTypeId)
public void setSitesPropertyName(java.lang.String pSitesPropertyName)
pSitesPropertyName
- the sites property name to setpublic java.lang.String getSitesPropertyName()
public void setSiteGroupsPropertyName(java.lang.String pSiteGroupsPropertyName)
pSiteGroupsPropertyName
- the siteGroupsPropertyName to setpublic java.lang.String getSiteGroupsPropertyName()
public void setIncludeUnsitedItems(boolean pIncludeUnsitedItems)
pIncludeUnsitedItems
- the includeUnsitedItems to setpublic boolean isIncludeUnsitedItems()
public boolean isIncludeDisabledSites()
public void setIncludeDisabledSites(boolean pIncludeDisabledSites)
pIncludeDisabledSites
- whether or not to filter out items that exist only
on disabled sites. A value of true
indicates that items should be
retained in the collection even if all their sites are disabled.public boolean isIncludeInactiveSites()
public void setIncludeInactiveSites(boolean pIncludeInactiveSites)
pIncludeInactiveSites
- whether or not to filter out items that exist only
on inactive sites. A value of true
indicates that items should be
retained in the collection even if all their sites are inactive.protected SiteGroupManager getSiteGroupManager()
public void setSiteGroupManager(SiteGroupManager pSiteGroupManager)
pSiteGroupManager
- the siteGroupManager to setpublic SiteManager getSiteManager()
SiteManager
to be used when determining active
and disabled sites.
public void setSiteManager(SiteManager pSiteManager)
pSiteManager
- the SiteManager to setpublic java.util.Collection generateFilteredCollection(java.util.Collection pUnfilteredCollection, java.lang.String pCollectionIdentifierKey, RepositoryItem pProfile) throws FilterException
generateFilteredCollection
in class CachedCollectionFilter
pUnfilteredCollection
- the collection to be filteredpCollectionIdentifierKey
- unused
pProfile pCollectionIdentifierKey unusedpProfile
- Repository item
FilterException
- if the item does not have a sites propertypublic java.util.Collection generateFilteredCollection(java.util.Collection pUnfilteredCollection, java.lang.String pCollectionIdentifierKey, RepositoryItem pProfile, java.util.Map pExtraParameters) throws FilterException
generateFilteredCollection
in class CachedCollectionFilter
pUnfilteredCollection
- the collection to be filteredpCollectionIdentifierKey
- unused
pProfile pCollectionIdentifierKey unusedpExtraParameters
- map containing key-value pairs with extra parameters
FilterException
- if the item does not have a sites property
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |