Class RenderingContentPageModelSupplier
- java.lang.Object
-
- de.hybris.platform.cmsfacades.rendering.suppliers.page.impl.RenderingContentPageModelSupplier
-
- All Implemented Interfaces:
RenderingPageModelSupplier
public class RenderingContentPageModelSupplier extends java.lang.Object implements RenderingPageModelSupplier
Implementation ofRenderingPageModelSupplierfor Content page.
-
-
Constructor Summary
Constructors Constructor Description RenderingContentPageModelSupplier()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CMSContentPageServicegetCmsContentPageService()protected CMSPreviewServicegetCmsPreviewService()protected CMSSiteServicegetCmsSiteService()java.util.function.Predicate<java.lang.String>getConstrainedBy()Predicate to test if a given page type code matches the page supplier.protected java.util.Optional<AbstractPageModel>getContentPageModel(java.lang.String pageLabelOrId)ReturnsOptionalAbstractPageModelbased on pageLabelOrId.protected java.util.function.Supplier<java.util.Optional<ContentPageModel>>getCurrentCatalogHomePage()Returns a home page for the current catalog.protected java.util.Optional<CMSSiteModel>getCurrentSite()Returns current siteprotected java.util.function.Supplier<java.util.Optional<ContentPageModel>>getPageForLabelOrId(java.lang.String pageLabelOrId)Returns theOptionalpage by label or idjava.util.Optional<AbstractPageModel>getPageModel(java.lang.String pageLabelOrId)Returns the page by qualifier.java.util.Optional<RestrictionData>getRestrictionData(java.lang.String qualifier)Returns restriction data related to current page.protected java.lang.StringgetStartPageLabelOrId()Returns default page label or idvoidsetCmsContentPageService(CMSContentPageService cmsContentPageService)voidsetCmsPreviewService(CMSPreviewService cmsPreviewService)voidsetCmsSiteService(CMSSiteService cmsSiteService)voidsetConstrainedBy(java.util.function.Predicate<java.lang.String> constrainedBy)
-
-
-
Method Detail
-
getConstrainedBy
public java.util.function.Predicate<java.lang.String> getConstrainedBy()
Description copied from interface:RenderingPageModelSupplierPredicate to test if a given page type code matches the page supplier.Returns TRUE if the supplier exists; FALSE otherwise.
- Specified by:
getConstrainedByin interfaceRenderingPageModelSupplier
-
getPageModel
public java.util.Optional<AbstractPageModel> getPageModel(java.lang.String pageLabelOrId)
Description copied from interface:RenderingPageModelSupplierReturns the page by qualifier.- Specified by:
getPageModelin interfaceRenderingPageModelSupplier- Parameters:
pageLabelOrId- the qualifier of the page.- Returns:
OptionalAbstractPageModel
-
getRestrictionData
public java.util.Optional<RestrictionData> getRestrictionData(java.lang.String qualifier)
Description copied from interface:RenderingPageModelSupplierReturns restriction data related to current page.- Specified by:
getRestrictionDatain interfaceRenderingPageModelSupplier- Parameters:
qualifier- the qualifier of the page- Returns:
- the
OptionalRestrictionData
-
getContentPageModel
protected java.util.Optional<AbstractPageModel> getContentPageModel(java.lang.String pageLabelOrId)
ReturnsOptionalAbstractPageModelbased on pageLabelOrId. Extracts the page in the following order: - by label or id. - current catalog home page. - by default label or id- Parameters:
pageLabelOrId- the page label or id- Returns:
OptionalAbstractPageModelpage model
-
getPageForLabelOrId
protected java.util.function.Supplier<java.util.Optional<ContentPageModel>> getPageForLabelOrId(java.lang.String pageLabelOrId)
Returns theOptionalpage by label or id- Parameters:
pageLabelOrId-- Returns:
- the
OptionalAbstractPageModel
-
getStartPageLabelOrId
protected java.lang.String getStartPageLabelOrId()
Returns default page label or id- Returns:
- the page label or id
-
getCurrentCatalogHomePage
protected java.util.function.Supplier<java.util.Optional<ContentPageModel>> getCurrentCatalogHomePage()
Returns a home page for the current catalog.- Returns:
OptionalAbstractPageModel
-
getCurrentSite
protected java.util.Optional<CMSSiteModel> getCurrentSite()
Returns current site- Returns:
OptionalCMSSiteModel
-
setConstrainedBy
public void setConstrainedBy(java.util.function.Predicate<java.lang.String> constrainedBy)
-
getCmsContentPageService
protected CMSContentPageService getCmsContentPageService()
-
setCmsContentPageService
public void setCmsContentPageService(CMSContentPageService cmsContentPageService)
-
getCmsSiteService
protected CMSSiteService getCmsSiteService()
-
setCmsSiteService
public void setCmsSiteService(CMSSiteService cmsSiteService)
-
getCmsPreviewService
protected CMSPreviewService getCmsPreviewService()
-
setCmsPreviewService
public void setCmsPreviewService(CMSPreviewService cmsPreviewService)
-
-