public class DefaultCMSPageService extends AbstractCMSService implements CMSPageService
CMSPageService interface.AbstractService.SerializableDTO| Modifier and Type | Field and Description |
|---|---|
protected static Logger |
LOG |
CURRENTCATALOGVERSION, CURRENTSITEmodelService, sessionService, txManagertenant| Constructor and Description |
|---|
DefaultCMSPageService() |
| Modifier and Type | Method and Description |
|---|---|
protected java.util.List<ContentSlotModel> |
appendContentSlots(java.util.List<ContentSlotData> contentSlots,
java.util.List<java.lang.String> positions,
java.util.Collection<ContentSlotForTemplateModel> templateSlots,
AbstractPageModel page) |
java.util.Collection<PageTemplateModel> |
getAllActivePageTemplates()
Gets the all active page templates.
|
java.util.Collection<ContentPageModel> |
getAllContentPages()
Gets the all content pages.
|
protected CatalogService |
getCatalogService() |
protected CatalogVersionService |
getCatalogVersionService() |
protected CategoryService |
getCategoryService() |
protected CatalogLevelService |
getCmsCatalogLevelService() |
protected CMSContentSlotDao |
getCmsContentSlotDao() |
protected CMSDataFactory |
getCmsDataFactory() |
protected CMSPageDao |
getCmsPageDao() |
protected CMSPageTemplateDao |
getCmsPageTemplateDao() |
protected CMSRestrictionService |
getCmsRestrictionService() |
protected ConfigurationService |
getConfigurationService() |
ContentSlotData |
getContentSlotForPage(AbstractPageModel page,
java.lang.String position)
Returns a contentslot for the given page and position.
|
java.util.Collection<ContentSlotData> |
getContentSlotsForPage(AbstractPageModel page)
Returns collection of
ContentSlotData objects containing data taken from all
ContentSlotForPageModel objects as well from ContentSlotForTemplateModel objects for
passed as parameter AbstractPageModel object. |
java.util.Collection<ContentSlotForTemplateModel> |
getContentSlotsForPageTemplate(PageTemplateModel pageTemplate)
Gets all
ContentSlotForTemplateModel objects related to passed as parameter
PageTemplateModel. |
CatalogPageModel |
getDefaultCatalogPage()
Returns the default catalog page WITHOUT evaluating any restrictions
|
CategoryPageModel |
getDefaultCategoryPage()
Returns the default category page WITHOUT evaluating any restrictions
|
ContentPageModel |
getDefaultContentPage(java.lang.String label)
Returns the default content page with the given label WITHOUT evaluating any restrictions
|
protected AbstractPageModel |
getDefaultPage(java.lang.String composedTypeCode) |
ContentPageModel |
getDefaultPageByLabel(java.lang.String label,
CatalogVersionModel version)
Gets the default page by label.
|
ContentPageModel |
getDefaultPageForLabel(java.lang.String label,
CatalogVersionModel version)
Gets the default page by label and catalog version.
|
ProductPageModel |
getDefaultProductPage()
Returns the default product page WITHOUT evaluating any restrictions
|
java.lang.String |
getFrontendTemplateName(PageTemplateModel template)
Gets the frontend template name for
PageTemplateModel object. |
ContentPageModel |
getHomepage()
Gets the homepage.
|
java.lang.String |
getLabelOrId(ContentPageModel contentPage)
Gets the
ContentPageModel label or id if label is empty. |
protected java.util.Optional<ContentSlotModel> |
getOverrideSlot(java.util.List<ContentSlotModel> contentSlots,
ContentSlotModel contentSlot) |
java.util.Collection<ContentSlotForPageModel> |
getOwnContentSlotsForPage(AbstractPageModel page)
Gets the own
ContentSlotForPageModel objects for passed as parameter AbstractPageModel
object. |
CatalogPageModel |
getPageByCatalog(CatalogModel catalog)
Gets the page by catalog.
|
CatalogPageModel |
getPageByCatalogId(java.lang.String catalogId)
Gets the page by catalog id.
|
CategoryPageModel |
getPageByCategory(CategoryModel category)
Gets the page by category.
|
CategoryPageModel |
getPageByCategoryCode(java.lang.String categoryCode)
Gets the page by category code.
|
AbstractPageModel |
getPageById(java.lang.String id)
Gets the page by id.
|
ContentPageModel |
getPageByLabel(java.lang.String label)
Gets the page by label.
|
ContentPageModel |
getPageByLabelOrId(java.lang.String labelOrId)
First looks up for pages with the given labelOrId.
|
ProductPageModel |
getPageByProduct(ProductModel product)
Gets the page by product.
|
ProductPageModel |
getPageByProductCode(java.lang.String productCode)
Gets the page by product code.
|
CatalogPageModel |
getPageForCatalog(CatalogModel catalog)
Gets the page by catalog.
|
CatalogPageModel |
getPageForCatalogId(java.lang.String catalogId)
Gets the page for catalog id.
|
CategoryPageModel |
getPageForCategory(CategoryModel category)
Gets the page for category.
|
CategoryPageModel |
getPageForCategoryCode(java.lang.String categoryCode)
Gets the page for category code.
|
AbstractPageModel |
getPageForId(java.lang.String id)
Gets the page for id.
|
ContentPageModel |
getPageForLabel(java.lang.String label)
Gets the page for label.
|
ContentPageModel |
getPageForLabelAndPageStatuses(java.lang.String label,
java.util.List<CmsPageStatus> pageStatuses)
Gets the page for label by page status.
|
ContentPageModel |
getPageForLabelOrId(java.lang.String labelOrId)
Gets the page for label or id.
|
ProductPageModel |
getPageForProduct(ProductModel product)
Gets the page for product.
|
ProductPageModel |
getPageForProductCode(java.lang.String productCode)
Gets the page for product code.
|
java.util.Collection<AbstractPageModel> |
getPagesByPageTemplateComponent(AbstractCMSComponentModel component)
Returns all pages that uses given component in their templates
|
java.util.Collection<AbstractPageModel> |
getPagesByPageTemplateContentSlots(java.util.Collection<ContentSlotModel> contentSlots)
Returns all pages that uses given content slots in their templates
|
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.
|
protected ProductService |
getProductService() |
protected ContentPageModel |
getSingleContentPage(java.lang.String label) |
protected AbstractPageModel |
getSinglePage(java.lang.String composedTypeCode) |
java.util.List<ContentSlotModel> |
getSortedMultiCountryContentSlots(java.util.List<ContentSlotModel> contentSlots,
java.util.List<CatalogVersionModel> catalogVersions)
Gets the content slots sorted by their catalog hierarchy.
|
protected TypeService |
getTypeService() |
void |
setCatalogService(CatalogService catalogService) |
void |
setCatalogVersionService(CatalogVersionService catalogVersionService) |
void |
setCategoryService(CategoryService categoryService) |
void |
setCmsCatalogLevelService(CatalogLevelService cmsCatalogLevelService) |
void |
setCmsContentSlotDao(CMSContentSlotDao cmsContentSlotDao) |
void |
setCmsDataFactory(CMSDataFactory cmsDataFactory) |
void |
setCmsPageDao(CMSPageDao cmsPageDao) |
void |
setCmsPageTemplateDao(CMSPageTemplateDao cmsPageTemplateDao) |
void |
setCmsRestrictionService(CMSRestrictionService cmsRestrictionService) |
void |
setConfigurationService(ConfigurationService configurationService) |
void |
setProductService(ProductService productService) |
void |
setTypeService(TypeService typeService) |
getBaseSiteService, getCurrentCatalogVersion, getCurrentSite, getSearchRestrictionService, getUserService, setBaseSiteService, setSearchRestrictionService, setUserServicegetModelService, getSessionService, getTxManager, setModelService, setSessionService, setTxManagerafterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, setTenantScope, writeReplacepublic java.util.Collection<PageTemplateModel> getAllActivePageTemplates()
getAllActivePageTemplates in interface CMSPageServicepublic java.util.Collection<ContentPageModel> getAllContentPages()
getAllContentPages in interface CMSPageServicepublic java.util.Collection<ContentSlotForPageModel> getOwnContentSlotsForPage(AbstractPageModel page)
ContentSlotForPageModel objects for passed as parameter AbstractPageModel
object.getOwnContentSlotsForPage in interface CMSPageServicepage - the AbstractPageModel object.ContentSlotForPageModel objects related to AbstractPageModel.public ContentSlotData getContentSlotForPage(AbstractPageModel page, java.lang.String position) throws CMSItemNotFoundException
getContentSlotForPage in interface CMSPageServicepage - the page modelposition - the positionCMSItemNotFoundException - if no content slot is defined at this position in that pagepublic java.util.Collection<ContentSlotData> getContentSlotsForPage(AbstractPageModel page)
ContentSlotData objects containing data taken from all
ContentSlotForPageModel objects as well from ContentSlotForTemplateModel objects for
passed as parameter AbstractPageModel object.getContentSlotsForPage in interface CMSPageServicepage - the AbstractPageModel object.ContentSlotData objects.protected java.util.Optional<ContentSlotModel> getOverrideSlot(java.util.List<ContentSlotModel> contentSlots, ContentSlotModel contentSlot)
public java.util.List<ContentSlotModel> getSortedMultiCountryContentSlots(java.util.List<ContentSlotModel> contentSlots, java.util.List<CatalogVersionModel> catalogVersions)
CMSPageServicegetSortedMultiCountryContentSlots in interface CMSPageServicecontentSlots - - the content slotscatalogVersions - - the catalog versionsprotected java.util.List<ContentSlotModel> appendContentSlots(java.util.List<ContentSlotData> contentSlots, java.util.List<java.lang.String> positions, java.util.Collection<ContentSlotForTemplateModel> templateSlots, AbstractPageModel page)
public java.util.Collection<ContentSlotForTemplateModel> getContentSlotsForPageTemplate(PageTemplateModel pageTemplate)
ContentSlotForTemplateModel objects related to passed as parameter
PageTemplateModel.getContentSlotsForPageTemplate in interface CMSPageServicepageTemplate - the PageTemplateModel object for which search will be executed.ContentSlotForTemplateModel objects.public CatalogPageModel getDefaultCatalogPage() throws CMSItemNotFoundException
getDefaultCatalogPage in interface CMSPageServiceCMSItemNotFoundException - if no default catalog page could be foundpublic CategoryPageModel getDefaultCategoryPage() throws CMSItemNotFoundException
getDefaultCategoryPage in interface CMSPageServiceCMSItemNotFoundException - if no default category page could be foundpublic ContentPageModel getDefaultContentPage(java.lang.String label) throws CMSItemNotFoundException
getDefaultContentPage in interface CMSPageServicelabel - ContentPage labelCMSItemNotFoundException - if no default content page with the given label could be foundpublic ContentPageModel getDefaultPageByLabel(java.lang.String label, CatalogVersionModel version) throws CMSItemNotFoundException
getDefaultPageByLabel in interface CMSPageServicelabel - the labelversion - the versionCMSItemNotFoundException - thrown when item was not foundpublic ContentPageModel getDefaultPageForLabel(java.lang.String label, CatalogVersionModel version) throws CMSItemNotFoundException
getDefaultPageForLabel in interface CMSPageServicelabel - the labelversion - the versionCMSItemNotFoundException - thrown when item was not foundpublic ProductPageModel getDefaultProductPage() throws CMSItemNotFoundException
getDefaultProductPage in interface CMSPageServiceCMSItemNotFoundException - if no default product page could be foundpublic java.lang.String getFrontendTemplateName(PageTemplateModel template)
PageTemplateModel object.getFrontendTemplateName in interface CMSPageServicetemplate - the PageTemplateModel object.public ContentPageModel getHomepage()
getHomepage in interface CMSPageServicepublic java.lang.String getLabelOrId(ContentPageModel contentPage)
ContentPageModel label or id if label is empty.getLabelOrId in interface CMSPageServicecontentPage - the ContentPageModel object.ContentPageModel.public CatalogPageModel getPageByCatalog(CatalogModel catalog) throws CMSItemNotFoundException
getPageByCatalog in interface CMSPageServicecatalog - the catalogCMSItemNotFoundException - thrown when item was not foundpublic CatalogPageModel getPageByCatalogId(java.lang.String catalogId) throws CMSItemNotFoundException
getPageByCatalogId in interface CMSPageServicecatalogId - the catalog idCMSItemNotFoundException - thrown when item was not foundpublic CategoryPageModel getPageByCategory(CategoryModel category) throws CMSItemNotFoundException
getPageByCategory in interface CMSPageServicecategory - the categoryCMSItemNotFoundException - thrown when item was not foundpublic CategoryPageModel getPageByCategoryCode(java.lang.String categoryCode) throws CMSItemNotFoundException
getPageByCategoryCode in interface CMSPageServicecategoryCode - the category codeCMSItemNotFoundException - thrown when item was not foundpublic AbstractPageModel getPageById(java.lang.String id) throws CMSItemNotFoundException
getPageById in interface CMSPageServiceid - the idCMSItemNotFoundException - thrown when item was not foundpublic ContentPageModel getPageByLabel(java.lang.String label) throws CMSItemNotFoundException
getPageByLabel in interface CMSPageServicelabel - the labelCMSItemNotFoundException - thrown when item was not foundpublic ContentPageModel getPageByLabelOrId(java.lang.String labelOrId) throws CMSItemNotFoundException
getPageByLabelOrId in interface CMSPageServiceCMSItemNotFoundException - thrown when item was not foundpublic ProductPageModel getPageByProduct(ProductModel product) throws CMSItemNotFoundException
getPageByProduct in interface CMSPageServiceproduct - the productCMSItemNotFoundException - thrown when item was not foundpublic ProductPageModel getPageByProductCode(java.lang.String productCode) throws CMSItemNotFoundException
getPageByProductCode in interface CMSPageServiceproductCode - the product codeCMSItemNotFoundException - thrown when item was not foundpublic CatalogPageModel getPageForCatalog(CatalogModel catalog) throws CMSItemNotFoundException
getPageForCatalog in interface CMSPageServicecatalog - the catalogCMSItemNotFoundException - thrown when item was not foundpublic CatalogPageModel getPageForCatalogId(java.lang.String catalogId) throws CMSItemNotFoundException
getPageForCatalogId in interface CMSPageServicecatalogId - the catalog idCMSItemNotFoundException - thrown when item was not foundpublic CategoryPageModel getPageForCategory(CategoryModel category) throws CMSItemNotFoundException
getPageForCategory in interface CMSPageServicecategory - the categoryCMSItemNotFoundException - thrown when item was not foundpublic CategoryPageModel getPageForCategoryCode(java.lang.String categoryCode) throws CMSItemNotFoundException
getPageForCategoryCode in interface CMSPageServicecategoryCode - the category codeCMSItemNotFoundException - thrown when item was not foundpublic AbstractPageModel getPageForId(java.lang.String id) throws CMSItemNotFoundException
getPageForId in interface CMSPageServiceid - the idCMSItemNotFoundException - thrown when item was not foundpublic ContentPageModel getPageForLabel(java.lang.String label) throws CMSItemNotFoundException
getPageForLabel in interface CMSPageServicelabel - the labelCMSItemNotFoundException - thrown when item was not foundpublic ContentPageModel getPageForLabelAndPageStatuses(java.lang.String label, java.util.List<CmsPageStatus> pageStatuses) throws CMSItemNotFoundException
CMSPageServicegetPageForLabelAndPageStatuses in interface CMSPageServicelabel - the labelpageStatuses - the page statuses. i.e. (deleted, active)CMSItemNotFoundException - thrown when item was not foundpublic ContentPageModel getPageForLabelOrId(java.lang.String labelOrId) throws CMSItemNotFoundException
getPageForLabelOrId in interface CMSPageServicelabelOrId - the label or idCMSItemNotFoundException - thrown when item was not foundpublic ProductPageModel getPageForProduct(ProductModel product) throws CMSItemNotFoundException
getPageForProduct in interface CMSPageServiceproduct - the productCMSItemNotFoundException - thrown when item was not foundpublic ProductPageModel getPageForProductCode(java.lang.String productCode) throws CMSItemNotFoundException
getPageForProductCode in interface CMSPageServiceproductCode - the product codeCMSItemNotFoundException - thrown when item was not foundpublic java.util.Collection<AbstractPageModel> getPagesByPageTemplateComponent(AbstractCMSComponentModel component)
getPagesByPageTemplateComponent in interface CMSPageServicecomponent - - component model that we are looking pages forpublic java.util.Collection<AbstractPageModel> getPagesByPageTemplateContentSlots(java.util.Collection<ContentSlotModel> contentSlots)
getPagesByPageTemplateContentSlots in interface CMSPageServicecontentSlots - - content slot model that we are looking pages forpublic java.util.Collection<AbstractPageModel> getPagesForComponent(AbstractCMSComponentModel component)
getPagesForComponent in interface CMSPageServicecomponent - - component model that we are looking pages forpublic java.util.Collection<AbstractPageModel> getPagesForContentSlots(java.util.Collection<ContentSlotModel> contentSlots)
getPagesForContentSlots in interface CMSPageServicecontentSlots - - content slot model that we are looking pages forpublic java.util.Collection<AbstractPageModel> getPagesForPageTemplateComponent(AbstractCMSComponentModel component)
getPagesForPageTemplateComponent in interface CMSPageServicecomponent - the componentpublic java.util.Collection<AbstractPageModel> getPagesForPageTemplateContentSlots(java.util.Collection<ContentSlotModel> contentSlots)
getPagesForPageTemplateContentSlots in interface CMSPageServicecontentSlots - the content slotsprotected CatalogService getCatalogService()
public void setCatalogService(CatalogService catalogService)
protected CategoryService getCategoryService()
public void setCategoryService(CategoryService categoryService)
public void setCmsContentSlotDao(CMSContentSlotDao cmsContentSlotDao)
protected CMSContentSlotDao getCmsContentSlotDao()
public void setCmsDataFactory(CMSDataFactory cmsDataFactory)
protected CMSDataFactory getCmsDataFactory()
protected CMSPageDao getCmsPageDao()
public void setCmsPageDao(CMSPageDao cmsPageDao)
protected CMSPageTemplateDao getCmsPageTemplateDao()
public void setCmsPageTemplateDao(CMSPageTemplateDao cmsPageTemplateDao)
protected CMSRestrictionService getCmsRestrictionService()
public void setCmsRestrictionService(CMSRestrictionService cmsRestrictionService)
protected ProductService getProductService()
public void setProductService(ProductService productService)
protected TypeService getTypeService()
public void setTypeService(TypeService typeService)
protected ConfigurationService getConfigurationService()
public void setConfigurationService(ConfigurationService configurationService)
protected CatalogVersionService getCatalogVersionService()
public void setCatalogVersionService(CatalogVersionService catalogVersionService)
protected CatalogLevelService getCmsCatalogLevelService()
public void setCmsCatalogLevelService(CatalogLevelService cmsCatalogLevelService)
protected AbstractPageModel getDefaultPage(java.lang.String composedTypeCode) throws CMSItemNotFoundException
CMSItemNotFoundExceptionprotected ContentPageModel getSingleContentPage(java.lang.String label)
protected AbstractPageModel getSinglePage(java.lang.String composedTypeCode)
Copyright © 2018 SAP SE. All Rights Reserved.