Interface CMSRestrictionService
- All Known Implementing Classes:
DefaultCMSRestrictionService,RankingCMSRestrictionService
public interface CMSRestrictionService
The Interface CMSRestrictionService. Provides methods for managing CMS2 restrictions.
- Spring Bean ID:
- cmsRestrictionService
-
Method Summary
Modifier and TypeMethodDescriptionbooleanevaluate(AbstractRestrictionModel restriction, RestrictionData restrictionDataInfo) Evaluates given restriction forRestrictionDatacontext object.booleanevaluateCMSComponent(AbstractCMSComponentModel component, RestrictionData data) Evaluate cms component forRestrictionDatacontext object.evaluateCMSComponents(List<AbstractCMSComponentModel> components, RestrictionData data) Evaluate cms components forRestrictionDatacontext object.evaluatePages(Collection<AbstractPageModel> pages, RestrictionData data) Evaluate pages forRestrictionDatacontext object.Gets the category codes for restriction.default Collection<AbstractRestrictionModel>getOwnRestrictionsForComponents(Collection<AbstractCMSComponentModel> components, CatalogVersionModel catalogVersion) Find restrictions for components by components and catalog version.default Collection<AbstractRestrictionModel>getOwnRestrictionsForPage(AbstractPageModel pageModel, CatalogVersionModel catalogVersion) Find restrictions for page by page and catalog version.getProductCodesForRestriction(CMSProductRestrictionModel restriction) Gets the product codes for restriction.default booleanrelatedSharedSlots(AbstractRestrictionModel restrictionModel) Check if a restriction is related to a shared slot or not.
-
Method Details
-
evaluate
boolean evaluate(AbstractRestrictionModel restriction, RestrictionData restrictionDataInfo) throws RestrictionEvaluationException Evaluates given restriction forRestrictionDatacontext object.- Parameters:
restriction- the restrictionrestrictionDataInfo- the restriction data info- Returns:
- true, if successful
- Throws:
RestrictionEvaluationException- the restriction evaluation exception
-
evaluateCMSComponent
Evaluate cms component forRestrictionDatacontext object.- Parameters:
component- the componentdata- the data- Returns:
- true, if successful
-
evaluateCMSComponents
List<AbstractCMSComponentModel> evaluateCMSComponents(List<AbstractCMSComponentModel> components, RestrictionData data) Evaluate cms components forRestrictionDatacontext object.- Parameters:
components- the componentsdata- the data- Returns:
- the list
-
evaluatePages
Collection<AbstractPageModel> evaluatePages(Collection<AbstractPageModel> pages, RestrictionData data) Evaluate pages forRestrictionDatacontext object.- Parameters:
pages- the pagesdata- the data- Returns:
- the collection
-
getCategoryCodesForRestriction
Gets the category codes for restriction.- Parameters:
restriction- the restriction- Returns:
- the category codes for restriction
-
getProductCodesForRestriction
Gets the product codes for restriction.- Parameters:
restriction- the restriction- Returns:
- the product codes for restriction
-
getOwnRestrictionsForPage
default Collection<AbstractRestrictionModel> getOwnRestrictionsForPage(AbstractPageModel pageModel, CatalogVersionModel catalogVersion) Find restrictions for page by page and catalog version.- Parameters:
pageModel- the pagecatalogVersion- the catalog version- Returns:
- the collection of found
AbstractRestrictionModelobjects or empty list when not found.
-
getOwnRestrictionsForComponents
default Collection<AbstractRestrictionModel> getOwnRestrictionsForComponents(Collection<AbstractCMSComponentModel> components, CatalogVersionModel catalogVersion) Find restrictions for components by components and catalog version.- Parameters:
components- the componentscatalogVersion- the catalog version- Returns:
- the collection of found
AbstractRestrictionModelobjects or empty list when not found.
-