Class DefaultPageRestrictionFacade

java.lang.Object
de.hybris.platform.cmsfacades.pagesrestrictions.impl.DefaultPageRestrictionFacade
All Implemented Interfaces:
PageRestrictionFacade

public class DefaultPageRestrictionFacade extends Object implements PageRestrictionFacade
Default implementation of PageRestrictionFacade. This uses CMSAdminPageService and CMSAdminRestrictionService to retrieve pages and restrictions respectively.
  • Constructor Details

    • DefaultPageRestrictionFacade

      public DefaultPageRestrictionFacade()
  • Method Details

    • getRestrictionsByPage

      public List<PageRestrictionData> getRestrictionsByPage(String pageId) throws CMSItemNotFoundException
      Description copied from interface: PageRestrictionFacade
      Get a list of restrictions for a given page.
      Specified by:
      getRestrictionsByPage in interface PageRestrictionFacade
      Parameters:
      pageId - the id of the page to which the restrictions are applied
      Returns:
      list of page id - restriction id pairs; never null
      Throws:
      CMSItemNotFoundException - when the page cannot be found
    • getAllPagesRestrictions

      public List<PageRestrictionData> getAllPagesRestrictions()
      Description copied from interface: PageRestrictionFacade
      Get a list of restrictions for all pages.
      Specified by:
      getAllPagesRestrictions in interface PageRestrictionFacade
      Returns:
      a list of restrictions for all pages.
    • getAllRestrictionsByPage

      protected List<PageRestrictionData> getAllRestrictionsByPage(AbstractPageModel page)
    • updateRestrictionRelationsByPage

      public void updateRestrictionRelationsByPage(String pageId, List<PageRestrictionData> pageRestrictionsListData) throws CMSItemNotFoundException
      Description copied from interface: PageRestrictionFacade
      Updates the list of restrictions associated with the pageId based according to the provided pageRestrictionsListData
      Specified by:
      updateRestrictionRelationsByPage in interface PageRestrictionFacade
      Parameters:
      pageId - the id of the page to which the restrictions are applied
      pageRestrictionsListData - the list of page-restriction relation
      Throws:
      CMSItemNotFoundException - when cannot find a page based on the provided pageId
    • validatePageForUpdate

      protected void validatePageForUpdate(AbstractPageModel page, List<PageRestrictionData> pageRestrictionsListData)
      Validate that page defaultPage attribute and list of restrictions to be applied to the page.
      Parameters:
      page - - the page which defaultPage flag should be validate
      pageRestrictionsListData - - the restrictions to be applied to the page
    • buildPageRestrictionData

      protected PageRestrictionData buildPageRestrictionData(AbstractPageModel page, AbstractRestrictionModel restriction)
      Build a new page restriction dto to hold a single pageId - restrictionId pair.
      Parameters:
      page - - the page
      restriction - - the restriction
      Returns:
      a page restriction dto
    • getFacadeValidationService

      protected FacadeValidationService getFacadeValidationService()
    • setFacadeValidationService

      public void setFacadeValidationService(FacadeValidationService facadeValidationService)
    • getAdminPageService

      protected CMSAdminPageService getAdminPageService()
    • setAdminPageService

      public void setAdminPageService(CMSAdminPageService adminPageService)
    • getAdminRestrictionService

      protected CMSAdminRestrictionService getAdminRestrictionService()
    • setAdminRestrictionService

      public void setAdminRestrictionService(CMSAdminRestrictionService adminRestrictionService)
    • getUpdatePageRestrictionValidator

      protected org.springframework.validation.Validator getUpdatePageRestrictionValidator()
    • setUpdatePageRestrictionValidator

      public void setUpdatePageRestrictionValidator(org.springframework.validation.Validator updatePageRestrictionValidator)
    • getTransactionManager

      protected org.springframework.transaction.PlatformTransactionManager getTransactionManager()
    • setTransactionManager

      public void setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
    • getValidatorErrorFactory

      protected ErrorFactory getValidatorErrorFactory()
    • setValidatorErrorFactory

      public void setValidatorErrorFactory(ErrorFactory validatorErrorFactory)