public class DefaultPageRestrictionFacade extends java.lang.Object implements PageRestrictionFacade
PageRestrictionFacade. This uses CMSAdminPageService and
CMSAdminRestrictionService to retrieve pages and restrictions respectively.| Constructor and Description |
|---|
DefaultPageRestrictionFacade() |
| Modifier and Type | Method and Description |
|---|---|
protected PageRestrictionData |
buildPageRestrictionData(AbstractPageModel page,
AbstractRestrictionModel restriction)
Build a new page restriction dto to hold a single pageId - restrictionId pair.
|
protected CMSAdminPageService |
getAdminPageService() |
protected CMSAdminRestrictionService |
getAdminRestrictionService() |
java.util.List<PageRestrictionData> |
getAllPagesRestrictions()
Get a list of restrictions for all pages.
|
protected java.util.List<PageRestrictionData> |
getAllRestrictionsByPage(AbstractPageModel page) |
protected FacadeValidationService |
getFacadeValidationService() |
java.util.List<PageRestrictionData> |
getRestrictionsByPage(java.lang.String pageId)
Get a list of restrictions for a given page.
|
protected PlatformTransactionManager |
getTransactionManager() |
protected Validator |
getUpdatePageRestrictionValidator() |
protected ErrorFactory |
getValidatorErrorFactory() |
void |
setAdminPageService(CMSAdminPageService adminPageService) |
void |
setAdminRestrictionService(CMSAdminRestrictionService adminRestrictionService) |
void |
setFacadeValidationService(FacadeValidationService facadeValidationService) |
void |
setTransactionManager(PlatformTransactionManager transactionManager) |
void |
setUpdatePageRestrictionValidator(Validator updatePageRestrictionValidator) |
void |
setValidatorErrorFactory(ErrorFactory validatorErrorFactory) |
void |
updateRestrictionRelationsByPage(java.lang.String pageId,
java.util.List<PageRestrictionData> pageRestrictionsListData)
Updates the list of restrictions associated with the pageId based according to the provided
pageRestrictionsListData
|
protected void |
validatePageForUpdate(AbstractPageModel page,
java.util.List<PageRestrictionData> pageRestrictionsListData)
Validate that page defaultPage attribute and list of restrictions to be applied to the page.
|
public java.util.List<PageRestrictionData> getRestrictionsByPage(java.lang.String pageId) throws CMSItemNotFoundException
PageRestrictionFacadegetRestrictionsByPage in interface PageRestrictionFacadepageId - the id of the page to which the restrictions are appliedCMSItemNotFoundException - when the page cannot be foundpublic java.util.List<PageRestrictionData> getAllPagesRestrictions()
PageRestrictionFacadegetAllPagesRestrictions in interface PageRestrictionFacadeprotected java.util.List<PageRestrictionData> getAllRestrictionsByPage(AbstractPageModel page)
public void updateRestrictionRelationsByPage(java.lang.String pageId,
java.util.List<PageRestrictionData> pageRestrictionsListData)
throws CMSItemNotFoundException
PageRestrictionFacadeupdateRestrictionRelationsByPage in interface PageRestrictionFacadepageId - the id of the page to which the restrictions are appliedpageRestrictionsListData - the list of page-restriction relationCMSItemNotFoundException - when cannot find a page based on the provided pageIdprotected void validatePageForUpdate(AbstractPageModel page, java.util.List<PageRestrictionData> pageRestrictionsListData)
page - - the page which defaultPage flag should be validatepageRestrictionsListData - - the restrictions to be applied to the pageprotected PageRestrictionData buildPageRestrictionData(AbstractPageModel page, AbstractRestrictionModel restriction)
page - - the pagerestriction - - the restrictionprotected FacadeValidationService getFacadeValidationService()
public void setFacadeValidationService(FacadeValidationService facadeValidationService)
protected CMSAdminPageService getAdminPageService()
public void setAdminPageService(CMSAdminPageService adminPageService)
protected CMSAdminRestrictionService getAdminRestrictionService()
public void setAdminRestrictionService(CMSAdminRestrictionService adminRestrictionService)
protected Validator getUpdatePageRestrictionValidator()
public void setUpdatePageRestrictionValidator(Validator updatePageRestrictionValidator)
protected PlatformTransactionManager getTransactionManager()
public void setTransactionManager(PlatformTransactionManager transactionManager)
protected ErrorFactory getValidatorErrorFactory()
public void setValidatorErrorFactory(ErrorFactory validatorErrorFactory)
Copyright © 2018 SAP SE. All Rights Reserved.