Interface CMSPageService
-
- All Known Subinterfaces:
VendorCMSPageService
- All Known Implementing Classes:
DefaultCMSPageService,DefaultVendorCMSPageService
public interface CMSPageServiceThe Interface CMSPageService. Provides methods for managing pages or page templates.- Spring Bean ID:
- cmsPageService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description SearchPageData<AbstractPageModel>findAllPages(java.lang.String typeCode, SearchPageData searchPageData)Find all pages.java.util.Collection<PageTemplateModel>getAllActivePageTemplates()Gets the all active page templates.java.util.Collection<ContentPageModel>getAllContentPages()Deprecated, for removal: This API element is subject to removal in a future version.since 1905, no longer neededContentSlotDatagetContentSlotForPage(AbstractPageModel page, java.lang.String position)Returns a contentslot for the given page and position.ContentSlotDatagetContentSlotForPage(AbstractPageModel page, java.lang.String position, PagePreviewCriteriaData pagePreviewCriteria)Deprecated, for removal: This API element is subject to removal in a future version.since 2105, no longer needed.java.util.Collection<ContentSlotForPageModel>getContentSlotModelsForPage(AbstractPageModel page, PagePreviewCriteriaData pagePreviewCriteria)Deprecated, for removal: This API element is subject to removal in a future version.since 2105, no longer needed.java.util.Collection<ContentSlotData>getContentSlotsForPage(AbstractPageModel page)Returns collection ofContentSlotDataobjects containing data taken from allContentSlotForPageModelobjects as well fromContentSlotForTemplateModelobjects for passed as parameterAbstractPageModelobject.java.util.Collection<ContentSlotData>getContentSlotsForPage(AbstractPageModel page, PagePreviewCriteriaData pagePreviewCriteria)Returns collection ofContentSlotDataobjects containing data taken from allContentSlotForPageModelobjects as well fromContentSlotForTemplateModelobjects for a givenAbstractPageModelandPagePreviewCriteriaData.java.util.Collection<ContentSlotForTemplateModel>getContentSlotsForPageTemplate(PageTemplateModel pageTemplate)Gets allContentSlotForTemplateModelobjects related to passed as parameterPageTemplateModel.CatalogPageModelgetDefaultCatalogPage()Returns the default catalog page WITHOUT evaluating any restrictionsCategoryPageModelgetDefaultCategoryPage()Returns the default category page WITHOUT evaluating any restrictionsContentPageModelgetDefaultPageForLabel(java.lang.String label, CatalogVersionModel version)Deprecated, for removal: This API element is subject to removal in a future version.since 1905, please useCMSContentPageService.getDefaultPageForLabel(String, CatalogVersionModel)insteadProductPageModelgetDefaultProductPage()Returns the default product page WITHOUT evaluating any restrictionsjava.lang.StringgetFrontendTemplateName(PageTemplateModel template)Gets the frontend template name forPageTemplateModelobject.ContentPageModelgetHomepage()Deprecated, for removal: This API element is subject to removal in a future version.since 1905, please useCMSContentPageService.getHomepage()insteadContentPageModelgetHomepage(PagePreviewCriteriaData pagePreviewCriteria)Deprecated, for removal: This API element is subject to removal in a future version.since 1905, please useCMSContentPageService.getHomepage(PagePreviewCriteriaData)insteadjava.lang.StringgetLabelOrId(ContentPageModel contentPage)Deprecated, for removal: This API element is subject to removal in a future version.since 1905, no longer neededjava.util.Collection<ContentSlotForPageModel>getOwnContentSlotsForPage(AbstractPageModel page)Returns theContentSlotForPageModelobjects for passed as parameterAbstractPageModelobject.CatalogPageModelgetPageForCatalog(CatalogModel catalog)Gets the page by catalog.CatalogPageModelgetPageForCatalogId(java.lang.String catalogId)Gets the page for catalog id.CategoryPageModelgetPageForCategory(CategoryModel category)Gets the page for category.CategoryPageModelgetPageForCategory(CategoryModel category, PagePreviewCriteriaData pagePreviewCriteria)Gets the page for category andPagePreviewCriteriaData.CategoryPageModelgetPageForCategoryCode(java.lang.String categoryCode)Gets the page for category code.CategoryPageModelgetPageForCategoryCode(java.lang.String categoryCode, PagePreviewCriteriaData pagePreviewCriteria)Gets the page for category code andPagePreviewCriteriaData.AbstractPageModelgetPageForId(java.lang.String id)Gets the page for id.AbstractPageModelgetPageForId(java.lang.String id, PagePreviewCriteriaData pagePreviewCriteria)Gets the page for id andPagePreviewCriteriaData.AbstractPageModelgetPageForIdWithRestrictions(java.lang.String id)Deprecated, for removal: This API element is subject to removal in a future version.since 1905, no longer neededContentPageModelgetPageForLabel(java.lang.String label)Deprecated, for removal: This API element is subject to removal in a future version.since 1905, please useCMSContentPageService.getPageForLabelAndStatuses(String, List)insteadContentPageModelgetPageForLabel(java.lang.String label, PagePreviewCriteriaData pagePreviewCriteria)Deprecated, for removal: This API element is subject to removal in a future version.since 1905, please useCMSContentPageService.getPageForLabelAndPreview(String, PagePreviewCriteriaData)insteadContentPageModelgetPageForLabelAndPageStatuses(java.lang.String label, java.util.List<CmsPageStatus> pageStatuses)Deprecated, for removal: This API element is subject to removal in a future version.since 1905, please useCMSContentPageService.getPageForLabelAndStatuses(String, List)insteadContentPageModelgetPageForLabelOrId(java.lang.String labelOrId)Deprecated, for removal: This API element is subject to removal in a future version.since 1905, please useCMSContentPageService.getPageForLabelOrIdAndMatchType(String, boolean)insteadContentPageModelgetPageForLabelOrId(java.lang.String labelOrId, PagePreviewCriteriaData pagePreviewCriteria)Deprecated, for removal: This API element is subject to removal in a future version.since 1905, please useCMSContentPageService.getPageForLabelOrIdAndMatchType(String, PagePreviewCriteriaData, boolean)insteadProductPageModelgetPageForProduct(ProductModel product)Gets the page for product.ProductPageModelgetPageForProduct(ProductModel product, PagePreviewCriteriaData pagePreviewCriteria)Gets the page for product andPagePreviewCriteriaData.ProductPageModelgetPageForProductCode(java.lang.String productCode)Gets the page for product code.ProductPageModelgetPageForProductCode(java.lang.String productCode, PagePreviewCriteriaData pagePreviewCriteria)Gets the page for product code andPagePreviewCriteriaData.java.util.Collection<AbstractPageModel>getPagesForComponent(AbstractCMSComponentModel component)Returns all pages where given component occurs.java.util.Collection<AbstractPageModel>getPagesForContentSlots(java.util.Collection<ContentSlotModel> contentSlots)Returns all pages where given content slots occurs.java.util.Collection<AbstractPageModel>getPagesForPageTemplateComponent(AbstractCMSComponentModel component)Gets the pages for page template component.java.util.Collection<AbstractPageModel>getPagesForPageTemplateContentSlots(java.util.Collection<ContentSlotModel> contentSlots)Gets the pages for page template content slots.java.util.List<ContentSlotModel>getSortedMultiCountryContentSlots(java.util.List<ContentSlotModel> contentSlots, java.util.List<CatalogVersionModel> catalogVersions)Deprecated, for removal: This API element is subject to removal in a future version.since 2105, please usegetSortedMultiCountryContentSlots(List, List, AbstractPageModel)java.util.List<ContentSlotModel>getSortedMultiCountryContentSlots(java.util.List<ContentSlotModel> contentSlots, java.util.List<CatalogVersionModel> catalogVersions, AbstractPageModel page)Gets the content slots sorted by their catalog hierarchy.
-
-
-
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 neededGets the all content pages.- Returns:
- the all content pages
-
getOwnContentSlotsForPage
java.util.Collection<ContentSlotForPageModel> getOwnContentSlotsForPage(AbstractPageModel page)
Returns theContentSlotForPageModelobjects for passed as parameterAbstractPageModelobject.- Parameters:
page- theAbstractPageModelobject.- Returns:
- collection of
ContentSlotForPageModelobjects related toAbstractPageModel.
-
getContentSlotModelsForPage
@Deprecated(since="2105", forRemoval=true) java.util.Collection<ContentSlotForPageModel> getContentSlotModelsForPage(AbstractPageModel page, PagePreviewCriteriaData pagePreviewCriteria)Deprecated, for removal: This API element is subject to removal in a future version.since 2105, no longer needed.Returns theContentSlotForPageModelobjects for passed as parameterAbstractPageModelobject andPagePreviewCriteriaData.- Parameters:
page- theAbstractPageModelobject.pagePreviewCriteria- thePagePreviewCriteriaDataobject.- Returns:
- collection of
ContentSlotForPageModelobjects related toAbstractPageModel.
-
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 modelposition- 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
@Deprecated(since="2105", forRemoval=true) ContentSlotData getContentSlotForPage(AbstractPageModel page, java.lang.String position, PagePreviewCriteriaData pagePreviewCriteria) throws CMSItemNotFoundExceptionDeprecated, for removal: This API element is subject to removal in a future version.since 2105, no longer needed.Returns a contentslot for the given page, position andPagePreviewCriteriaData. 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 modelposition- the positionpagePreviewCriteria- thePagePreviewCriteriaDataobject.- 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 ofContentSlotDataobjects containing data taken from allContentSlotForPageModelobjects as well fromContentSlotForTemplateModelobjects for passed as parameterAbstractPageModelobject.- Parameters:
page- theAbstractPageModelobject.- Returns:
- collection of
ContentSlotDataobjects.
-
getContentSlotsForPage
java.util.Collection<ContentSlotData> getContentSlotsForPage(AbstractPageModel page, PagePreviewCriteriaData pagePreviewCriteria)
Returns collection ofContentSlotDataobjects containing data taken from allContentSlotForPageModelobjects as well fromContentSlotForTemplateModelobjects for a givenAbstractPageModelandPagePreviewCriteriaData.- Parameters:
page- theAbstractPageModelobject.pagePreviewCriteria- thePagePreviewCriteriaDataobject.- Returns:
- collection of
ContentSlotDataobjects.
-
getContentSlotsForPageTemplate
java.util.Collection<ContentSlotForTemplateModel> getContentSlotsForPageTemplate(PageTemplateModel pageTemplate)
Gets allContentSlotForTemplateModelobjects related to passed as parameterPageTemplateModel.- Parameters:
pageTemplate- thePageTemplateModelobject for which search will be executed.- Returns:
- the list of found
ContentSlotForTemplateModelobjects.
-
getDefaultCatalogPage
CatalogPageModel getDefaultCatalogPage() throws CMSItemNotFoundException
Returns the default catalog page WITHOUT evaluating any restrictions- Returns:
- default catalog page
- Throws:
CMSItemNotFoundException- if no default catalog page could be found
-
getDefaultCategoryPage
CategoryPageModel getDefaultCategoryPage() throws CMSItemNotFoundException
Returns the default category page WITHOUT evaluating any restrictions- Returns:
- default category page
- Throws:
CMSItemNotFoundException- if no default category page could be found
-
getDefaultPageForLabel
@Deprecated(since="1905", forRemoval=true) ContentPageModel getDefaultPageForLabel(java.lang.String label, CatalogVersionModel version) throws CMSItemNotFoundExceptionDeprecated, for removal: This API element is subject to removal in a future version.since 1905, please useCMSContentPageService.getDefaultPageForLabel(String, CatalogVersionModel)insteadGets the default page by label and catalog version.- Parameters:
label- the labelversion- the version- Returns:
- the default page by label
- Throws:
CMSItemNotFoundException- thrown when item was not found
-
getDefaultProductPage
ProductPageModel getDefaultProductPage() throws CMSItemNotFoundException
Returns the default product page WITHOUT evaluating any restrictions- Returns:
- default product page
- Throws:
CMSItemNotFoundException- if no default product page could be found
-
getFrontendTemplateName
java.lang.String getFrontendTemplateName(PageTemplateModel template)
Gets the frontend template name forPageTemplateModelobject.- Parameters:
template- thePageTemplateModelobject.- 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 useCMSContentPageService.getHomepage()insteadGets the homepage- Returns:
- the homepage model
-
getHomepage
@Deprecated(since="1905", forRemoval=true) ContentPageModel getHomepage(PagePreviewCriteriaData pagePreviewCriteria)Deprecated, for removal: This API element is subject to removal in a future version.since 1905, please useCMSContentPageService.getHomepage(PagePreviewCriteriaData)insteadReturns homepage forPagePreviewCriteriaData.- Parameters:
pagePreviewCriteria- thePagePreviewCriteriaDataobject.- 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 neededGets theContentPageModellabel or id if label is empty.- Parameters:
contentPage- theContentPageModelobject.- Returns:
- the label or id of
ContentPageModel.
-
getPageForCatalog
CatalogPageModel getPageForCatalog(CatalogModel catalog) throws CMSItemNotFoundException
Gets the page by catalog.- Parameters:
catalog- the catalog- Returns:
- the page by catalog
- Throws:
CMSItemNotFoundException- thrown when item was not found
-
getPageForCatalogId
CatalogPageModel getPageForCatalogId(java.lang.String catalogId) throws CMSItemNotFoundException
Gets the page for catalog id.- Parameters:
catalogId- the catalog id- Returns:
- the page for catalog id
- Throws:
CMSItemNotFoundException- thrown when item was not found
-
getPageForCategory
CategoryPageModel getPageForCategory(CategoryModel category) throws CMSItemNotFoundException
Gets the page for category.- Parameters:
category- the category- Returns:
- the page for category
- Throws:
CMSItemNotFoundException- thrown when item was not found
-
getPageForCategory
CategoryPageModel getPageForCategory(CategoryModel category, PagePreviewCriteriaData pagePreviewCriteria) throws CMSItemNotFoundException
Gets the page for category andPagePreviewCriteriaData.- Parameters:
category- the categorypagePreviewCriteria- thePagePreviewCriteriaDataobject.- Returns:
- the page for category
- Throws:
CMSItemNotFoundException- thrown when item is not found
-
getPageForCategoryCode
CategoryPageModel getPageForCategoryCode(java.lang.String categoryCode) throws CMSItemNotFoundException
Gets the page for category code.- Parameters:
categoryCode- the category code- Returns:
- the page for category code
- Throws:
CMSItemNotFoundException- thrown when item was not found
-
getPageForCategoryCode
CategoryPageModel getPageForCategoryCode(java.lang.String categoryCode, PagePreviewCriteriaData pagePreviewCriteria) throws CMSItemNotFoundException
Gets the page for category code andPagePreviewCriteriaData.- Parameters:
categoryCode- the category codepagePreviewCriteria- thePagePreviewCriteriaDataobject.- Returns:
- the page for category code
- Throws:
CMSItemNotFoundException- thrown when item is not found
-
getPageForId
AbstractPageModel getPageForId(java.lang.String id) throws CMSItemNotFoundException
Gets the page for id.- Parameters:
id- the id- Returns:
- the page for id
- Throws:
CMSItemNotFoundException- thrown when item was not found
-
getPageForIdWithRestrictions
@Deprecated(since="1905", forRemoval=true) AbstractPageModel getPageForIdWithRestrictions(java.lang.String id) throws CMSItemNotFoundExceptionDeprecated, for removal: This API element is subject to removal in a future version.since 1905, no longer neededGets 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
-
getPageForId
AbstractPageModel getPageForId(java.lang.String id, PagePreviewCriteriaData pagePreviewCriteria) throws CMSItemNotFoundException
Gets the page for id andPagePreviewCriteriaData.- Parameters:
id- the idpagePreviewCriteria- thePagePreviewCriteriaDataobject.- Returns:
- the page for id
- Throws:
CMSItemNotFoundException- thrown when item is not found
-
getPageForLabel
@Deprecated(since="1905", forRemoval=true) ContentPageModel getPageForLabel(java.lang.String label) throws CMSItemNotFoundExceptionDeprecated, for removal: This API element is subject to removal in a future version.since 1905, please useCMSContentPageService.getPageForLabelAndStatuses(String, List)insteadGets the page for label.- Parameters:
label- the label- Returns:
- the page for label
- Throws:
CMSItemNotFoundException- thrown when item was not found
-
getPageForLabel
@Deprecated(since="1905", forRemoval=true) ContentPageModel getPageForLabel(java.lang.String label, PagePreviewCriteriaData pagePreviewCriteria) throws CMSItemNotFoundExceptionDeprecated, for removal: This API element is subject to removal in a future version.since 1905, please useCMSContentPageService.getPageForLabelAndPreview(String, PagePreviewCriteriaData)insteadGets the page for label andPagePreviewCriteriaData.- Parameters:
label- the labelpagePreviewCriteria- thePagePreviewCriteriaDataobject.- Returns:
- the page for label
- Throws:
CMSItemNotFoundException- thrown when item is not found
-
getPageForLabelAndPageStatuses
@Deprecated(since="1905", forRemoval=true) ContentPageModel getPageForLabelAndPageStatuses(java.lang.String label, java.util.List<CmsPageStatus> pageStatuses) throws CMSItemNotFoundExceptionDeprecated, for removal: This API element is subject to removal in a future version.since 1905, please useCMSContentPageService.getPageForLabelAndStatuses(String, List)insteadGets the page for label by page status.- Parameters:
label- the labelpageStatuses- the page statuses. i.e. (deleted, active)- Returns:
- the page for label
- Throws:
CMSItemNotFoundException- thrown when item was not found
-
getPageForLabelOrId
@Deprecated(since="1905", forRemoval=true) ContentPageModel getPageForLabelOrId(java.lang.String labelOrId) throws CMSItemNotFoundExceptionDeprecated, for removal: This API element is subject to removal in a future version.since 1905, please useCMSContentPageService.getPageForLabelOrIdAndMatchType(String, boolean)insteadGets the page for label or id.- Parameters:
labelOrId- the label or id- Returns:
- the page for label or id
- Throws:
CMSItemNotFoundException- thrown when item was not found
-
getPageForLabelOrId
@Deprecated(since="1905", forRemoval=true) ContentPageModel getPageForLabelOrId(java.lang.String labelOrId, PagePreviewCriteriaData pagePreviewCriteria) throws CMSItemNotFoundExceptionDeprecated, for removal: This API element is subject to removal in a future version.since 1905, please useCMSContentPageService.getPageForLabelOrIdAndMatchType(String, PagePreviewCriteriaData, boolean)insteadGets the page for label or id andPagePreviewCriteriaData.- Parameters:
labelOrId- the label or idpagePreviewCriteria- thePagePreviewCriteriaDataobject.- Returns:
- the page for label or id
- Throws:
CMSItemNotFoundException- thrown when item is not found
-
getPageForProduct
ProductPageModel getPageForProduct(ProductModel product) throws CMSItemNotFoundException
Gets the page for product.- Parameters:
product- the product- Returns:
- the page for product
- Throws:
CMSItemNotFoundException- thrown when item was not found
-
getPageForProduct
ProductPageModel getPageForProduct(ProductModel product, PagePreviewCriteriaData pagePreviewCriteria) throws CMSItemNotFoundException
Gets the page for product andPagePreviewCriteriaData.- Parameters:
product- the productpagePreviewCriteria- thePagePreviewCriteriaDataobject.- Returns:
- the page for product
- Throws:
CMSItemNotFoundException- thrown when item is not found
-
getPageForProductCode
ProductPageModel getPageForProductCode(java.lang.String productCode) throws CMSItemNotFoundException
Gets the page for product code.- Parameters:
productCode- the product code- Returns:
- the page for product code
- 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 andPagePreviewCriteriaData.- Parameters:
productCode- the product codepagePreviewCriteria- thePagePreviewCriteriaDataobject.- 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
@Deprecated(since="2105", forRemoval=true) java.util.List<ContentSlotModel> getSortedMultiCountryContentSlots(java.util.List<ContentSlotModel> contentSlots, java.util.List<CatalogVersionModel> catalogVersions)Deprecated, for removal: This API element is subject to removal in a future version.since 2105, please usegetSortedMultiCountryContentSlots(List, List, AbstractPageModel)Gets the content slots sorted by their catalog hierarchy.- Parameters:
contentSlots- - the content slotscatalogVersions- - the catalog versions- Returns:
- a sorted list of content slots
-
getSortedMultiCountryContentSlots
java.util.List<ContentSlotModel> getSortedMultiCountryContentSlots(java.util.List<ContentSlotModel> contentSlots, java.util.List<CatalogVersionModel> catalogVersions, AbstractPageModel page)
Gets the content slots sorted by their catalog hierarchy.- Parameters:
contentSlots- - the content slotscatalogVersions- - the catalog versionspage- - original page- Returns:
- a sorted list of
ContentSlotModel, empty list of not found.
-
findAllPages
SearchPageData<AbstractPageModel> findAllPages(java.lang.String typeCode, SearchPageData searchPageData)
Find all pages. The result is paginated.- Parameters:
typeCode- the page type codesearchPageData- the pagination and sorting information- Returns:
- a search result containing a list of
AbstractPageModel; can be empty, neverNULL
-
-