Interface CMSContentPageService
-
- All Known Implementing Classes:
DefaultCMSContentPageService
public interface CMSContentPageService
Provides methods for managing content pages.- Spring Bean ID:
- cmsContentPageService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<java.lang.String>
findLabelVariations(java.lang.String label, boolean exactLabelMatch)
Find possible variations of the provided label by splitting the sections using the slash as delimiter.ContentPageModel
getDefaultPageForLabel(java.lang.String label, CatalogVersionModel version)
Gets the default page by label and catalog version.ContentPageModel
getHomepage()
Gets the homepageContentPageModel
getHomepage(PagePreviewCriteriaData pagePreviewCriteria)
Returns homepage forPagePreviewCriteriaData
.ContentPageModel
getPageForLabelAndPreview(java.lang.String label, PagePreviewCriteriaData pagePreviewCriteria)
Gets the page for label andPagePreviewCriteriaData
.ContentPageModel
getPageForLabelAndStatuses(java.lang.String label, java.util.List<CmsPageStatus> pageStatuses)
Gets the page for label by page status.ContentPageModel
getPageForLabelOrIdAndMatchType(java.lang.String labelOrId, boolean exactLabelMatch)
Gets the page for label or id.ContentPageModel
getPageForLabelOrIdAndMatchType(java.lang.String labelOrId, PagePreviewCriteriaData pagePreviewCriteria, boolean exactLabelMatch)
Gets the page matching the provided for label or id filtered by thePagePreviewCriteriaData
information.
-
-
-
Method Detail
-
getDefaultPageForLabel
ContentPageModel getDefaultPageForLabel(java.lang.String label, CatalogVersionModel version) throws CMSItemNotFoundException
Gets 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
-
getHomepage
ContentPageModel getHomepage()
Gets the homepage- Returns:
- the homepage model
-
getHomepage
ContentPageModel getHomepage(PagePreviewCriteriaData pagePreviewCriteria)
Returns homepage forPagePreviewCriteriaData
.- Parameters:
pagePreviewCriteria
- thePagePreviewCriteriaData
object.- Returns:
- the homepage model
-
getPageForLabelAndPreview
ContentPageModel getPageForLabelAndPreview(java.lang.String label, PagePreviewCriteriaData pagePreviewCriteria) throws CMSItemNotFoundException
Gets the page for label andPagePreviewCriteriaData
.- Parameters:
label
- the labelpagePreviewCriteria
- thePagePreviewCriteriaData
object.- Returns:
- the page for label
- Throws:
CMSItemNotFoundException
- thrown when item is not found
-
getPageForLabelAndStatuses
ContentPageModel getPageForLabelAndStatuses(java.lang.String label, java.util.List<CmsPageStatus> pageStatuses) throws CMSItemNotFoundException
Gets 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
-
getPageForLabelOrIdAndMatchType
ContentPageModel getPageForLabelOrIdAndMatchType(java.lang.String labelOrId, boolean exactLabelMatch) throws CMSItemNotFoundException
Gets the page for label or id. WhenexactLabelMatch
isTRUE
, the page is found by matching exactly the providedlabelOrId
. Otherwise, the page containing a label that closely matches the providedlabelOrId
is returned instead.- Parameters:
labelOrId
- the label or idexactLabelMatch
- determines if the label of the result page should exactly match the provided labelOrId or not.- Returns:
- the page for label or id
- Throws:
CMSItemNotFoundException
- thrown when page was not found
-
getPageForLabelOrIdAndMatchType
ContentPageModel getPageForLabelOrIdAndMatchType(java.lang.String labelOrId, PagePreviewCriteriaData pagePreviewCriteria, boolean exactLabelMatch) throws CMSItemNotFoundException
Gets the page matching the provided for label or id filtered by thePagePreviewCriteriaData
information. WhenexactLabelMatch
isTRUE
, the page is found by matching exactly the providedlabelOrId
. Otherwise, the page containing a label that closely matches the providedlabelOrId
is returned instead.- Parameters:
labelOrId
- the label or idpagePreviewCriteria
- thePagePreviewCriteriaData
object.exactLabelMatch
- determines if the label of the result page should exactly match the provided labelOrId or not.- Returns:
- the page matching the search criteria
- Throws:
CMSItemNotFoundException
- thrown when no page is found
-
findLabelVariations
java.util.List<java.lang.String> findLabelVariations(java.lang.String label, boolean exactLabelMatch)
Find possible variations of the provided label by splitting the sections using the slash as delimiter. The result list is sorted by the length of the label, starting with the longest label variation first. The result list also includes the provided label.- Parameters:
label
- the label from which the variations are generatedexactLabelMatch
- determines if the label of the result page should exactly match the provided label or not.- Returns:
- list of label variations, including the provided label
-
-