public class DefaultCMSRestrictionService extends AbstractCMSService implements CMSRestrictionService
AbstractService.SerializableDTOCURRENTCATALOGVERSION, CURRENTSITEmodelService, sessionService, txManagertenant| Constructor and Description |
|---|
DefaultCMSRestrictionService() |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
createMoreThanOneDefaultPageWarning(java.util.Collection<AbstractPageModel> defaultPages) |
boolean |
evaluate(AbstractRestrictionModel restriction,
RestrictionData restrictionDataInfo)
Evaluates given restriction for
RestrictionData context object. |
protected boolean |
evaluate(java.util.List<AbstractRestrictionModel> restrictions,
RestrictionData data,
boolean oneRestrictionApply) |
protected boolean |
evaluateAnyRestriction(AbstractRestrictionModel restrictionModel,
RestrictionData context) |
boolean |
evaluateCMSComponent(AbstractCMSComponentModel component,
RestrictionData data)
Evaluate cms component for
RestrictionData context object. |
java.util.List<AbstractCMSComponentModel> |
evaluateCMSComponents(java.util.List<AbstractCMSComponentModel> components,
RestrictionData data)
Evaluate cms components for
RestrictionData context object. |
java.util.Collection<AbstractPageModel> |
evaluatePages(java.util.Collection<AbstractPageModel> pages,
RestrictionData data)
Evaluate pages for
RestrictionData context object. |
java.util.Collection<java.lang.String> |
getCategoryCodesForRestriction(CMSCategoryRestrictionModel restriction)
Gets the category codes for restriction.
|
protected CatalogLevelService |
getCmsCatalogLevelService() |
protected java.util.Comparator<AbstractPageModel> |
getCmsItemCatalogLevelComparator() |
protected CMSRestrictionDao |
getCmsRestrictionDao() |
protected java.util.Collection<AbstractPageModel> |
getDefaultPages(java.util.Collection<AbstractPageModel> pages) |
protected java.util.Collection<AbstractPageModel> |
getMultiCountryRestrictedPages(java.util.Collection<AbstractPageModel> pages)
Finds the restriction for the given page based on catalog hierarchy defined in the context of multi-country
|
java.util.Collection<java.lang.String> |
getProductCodesForRestriction(CMSProductRestrictionModel restriction)
Gets the product codes for restriction.
|
protected java.util.Collection<AbstractPageModel> |
getRestrictedPages(java.util.Collection<AbstractPageModel> pages,
AbstractPageModel abstractPageModel,
CatalogVersionModel catalogVersion)
Finds pages that matches the given catalog version.
|
protected java.util.Collection<AbstractPageModel> |
getSortedPagesByCatalogLevel(java.util.Collection<AbstractPageModel> pages)
Sorts a collection of pages based on their catalog level
|
void |
setCmsCatalogLevelService(CatalogLevelService cmsCatalogLevelService) |
void |
setCmsItemCatalogLevelComparator(java.util.Comparator<AbstractPageModel> cmsItemCatalogLevelComparator) |
void |
setCmsRestrictionDao(CMSRestrictionDao cmsRestrictionDao) |
void |
setEvaluatorRegistry(CMSRestrictionEvaluatorRegistry evaluatorRegistry) |
getBaseSiteService, getCurrentCatalogVersion, getCurrentSite, getSearchRestrictionService, getUserService, setBaseSiteService, setSearchRestrictionService, setUserServicegetModelService, getSessionService, getTxManager, setModelService, setSessionService, setTxManagerafterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, writeReplacepublic boolean evaluate(AbstractRestrictionModel restriction, RestrictionData restrictionDataInfo) throws RestrictionEvaluationException
RestrictionData context object.evaluate in interface CMSRestrictionServicerestriction - the restrictionrestrictionDataInfo - the restriction data infoRestrictionEvaluationException - the restriction evaluation exceptionpublic boolean evaluateCMSComponent(AbstractCMSComponentModel component, RestrictionData data)
RestrictionData context object.evaluateCMSComponent in interface CMSRestrictionServicecomponent - the componentdata - the datapublic java.util.List<AbstractCMSComponentModel> evaluateCMSComponents(java.util.List<AbstractCMSComponentModel> components, RestrictionData data)
RestrictionData context object.evaluateCMSComponents in interface CMSRestrictionServicecomponents - the componentsdata - the datapublic java.util.Collection<AbstractPageModel> evaluatePages(java.util.Collection<AbstractPageModel> pages, RestrictionData data)
RestrictionData context object.evaluatePages in interface CMSRestrictionServicepages - the pagesdata - the dataprotected java.util.Collection<AbstractPageModel> getMultiCountryRestrictedPages(java.util.Collection<AbstractPageModel> pages)
pages - - the list of pages to be evaluatedprotected java.util.Collection<AbstractPageModel> getSortedPagesByCatalogLevel(java.util.Collection<AbstractPageModel> pages)
pages - the unsorted collection of pagesprotected java.util.Collection<AbstractPageModel> getRestrictedPages(java.util.Collection<AbstractPageModel> pages, AbstractPageModel abstractPageModel, CatalogVersionModel catalogVersion)
pages - - the list of pages to be filteredabstractPageModel - - the page used for filtering (page type and labelOrId)catalogVersion - - the catalog version used for filteringpublic java.util.Collection<java.lang.String> getCategoryCodesForRestriction(CMSCategoryRestrictionModel restriction)
getCategoryCodesForRestriction in interface CMSRestrictionServicerestriction - the restrictionpublic java.util.Collection<java.lang.String> getProductCodesForRestriction(CMSProductRestrictionModel restriction)
getProductCodesForRestriction in interface CMSRestrictionServicerestriction - the restrictionprotected CMSRestrictionDao getCmsRestrictionDao()
public void setCmsRestrictionDao(CMSRestrictionDao cmsRestrictionDao)
public void setEvaluatorRegistry(CMSRestrictionEvaluatorRegistry evaluatorRegistry)
evaluatorRegistry - the evaluatorRegistry to setprotected boolean evaluate(java.util.List<AbstractRestrictionModel> restrictions, RestrictionData data, boolean oneRestrictionApply)
protected boolean evaluateAnyRestriction(AbstractRestrictionModel restrictionModel, RestrictionData context) throws RestrictionEvaluationException
RestrictionEvaluationExceptionprotected java.util.Collection<AbstractPageModel> getDefaultPages(java.util.Collection<AbstractPageModel> pages)
protected java.lang.String createMoreThanOneDefaultPageWarning(java.util.Collection<AbstractPageModel> defaultPages)
protected CatalogLevelService getCmsCatalogLevelService()
public void setCmsCatalogLevelService(CatalogLevelService cmsCatalogLevelService)
protected java.util.Comparator<AbstractPageModel> getCmsItemCatalogLevelComparator()
public void setCmsItemCatalogLevelComparator(java.util.Comparator<AbstractPageModel> cmsItemCatalogLevelComparator)
Copyright © 2018 SAP SE. All Rights Reserved.