Interface PageFacade
- All Known Implementing Classes:
DefaultPageFacade
public interface PageFacade
Component facade interface which deals with methods related to page operations.
-
Method Summary
Modifier and TypeMethodDescriptionfindAllPageDataForType(String pageType, SearchPageData searchPageData) Find all pages.Deprecated, for removal: This API element is subject to removal in a future version.since 6.6.Find all page types.findFallbackPages(String pageId) Find all default pages for a given page.findPagesByType(String typeCode, Boolean isDefaultPage) Deprecated, for removal: This API element is subject to removal in a future version.since 6.6.findVariationPages(String pageId) Find all variant pages for a given page.getPageByUid(String uid) Deprecated, for removal: This API element is subject to removal in a future version.since 6.6.getPageData(String pageId) ReturnsAbstractPageDataobject based on the pageId.getPageData(String pageType, String pageLabelOrId, String code) ReturnsAbstractPageDataobject based on pageLabelOrId or code.performOperation(String pageId, CMSPageOperationsData cmsPageOperationData) Performs different operations defined byCMSPageOperationon the page such as trash page.
-
Method Details
-
findAllPages
Deprecated, for removal: This API element is subject to removal in a future version.since 6.6. Please useCMSItemFacade.findCMSItems(de.hybris.platform.cmsfacades.data.CMSItemSearchData, PageableData)instead.Find all pages.- Returns:
- list of
AbstractPageDataordered by title ascending; never null
-
findAllPageTypes
List<PageTypeData> findAllPageTypes()Find all page types.- Returns:
- list of all
PageTypeData; nevernull
-
findPagesByType
@Deprecated(since="6.6", forRemoval=true) List<AbstractPageData> findPagesByType(String typeCode, Boolean isDefaultPage) Deprecated, for removal: This API element is subject to removal in a future version.since 6.6. Please useCMSItemFacade.findCMSItems(de.hybris.platform.cmsfacades.data.CMSItemSearchData, PageableData)instead.Find all default or variant pages for a given page type.- Parameters:
typeCode- - the page typecodeisDefaultPage- - set to true to find all default pages; set to false to find all variant pages- Returns:
- list of default or variant
AbstractPageDataordered by name ascending; never null
-
findVariationPages
Find all variant pages for a given page.- 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
Find all default pages for a given page.- 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) AbstractPageData getPageByUid(String uid) throws CMSItemNotFoundException Deprecated, for removal: This API element is subject to removal in a future version.since 6.6. Please useCMSItemFacade.getCMSItemByUuid(String)instead.Find a single page by its uid. This should be used for management purposes.- 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
-
getPageData
AbstractPageData getPageData(String pageType, String pageLabelOrId, String code) throws CMSItemNotFoundException ReturnsAbstractPageDataobject based on pageLabelOrId or code. This should be used for rendering purposes.- Parameters:
pageType- the page typepageLabelOrId- 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
AbstractPageDataobject - Throws:
CMSItemNotFoundException- when the page does not exists
-
getPageData
ReturnsAbstractPageDataobject based on the pageId. This should be used for rendering purposes.- Parameters:
pageId- the page id- Returns:
- the
AbstractPageDataobject - Throws:
CMSItemNotFoundException- when the page does not exists
-
findAllPageDataForType
SearchPageData<AbstractPageData> findAllPageDataForType(String pageType, SearchPageData searchPageData) Find all pages. The result is paginated. This should be used for rendering purposes.- Parameters:
pageType- the page type codesearchPageData- the pagination and sorting information- Returns:
- a search result containing a list of
AbstractPageData; can be empty, neverNULL
-
performOperation
CMSPageOperationsData performOperation(String pageId, CMSPageOperationsData cmsPageOperationData) throws CMSItemNotFoundException Performs different operations defined byCMSPageOperationon the page such as trash page.- Parameters:
pageId- The uid of the page.cmsPageOperationData- TheCMSPageOperationsDatacontaining the data to perform the operation.- Returns:
- The
CMSPageOperationsDataif the operation is successful. - Throws:
CMSItemNotFoundException- when the page does not exists
-