public interface CMSAdminRestrictionService
| Modifier and Type | Method and Description |
|---|---|
CMSCatalogRestrictionModel |
createCatalogRestriction(AbstractPageModel page,
String id,
String name,
Collection<CatalogModel> catalogs)
Creates a new CatalogRestriction and a new relation between the restriction and the given page.
|
CMSCategoryRestrictionModel |
createCategoryRestriction(AbstractPageModel page,
String id,
String name,
Collection<CategoryModel> categories)
Creates a new CategoryRestriction and a new relation between the restriction and the given page
|
CMSProductRestrictionModel |
createProductRestriction(AbstractPageModel page,
String id,
String name,
Collection<ProductModel> products)
Creates a new ProductRestriction and a new relation between the restriction and the given page
|
void |
createRelation(AbstractPageModel page,
AbstractRestrictionModel restriction)
creates a new relation between the given page and the given restriction
|
void |
createRelation(String pageId,
String restrictionId)
creates a new relation between the given page (pageId) and the given restriction (restrictionId)
|
CMSTimeRestrictionModel |
createTimeRestriction(AbstractPageModel page,
String id,
String name,
Date from,
Date until)
Creates a new TimeRestriction and a new relation between the restriction and the given page
|
CMSUserGroupRestrictionModel |
createUserGroupRestriction(AbstractPageModel page,
String id,
String name,
Collection<UserGroupModel> userGroups)
Creates a new UserGroupRestriction and a new relation between the restriction and the given page
|
CMSUserRestrictionModel |
createUserRestriction(AbstractPageModel page,
String id,
String name,
Collection<UserModel> users)
Creates a new UserRestriction and a new relation between the restriction and the given page
|
void |
deleteRelation(AbstractRestrictionModel restriction,
AbstractPageModel page)
deletes the relation between the restriction and the page
|
void |
deleteRelation(String restrictionId,
String pageId)
deletes the relation between the restriction and the page
|
Collection<RestrictionTypeModel> |
getAllowedRestrictionTypesForPage(AbstractPageModel page)
Returns a collection of all restrictions which can be applied on the given page
|
Collection<RestrictionTypeModel> |
getAllowedRestrictionTypesForPage(String pageId)
Returns a collection of all restrictions which can be applied on the given page (via its id)
|
Collection<AbstractRestrictionModel> |
getAllRestrictions()
Returns all restriction
|
Collection<AbstractRestrictionModel> |
getAllRestrictionsByType(String restrictionType)
Returns all restriction of the given restriction type
|
Collection<AbstractRestrictionModel> |
getAllRestrictionsByTypeNotLinkedToPage(String pageId,
String restrictionType)
Returns all restrictions of the given restriction type which are currently not linked to the given page (via its
id)
|
Collection<RestrictionTypeModel> |
getAllRestrictionTypes()
Returns a collection of all available restriction types.
|
List<CategoryModel> |
getCategories(CMSCategoryRestrictionModel categoryRestriction,
PreviewDataModel previewContext)
Returns products for product restriction
|
List<ProductModel> |
getProducts(CMSProductRestrictionModel productRestriction,
PreviewDataModel previewContext)
Returns products for product restriction
|
AbstractRestrictionModel |
getRestriction(String id)
Returns a restriction via its id
|
List<AbstractRestrictionModel> |
getRestrictionsByName(String name)
Returns a restriction via its name
|
Collection<AbstractRestrictionModel> |
getRestrictionsForPage(AbstractPageModel page)
Returns all restrictions which are applied on the given page
|
Collection<AbstractRestrictionModel> |
getRestrictionsForPage(AbstractPageModel page,
String restrictionType)
Returns all restrictions of the given restriction type which are applied on the given page
|
Collection<AbstractRestrictionModel> |
getRestrictionsForPage(String pageId,
String restrictionType)
Returns all restrictions of the given restriction type which are applied on the given page (via its id)
|
boolean |
hasOtherRelations(AbstractRestrictionModel restriction,
AbstractPageModel page)
Checks if a given restriction has also other relations than to the given page
|
boolean |
hasOtherRelations(String restrictionId,
String pageId)
Checks if a given restriction has also other relations than to the given page
|
Collection<RestrictionTypeModel> getAllRestrictionTypes()
nullCollection<RestrictionTypeModel> getAllowedRestrictionTypesForPage(String pageId) throws CMSItemNotFoundException
pageId - id of pageCMSItemNotFoundException - if the page is not foundCollection<RestrictionTypeModel> getAllowedRestrictionTypesForPage(AbstractPageModel page)
page - Collection<AbstractRestrictionModel> getRestrictionsForPage(String pageId, String restrictionType) throws CMSItemNotFoundException
pageId - id of pagerestrictionType - ComposedType code of restrictionCMSItemNotFoundException - if the page or the composed type is not foundCollection<AbstractRestrictionModel> getRestrictionsForPage(AbstractPageModel page, String restrictionType) throws CMSItemNotFoundException
page - restrictionType - ComposedType code of restrictionCMSItemNotFoundExceptionCollection<AbstractRestrictionModel> getRestrictionsForPage(AbstractPageModel page)
page - - the page for which we want to retrieve restrictionsCollection<AbstractRestrictionModel> getAllRestrictionsByType(String restrictionType) throws CMSItemNotFoundException
restrictionType - ComposedType code of restrictionCMSItemNotFoundException - if the composed type is not foundCollection<AbstractRestrictionModel> getAllRestrictionsByTypeNotLinkedToPage(String pageId, String restrictionType) throws CMSItemNotFoundException
pageId - id of the pagerestrictionType - composed type code of restrictionCMSItemNotFoundException - if the page or the composed type is not foundAbstractRestrictionModel getRestriction(String id) throws CMSItemNotFoundException
id - id of restrictionCMSItemNotFoundException - if no restriction with the given id is foundList<AbstractRestrictionModel> getRestrictionsByName(String name) throws CMSItemNotFoundException
name - name of restrictionCMSItemNotFoundException - if no restriction with the given name is foundCollection<AbstractRestrictionModel> getAllRestrictions()
nullCMSCategoryRestrictionModel createCategoryRestriction(AbstractPageModel page, String id, String name, Collection<CategoryModel> categories) throws CMSItemCreateException
page - page to be linked to the new restrictionid - id of the restrictionname - name of the restrictioncategories - list of categories for this restrictionCMSItemCreateException - if the restriction could not be createdCMSProductRestrictionModel createProductRestriction(AbstractPageModel page, String id, String name, Collection<ProductModel> products) throws CMSItemCreateException
page - page to be linked to the new restrictionid - id of the restrictionname - name of the restrictionproducts - list of products for this restrictionCMSItemCreateException - if the restriction could not be createdCMSTimeRestrictionModel createTimeRestriction(AbstractPageModel page, String id, String name, Date from, Date until) throws CMSItemCreateException
page - page to be linked to the new restrictionid - id of the restrictionname - name of the restrictionfrom - restriction is active fromuntil - restriction is active untilCMSItemCreateException - if the restriction could not be createdCMSUserRestrictionModel createUserRestriction(AbstractPageModel page, String id, String name, Collection<UserModel> users) throws CMSItemCreateException
page - page to be linked to the new restrictionid - id of the restrictionname - name of the restrictionusers - list of users for this restrictionCMSItemCreateException - if the restriction could not be createdCMSUserGroupRestrictionModel createUserGroupRestriction(AbstractPageModel page, String id, String name, Collection<UserGroupModel> userGroups) throws CMSItemCreateException
page - page to be linked to the new restrictionid - id of the restrictionname - name of the restrictionuserGroups - list of user groups for this restrictionCMSItemCreateException - if the restriction could not be createdCMSCatalogRestrictionModel createCatalogRestriction(AbstractPageModel page, String id, String name, Collection<CatalogModel> catalogs) throws CMSItemCreateException
page - page to be linked to the new restrictionid - id of the restrictionname - name of the restrictioncatalogs - list of catalogs for this restrictionCMSItemCreateException - if the restriction could not be createdvoid createRelation(AbstractPageModel page, AbstractRestrictionModel restriction)
page - restriction - void createRelation(String pageId, String restrictionId) throws CMSItemNotFoundException
pageId - restrictionId - CMSItemNotFoundException - if the page and/or restriction is not foundboolean hasOtherRelations(AbstractRestrictionModel restriction, AbstractPageModel page)
restriction - page - boolean hasOtherRelations(String restrictionId, String pageId) throws CMSItemNotFoundException
restrictionId - pageId - CMSItemNotFoundException - if the restriction and/or page is not foundvoid deleteRelation(AbstractRestrictionModel restriction, AbstractPageModel page)
restriction - page - void deleteRelation(String restrictionId, String pageId) throws CMSItemNotFoundException
restrictionId - pageId - CMSItemNotFoundException - if the restriction and/or page is not foundList<ProductModel> getProducts(CMSProductRestrictionModel productRestriction, PreviewDataModel previewContext)
productRestriction - given restrictionpreviewContext - preview context informationList<CategoryModel> getCategories(CMSCategoryRestrictionModel categoryRestriction, PreviewDataModel previewContext)
categoryRestriction - given restrictionpreviewContext - preview context informationCopyright © 2017 SAP SE. All Rights Reserved.