Interface CMSPageService

    • Method Detail

      • getAllActivePageTemplates

        java.util.Collection<PageTemplateModel> getAllActivePageTemplates()
        Gets the all active page templates.
        Returns:
        the all active page templates
      • getAllContentPages

        @Deprecated(since="1905",
                    forRemoval=true)
        java.util.Collection<ContentPageModel> getAllContentPages()
        Deprecated, for removal: This API element is subject to removal in a future version.
        since 1905, no longer needed
        Gets the all content pages.
        Returns:
        the all content pages
      • getOwnContentSlotsForPage

        java.util.Collection<ContentSlotForPageModel> getOwnContentSlotsForPage​(AbstractPageModel page)
        Returns the ContentSlotForPageModel objects for passed as parameter AbstractPageModel object.
        Parameters:
        page - the AbstractPageModel object.
        Returns:
        collection of ContentSlotForPageModel objects related to AbstractPageModel.
      • getContentSlotModelsForPage

        java.util.Collection<ContentSlotForPageModel> getContentSlotModelsForPage​(AbstractPageModel page,
                                                                                  PagePreviewCriteriaData pagePreviewCriteria)
        Returns the ContentSlotForPageModel objects for passed as parameter AbstractPageModel object and PagePreviewCriteriaData.
        Parameters:
        page - the AbstractPageModel object.
        pagePreviewCriteria - the PagePreviewCriteriaData object.
        Returns:
        collection of ContentSlotForPageModel objects related to AbstractPageModel.
      • getContentSlotForPage

        ContentSlotData getContentSlotForPage​(AbstractPageModel page,
                                              java.lang.String position)
                                       throws CMSItemNotFoundException
        Returns a contentslot for the given page and position. WARNING: This could be a performance issue when you select all content slots of a page via this method. A better way is to set all contentslots via getContentSlotsForPage(AbstractPageModel page) and set them in the request scope
        Parameters:
        page - the page model
        position - the position
        Returns:
        contentslot for the given page and position.
        Throws:
        CMSItemNotFoundException - if no content slot is defined at this position in that page
      • getContentSlotForPage

        ContentSlotData getContentSlotForPage​(AbstractPageModel page,
                                              java.lang.String position,
                                              PagePreviewCriteriaData pagePreviewCriteria)
                                       throws CMSItemNotFoundException
        Returns a contentslot for the given page, position and PagePreviewCriteriaData. WARNING: This could be a performance issue when you select all content slots of a page via this method. A better way is to set all contentslots via getContentSlotsForPage(AbstractPageModel page) and set them in the request scope
        Parameters:
        page - the page model
        position - the position
        pagePreviewCriteria - the PagePreviewCriteriaData object.
        Returns:
        contentslot for the given page and position.
        Throws:
        CMSItemNotFoundException - if no content slot is defined at this position in that page
      • getContentSlotsForPage

        java.util.Collection<ContentSlotData> getContentSlotsForPage​(AbstractPageModel page)
        Returns collection of ContentSlotData objects containing data taken from all ContentSlotForPageModel objects as well from ContentSlotForTemplateModel objects for passed as parameter AbstractPageModel object.
        Parameters:
        page - the AbstractPageModel object.
        Returns:
        collection of ContentSlotData objects.
      • getContentSlotsForPage

        java.util.Collection<ContentSlotData> getContentSlotsForPage​(AbstractPageModel page,
                                                                     PagePreviewCriteriaData pagePreviewCriteria)
        Returns collection of ContentSlotData objects containing data taken from all ContentSlotForPageModel objects as well from ContentSlotForTemplateModel objects for a given AbstractPageModel and PagePreviewCriteriaData.
        Parameters:
        page - the AbstractPageModel object.
        pagePreviewCriteria - the PagePreviewCriteriaData object.
        Returns:
        collection of ContentSlotData objects.
      • getContentSlotsForPageTemplate

        java.util.Collection<ContentSlotForTemplateModel> getContentSlotsForPageTemplate​(PageTemplateModel pageTemplate)
        Gets all ContentSlotForTemplateModel objects related to passed as parameter PageTemplateModel.
        Parameters:
        pageTemplate - the PageTemplateModel object for which search will be executed.
        Returns:
        the list of found ContentSlotForTemplateModel objects.
      • getFrontendTemplateName

        java.lang.String getFrontendTemplateName​(PageTemplateModel template)
        Gets the frontend template name for PageTemplateModel object.
        Parameters:
        template - the PageTemplateModel object.
        Returns:
        the frontend template name.
      • getHomepage

        @Deprecated(since="1905",
                    forRemoval=true)
        ContentPageModel getHomepage()
        Deprecated, for removal: This API element is subject to removal in a future version.
        since 1905, please use CMSContentPageService.getHomepage() instead
        Gets the homepage
        Returns:
        the homepage model
      • getLabelOrId

        @Deprecated(since="1905",
                    forRemoval=true)
        java.lang.String getLabelOrId​(ContentPageModel contentPage)
        Deprecated, for removal: This API element is subject to removal in a future version.
        since 1905, no longer needed
        Gets the ContentPageModel label or id if label is empty.
        Parameters:
        contentPage - the ContentPageModel object.
        Returns:
        the label or id of ContentPageModel.
      • getPageForCategoryCode

        CategoryPageModel getPageForCategoryCode​(java.lang.String categoryCode,
                                                 PagePreviewCriteriaData pagePreviewCriteria)
                                          throws CMSItemNotFoundException
        Gets the page for category code and PagePreviewCriteriaData.
        Parameters:
        categoryCode - the category code
        pagePreviewCriteria - the PagePreviewCriteriaData object.
        Returns:
        the page for category code
        Throws:
        CMSItemNotFoundException - thrown when item is not found
      • getPageForIdWithRestrictions

        @Deprecated(since="1905",
                    forRemoval=true)
        AbstractPageModel getPageForIdWithRestrictions​(java.lang.String id)
                                                throws CMSItemNotFoundException
        Deprecated, for removal: This API element is subject to removal in a future version.
        since 1905, no longer needed
        Gets the page for id and evaluates the page restrictions
        Parameters:
        id - the id
        Returns:
        the page for id
        Throws:
        CMSItemNotFoundException - thrown when item was not found
      • getPageForProductCode

        ProductPageModel getPageForProductCode​(java.lang.String productCode,
                                               PagePreviewCriteriaData pagePreviewCriteria)
                                        throws CMSItemNotFoundException
        Gets the page for product code and PagePreviewCriteriaData.
        Parameters:
        productCode - the product code
        pagePreviewCriteria - the PagePreviewCriteriaData object.
        Returns:
        the page for product code
        Throws:
        CMSItemNotFoundException - thrown when item is not found
      • getPagesForComponent

        java.util.Collection<AbstractPageModel> getPagesForComponent​(AbstractCMSComponentModel component)
        Returns all pages where given component occurs.
        Parameters:
        component - - component model that we are looking pages for
        Returns:
        - collection of AbstractPageModel
      • getPagesForContentSlots

        java.util.Collection<AbstractPageModel> getPagesForContentSlots​(java.util.Collection<ContentSlotModel> contentSlots)
        Returns all pages where given content slots occurs.
        Parameters:
        contentSlots - - content slot model that we are looking pages for
        Returns:
        - collection of AbstractPageModel
      • getPagesForPageTemplateComponent

        java.util.Collection<AbstractPageModel> getPagesForPageTemplateComponent​(AbstractCMSComponentModel component)
        Gets the pages for page template component.
        Parameters:
        component - the component
        Returns:
        the pages for page template component
      • getPagesForPageTemplateContentSlots

        java.util.Collection<AbstractPageModel> getPagesForPageTemplateContentSlots​(java.util.Collection<ContentSlotModel> contentSlots)
        Gets the pages for page template content slots.
        Parameters:
        contentSlots - the content slots
        Returns:
        the pages for page template content slots
      • getSortedMultiCountryContentSlots

        java.util.List<ContentSlotModel> getSortedMultiCountryContentSlots​(java.util.List<ContentSlotModel> contentSlots,
                                                                           java.util.List<CatalogVersionModel> catalogVersions)
        Gets the content slots sorted by their catalog hierarchy.
        Parameters:
        contentSlots - - the content slots
        catalogVersions - - the catalog versions
        Returns:
        a sorted list of content slots
      • findAllPages

        SearchPageData<AbstractPageModel> findAllPages​(java.lang.String typeCode,
                                                       SearchPageData searchPageData)
        Find all pages. The result is paginated.
        Parameters:
        typeCode - the page type code
        searchPageData - the pagination and sorting information
        Returns:
        a search result containing a list of AbstractPageData; can be empty, never NULL