Class DefaultPageFacade

  • All Implemented Interfaces:
    PageFacade

    public class DefaultPageFacade
    extends java.lang.Object
    implements PageFacade
    Default implementation of PageFacade.
    • Constructor Detail

      • DefaultPageFacade

        public DefaultPageFacade()
    • Method Detail

      • getPageData

        public AbstractPageData getPageData​(java.lang.String pageType,
                                            java.lang.String pageLabelOrId,
                                            java.lang.String code)
                                     throws CMSItemNotFoundException
        Description copied from interface: PageFacade
        Returns AbstractPageData object based on pageLabelOrId or code. This should be used for rendering purposes.
        Specified by:
        getPageData in interface PageFacade
        Parameters:
        pageType - the page type
        pageLabelOrId - the page label or id. This field is used only when the page type is ContentPage.
        code - the code depends on the page type. If the page type is ProductPage then the code should be a product code. If the page type is CategoryPage then the code should be a category code. If the page type is CatalogPage then the code should be a catalog page.
        Returns:
        the AbstractPageData object
        Throws:
        CMSItemNotFoundException - when the page does not exists
      • findAllPageDataForType

        public SearchPageData<AbstractPageData> findAllPageDataForType​(java.lang.String pageType,
                                                                       SearchPageData searchPageData)
        Description copied from interface: PageFacade
        Find all pages. The result is paginated. This should be used for rendering purposes.
        Specified by:
        findAllPageDataForType in interface PageFacade
        Parameters:
        pageType - the page type code
        searchPageData - the pagination and sorting information
        Returns:
        a search result containing a list of AbstractPageData; can be empty, never NULL
      • findAllPages

        @Deprecated(since="6.6",
                    forRemoval=true)
        public java.util.List<AbstractPageData> findAllPages()
        Deprecated, for removal: This API element is subject to removal in a future version.
        since 6.6
        Find all pages.
        Specified by:
        findAllPages in interface PageFacade
        Returns:
        list of AbstractPageData ordered by title ascending; never null
      • findPagesByType

        @Deprecated(since="6.6",
                    forRemoval=true)
        public java.util.List<AbstractPageData> findPagesByType​(java.lang.String typeCode,
                                                                java.lang.Boolean isDefaultPage)
        Deprecated, for removal: This API element is subject to removal in a future version.
        since 6.6
        Find all default or variant pages for a given page type.
        Specified by:
        findPagesByType in interface PageFacade
        Parameters:
        typeCode - - the page typecode
        isDefaultPage - - set to true to find all default pages; set to false to find all variant pages
        Returns:
        list of default or variant AbstractPageData ordered by name ascending; never null
      • findVariationPages

        public java.util.List<java.lang.String> findVariationPages​(java.lang.String pageId)
                                                            throws CMSItemNotFoundException
        Find all variant pages for a given page.
        Specified by:
        findVariationPages in interface PageFacade
        Parameters:
        pageId - - the page identifier
        Returns:
        list of variation page uids; empty if the given page is already a variation page; never null
        Throws:
        CMSItemNotFoundException - when the page could not be found
      • findFallbackPages

        public java.util.List<java.lang.String> findFallbackPages​(java.lang.String pageId)
                                                           throws CMSItemNotFoundException
        Find all default pages for a given page.
        Specified by:
        findFallbackPages in interface PageFacade
        Parameters:
        pageId - - the page identifier
        Returns:
        list of default page uids; empty if the given page is already a default page; never null
        Throws:
        CMSItemNotFoundException - when the page could not be found
      • getPageByUid

        @Deprecated(since="6.6",
                    forRemoval=true)
        public AbstractPageData getPageByUid​(java.lang.String uid)
                                      throws CMSItemNotFoundException
        Deprecated, for removal: This API element is subject to removal in a future version.
        since 6.6
        Find a single page by its uid. This should be used for management purposes.
        Specified by:
        getPageByUid in interface PageFacade
        Parameters:
        uid - - the uid of the page to retrieve.
        Returns:
        the page matching the given uid
        Throws:
        CMSItemNotFoundException - when the page could not be found
      • setAdminPageService

        public void setAdminPageService​(CMSAdminPageService adminPageService)
      • setFacadeValidationService

        public void setFacadeValidationService​(FacadeValidationService facadeValidationService)
      • setPageDataPopulatorFactory

        @Deprecated(since="6.6",
                    forRemoval=true)
        public void setPageDataPopulatorFactory​(java.util.Map<java.lang.Class<?>,​AbstractPopulatingConverter<AbstractPageData,​AbstractPageModel>> pageDataPopulatorFactory)
        Deprecated, for removal: This API element is subject to removal in a future version.
        since 6.6
      • setPageModelConverterFactory

        @Deprecated(since="6.6",
                    forRemoval=true)
        public void setPageModelConverterFactory​(java.util.Map<java.lang.Class<?>,​AbstractPopulatingConverter<AbstractPageModel,​AbstractPageData>> pageModelConverterFactory)
        Deprecated, for removal: This API element is subject to removal in a future version.
        since 6.6
      • setPageTypeModelConverter

        @Deprecated(since="6.6")
        public void setPageTypeModelConverter​(Converter<CMSPageTypeModel,​PageTypeData> pageTypeModelConverter)
        Deprecated.
        since 6.6
      • getCmsFindVariationPageValidator

        protected org.springframework.validation.Validator getCmsFindVariationPageValidator()
      • setCmsFindVariationPageValidator

        @Deprecated(since="6.6",
                    forRemoval=true)
        public void setCmsFindVariationPageValidator​(org.springframework.validation.Validator cmsFindVariationPageValidator)
        Deprecated, for removal: This API element is subject to removal in a future version.
        since 6.6
      • getCmsPageComparator

        protected java.util.Comparator<AbstractPageData> getCmsPageComparator()
      • setCmsPageComparator

        public void setCmsPageComparator​(java.util.Comparator<AbstractPageData> cmsPageComparator)
      • getCmsItemSearchTypeBlacklistMap

        protected java.util.Map<java.lang.String,​java.util.List<java.lang.String>> getCmsItemSearchTypeBlacklistMap()
      • setUniqueItemIdentifierService

        public void setUniqueItemIdentifierService​(UniqueItemIdentifierService uniqueItemIdentifierService)
      • setCmsItemSearchTypeBlacklistMap

        public void setCmsItemSearchTypeBlacklistMap​(java.util.Map<java.lang.String,​java.util.List<java.lang.String>> cmsItemSearchTypeBlacklistMap)
      • setPageRenderingService

        public void setPageRenderingService​(PageRenderingService pageRenderingService)
      • setCatalogVersionService

        public void setCatalogVersionService​(CatalogVersionService catalogVersionService)
      • setPermissionCachedCRUDService

        public void setPermissionCachedCRUDService​(PermissionCachedCRUDService permissionCachedCRUDService)