Class ContentPageVariationResolver
java.lang.Object
de.hybris.platform.cmsfacades.pages.service.impl.ContentPageVariationResolver
- All Implemented Interfaces:
PageVariationResolver<ContentPageModel>
public class ContentPageVariationResolver
extends Object
implements PageVariationResolver<ContentPageModel>
Default implementation of the
PageVariationResolver. This is used for retrieving default and variation
pages.
A page is considered "default":
- when its defaultPage flag is set to TRUE or
- when no default page exists for a given page type and exactly one variation page that has no restrictions exists,
that variation page will be used as the default page.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcreateOptionData(String id, String label, List<OptionData> options) findDefaultPages(ContentPageModel pageModel) Find default page for a given page.protected List<ContentPageModel>findDefaultPages(List<ContentPageModel> contentPages) findDisplayConditions(String typeCode) Finds all display conditions available for a given page type.findPagesByType(String typeCode, boolean isDefaultPage) Find all default or variation pages for a given page type.protected Map<String,ContentPageModel> findUnrestrictedPages(List<ContentPageModel> contentPages) findVariationPages(ContentPageModel pageModel) Find variation pages for a given page.protected CMSAdminPageServiceprotected CMSAdminRestrictionServicebooleanisDefaultPage(ContentPageModel pageModel) Determines if a given page is a default page or a variation page.voidsetAdminPageService(CMSAdminPageService adminPageService) voidsetAdminRestrictionService(CMSAdminRestrictionService adminRestrictionService)
-
Constructor Details
-
ContentPageVariationResolver
public ContentPageVariationResolver()
-
-
Method Details
-
findPagesByType
Description copied from interface:PageVariationResolverFind all default or variation pages for a given page type.- Specified by:
findPagesByTypein interfacePageVariationResolver<ContentPageModel>- Parameters:
typeCode- the page typeisDefaultPage- true to retrieve default pages; false to retrieve variation pages- Returns:
- all default or variation pages
-
findDefaultPages
-
findUnrestrictedPages
-
findDefaultPages
Description copied from interface:PageVariationResolverFind default page for a given page.- Specified by:
findDefaultPagesin interfacePageVariationResolver<ContentPageModel>- Parameters:
pageModel- the page- Returns:
- default page (the collection should contain at most one item);
empty if the given page is a default page;
never null
-
findVariationPages
Description copied from interface:PageVariationResolverFind variation pages for a given page.- Specified by:
findVariationPagesin interfacePageVariationResolver<ContentPageModel>- Parameters:
pageModel- the page- Returns:
- variation pages associated to the given page;
empty if the given page is a variation page;
never null
-
isDefaultPage
Description copied from interface:PageVariationResolverDetermines if a given page is a default page or a variation page.- Specified by:
isDefaultPagein interfacePageVariationResolver<ContentPageModel>- Parameters:
pageModel- the page- Returns:
- true if the given page is a default page; false otherwise
-
findDisplayConditions
Description copied from interface:PageVariationResolverFinds all display conditions available for a given page type. It is used to determine if a fallback and/or variation page can be created.- Specified by:
findDisplayConditionsin interfacePageVariationResolver<ContentPageModel>- Parameters:
typeCode- the page type- Returns:
- all display conditions
-
createOptionData
-
getAdminPageService
-
setAdminPageService
-
getAdminRestrictionService
-
setAdminRestrictionService
-