public class DefaultCMSAdminPageService extends AbstractCMSAdminService implements CMSAdminPageService
AbstractService.SerializableDTO| Modifier and Type | Field and Description |
|---|---|
CMSPageDao |
cmsPageDao
Deprecated.
Implement the CMSPageDao as own property
|
CMSPageTemplateDao |
cmsPageTemplateDao
Deprecated.
Implement the CMSPageTemplateDao as own property
|
protected TypeService |
typeService
Deprecated.
Implement the TypeService as own property
|
ACTIVECATALOGVERSION, ACTIVESITEmodelService, sessionService, txManagertenant| Constructor and Description |
|---|
DefaultCMSAdminPageService() |
| Modifier and Type | Method and Description |
|---|---|
CategoryPageModel |
createCategoryPage(String id,
String name,
String masterTemplateId,
boolean isDefault)
Creates the category page.
|
ContentPageModel |
createContentPage(String id,
String name,
String masterTemplateId,
String label)
Creates the content page.
|
AbstractPageModel |
createPage(String composedType,
String id,
String name,
String masterTemplateId)
Creates the page.
|
protected AbstractPageModel |
createPageFromType(String composedTypeCode) |
ProductPageModel |
createProductPage(String id,
String name,
String masterTemplateId,
boolean isDefault)
Creates the product page.
|
void |
deletePage(String id)
Delete a page from the active catalog version
|
Collection<AbstractPageModel> |
findPagesByType(ComposedTypeModel composedType,
boolean isDefault)
Gets the all default or non-default pages by page type from the active catalog version.
|
Collection<PageTemplateModel> |
getAllActivePageTemplates()
returns all page templates which are set to active (only of the active catalogVersion)
|
Collection<ContentPageModel> |
getAllContentPages(Collection<CatalogVersionModel> catalogVersions)
Gets the all content pages.
|
Collection<AbstractPageModel> |
getAllPages()
Returns all pages which are assigned to the active catalog version
|
Collection<AbstractPageModel> |
getAllPages(CatalogVersionModel catalogVersion)
Gets the all pages.
|
Collection<AbstractPageModel> |
getAllPagesByType(String type)
Returns all pages which are assigned to the active catalog version and are of the given type
|
Collection<AbstractPageModel> |
getAllPagesByType(String type,
CatalogVersionModel catalogVersion)
Gets the all pages by type.
|
Map<String,Collection<AbstractPageModel>> |
getAllPagesMap()
returns all pages of the active catalogVersion.
|
Collection<PageTemplateModel> |
getAllPageTemplates(boolean active)
returns all page templates (only of the active catalogVersion)
|
Collection<PageTemplateModel> |
getAllPageTemplates(Collection<CatalogVersionModel> catalogVersions)
Gets the all page templates.
|
Collection<CMSPageTypeModel> |
getAllPageTypes()
Returns a collection of all available page types.
|
Collection<PageTemplateModel> |
getAllRestrictedPageTemplates(boolean active,
CMSPageTypeModel type)
returns all restricted page templates (only of the active catalogVersion)
|
Collection<ContentPageModel> |
getContentPages(Collection<CatalogVersionModel> catalogVersions,
String label)
Gets the content pages.
|
ContentPageModel |
getHomepage(CMSSiteModel siteModel)
Gets the homepage for a given CMS Site.
|
AbstractPageModel |
getPageById(String id)
Deprecated.
use
getPageForIdFromActiveCatalogVersion(String) instead. |
AbstractPageModel |
getPageForIdFromActiveCatalogVersion(String id)
Returns the page with the given id from active catalogVersion.
|
PageTemplateModel |
getPageTemplateById(String id)
Deprecated.
use
getPageTemplateForIdFromActiveCatalogVersion(String) instead. |
PageTemplateModel |
getPageTemplateForIdFromActiveCatalogVersion(String id)
Gets the page template with the give id.
|
Optional<CMSPageTypeModel> |
getPageTypeByCode(String typeCode)
Returns the page type with the given type code.
|
boolean |
pageExists(String id)
Checks if a page exists in the active catalog version
|
void |
save(AbstractPageModel page)
Deprecated.
|
void |
setCmsPageDao(CMSPageDao cmsPageDao) |
void |
setCmsPageTemplateDao(CMSPageTemplateDao cmsPageTemplateDao) |
void |
setTypeService(TypeService typeService) |
void |
updatePage(AbstractPageModel page,
String name,
String masterTemplateId)
Updates the given page.
|
getActiveCatalogVersion, getActiveSite, getUserService, setUserServicegetModelService, getSessionService, getTxManager, setModelService, setSessionService, setTxManagerafterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, setTenantScope, writeReplaceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetActiveCatalogVersion@Deprecated public CMSPageDao cmsPageDao
@Deprecated public CMSPageTemplateDao cmsPageTemplateDao
@Deprecated protected TypeService typeService
public CategoryPageModel createCategoryPage(String id, String name, String masterTemplateId, boolean isDefault) throws CMSItemCreateException
createCategoryPage in interface CMSAdminPageServiceid - the idname - the namemasterTemplateId - the master template idisDefault - the is defaultCMSItemCreateException - the cMS item create exceptionpublic ContentPageModel createContentPage(String id, String name, String masterTemplateId, String label) throws CMSItemCreateException
createContentPage in interface CMSAdminPageServiceid - the idname - the namemasterTemplateId - the master template idlabel - the labelCMSItemCreateException - the cMS item create exceptionpublic AbstractPageModel createPage(String composedType, String id, String name, String masterTemplateId) throws CMSItemCreateException
createPage in interface CMSAdminPageServicecomposedType - the composed typeid - the idname - the namemasterTemplateId - the master template idCMSItemCreateException - the cMS item create exceptionpublic ProductPageModel createProductPage(String id, String name, String masterTemplateId, boolean isDefault) throws CMSItemCreateException
createProductPage in interface CMSAdminPageServiceid - the idname - the namemasterTemplateId - the master template idisDefault - the is defaultCMSItemCreateException - the cMS item create exceptionpublic void deletePage(String id) throws CMSItemNotFoundException
deletePage in interface CMSAdminPageServiceCMSItemNotFoundException - if no page with the give id is foundpublic Collection<PageTemplateModel> getAllActivePageTemplates()
getAllActivePageTemplates in interface CMSAdminPageServicepublic Collection<ContentPageModel> getAllContentPages(Collection<CatalogVersionModel> catalogVersions)
getAllContentPages in interface CMSAdminPageServicecatalogVersions - the catalog versionspublic Collection<CMSPageTypeModel> getAllPageTypes()
CMSAdminPageServicegetAllPageTypes in interface CMSAdminPageServicepublic Optional<CMSPageTypeModel> getPageTypeByCode(String typeCode)
CMSAdminPageServicegetPageTypeByCode in interface CMSAdminPageServicetypeCode - the type code of the page type to retrievepublic Collection<AbstractPageModel> getAllPages()
getAllPages in interface CMSAdminPageServicepublic Collection<AbstractPageModel> getAllPages(CatalogVersionModel catalogVersion)
getAllPages in interface CMSAdminPageServicecatalogVersion - the catalog versionpublic Collection<AbstractPageModel> getAllPagesByType(String type)
getAllPagesByType in interface CMSAdminPageServicetype - should be a sub-type of AbstractPagepublic Collection<AbstractPageModel> getAllPagesByType(String type, CatalogVersionModel catalogVersion)
getAllPagesByType in interface CMSAdminPageServicetype - the typecatalogVersion - the catalog versionpublic Map<String,Collection<AbstractPageModel>> getAllPagesMap()
getAllPagesMap in interface CMSAdminPageServicepublic Collection<PageTemplateModel> getAllPageTemplates(boolean active)
getAllPageTemplates in interface CMSAdminPageServiceactive - if set to true only page templates are returned which are set as activepublic Collection<PageTemplateModel> getAllPageTemplates(Collection<CatalogVersionModel> catalogVersions)
getAllPageTemplates in interface CMSAdminPageServicecatalogVersions - the catalog versionspublic Collection<PageTemplateModel> getAllRestrictedPageTemplates(boolean active, CMSPageTypeModel type)
getAllRestrictedPageTemplates in interface CMSAdminPageServiceactive - if set to true only page templates are returned which are set as activetype - the page type to which the page template will be restrictedpublic Collection<ContentPageModel> getContentPages(Collection<CatalogVersionModel> catalogVersions, String label)
getContentPages in interface CMSAdminPageServicecatalogVersions - the catalog versionslabel - the label@Deprecated public AbstractPageModel getPageById(String id) throws CMSItemNotFoundException
getPageForIdFromActiveCatalogVersion(String) instead.getPageById in interface CMSAdminPageServiceid - the id of the pageCMSItemNotFoundException - if no page with the given id is foundpublic AbstractPageModel getPageForIdFromActiveCatalogVersion(String id) throws AmbiguousIdentifierException, UnknownIdentifierException
getPageForIdFromActiveCatalogVersion in interface CMSAdminPageServiceid - the id of the pageAmbiguousIdentifierExceptionUnknownIdentifierException@Deprecated public PageTemplateModel getPageTemplateById(String id) throws CMSItemNotFoundException
getPageTemplateForIdFromActiveCatalogVersion(String) instead.getPageTemplateById in interface CMSAdminPageServiceCMSItemNotFoundException - if no template with the given id is foundpublic PageTemplateModel getPageTemplateForIdFromActiveCatalogVersion(String id) throws AmbiguousIdentifierException, UnknownIdentifierException
getPageTemplateForIdFromActiveCatalogVersion in interface CMSAdminPageServiceid - the idAmbiguousIdentifierException - thrown when more than one object has been found.UnknownIdentifierException - thrown when no object has been foundpublic boolean pageExists(String id)
pageExists in interface CMSAdminPageServiceid - page idtrue if the page exists in the active catalog version; false otherwise@Deprecated public void save(AbstractPageModel page)
save in interface CMSAdminPageServicepage - the page model objectpublic void setCmsPageDao(CMSPageDao cmsPageDao)
public void setCmsPageTemplateDao(CMSPageTemplateDao cmsPageTemplateDao)
public void setTypeService(TypeService typeService)
public void updatePage(AbstractPageModel page, String name, String masterTemplateId) throws CMSItemNotFoundException
updatePage in interface CMSAdminPageServiceCMSItemNotFoundExceptionprotected AbstractPageModel createPageFromType(String composedTypeCode) throws CMSItemCreateException
CMSItemCreateExceptionpublic ContentPageModel getHomepage(CMSSiteModel siteModel)
CMSAdminPageServicegetHomepage in interface CMSAdminPageServicepublic Collection<AbstractPageModel> findPagesByType(ComposedTypeModel composedType, boolean isDefault)
CMSAdminPageServicefindPagesByType in interface CMSAdminPageServicecomposedType - the page type modelisDefault - true to find default pages; false otherwiseCopyright © 2017 SAP SE. All Rights Reserved.