public class DefaultCMSAdminComponentService extends AbstractCMSAdminService implements CMSAdminComponentService
AbstractService.SerializableDTO| Modifier and Type | Field and Description |
|---|---|
protected static String |
CE_SYSTEM_PROPS |
protected CMSComponentDao |
cmsComponentDao
Deprecated.
Implement the CMSComponentDao as own property
|
protected List |
systemProperties
Deprecated.
Implement the systemProperties as own property
|
protected TypeService |
typeService
Deprecated.
Implement the TypeService as own property
|
ACTIVECATALOGVERSION, ACTIVESITEmodelService, sessionService, txManagertenant| Constructor and Description |
|---|
DefaultCMSAdminComponentService() |
getActiveCatalogVersion, getActiveSite, getUserService, setUserServicegetModelService, getSessionService, getTxManager, setModelService, setSessionService, setTxManagerafterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, setTenantScope, writeReplaceprotected static final String CE_SYSTEM_PROPS
@Deprecated protected TypeService typeService
@Deprecated protected CMSComponentDao cmsComponentDao
@Deprecated protected List systemProperties
@Deprecated public AbstractCMSComponentModel createAndAddCmsComponent(ContentSlotModel contentSlot, String composedTypeCode, String id, String name) throws CMSItemCreateException
ModelService.save(Object) on create cms component model.createAndAddCmsComponent in interface CMSAdminComponentServicecontentSlot - the content slotcomposedTypeCode - the composed type code for new cms componentid - the id for new cms componentname - the name for new cms componentCMSItemCreateException - thrown when there was an problem to find composed type with code composedTypeCode for new
cms component.public AbstractCMSComponentModel createCmsComponent(ContentSlotModel contentSlotModel, String componentUid, String componentName, String typeCode)
createCmsComponent in interface CMSAdminComponentServicecontentSlotModel - the content slotcomponentUid - the uid for the new cms componentcomponentName - the name for new cms componenttypeCode - the composed type code for new cms componentpublic String generateCmsComponentUid()
CMSAdminComponentServicegenerateCmsComponentUid in interface CMSAdminComponentService@Deprecated public AbstractCMSComponentModel createCMSComponent(ContentSlotModel contentSlot, String composedTypeCode, String id, String name) throws CMSItemCreateException
createCMSComponent in interface CMSAdminComponentServiceCMSItemCreateException@Deprecated public void deleteCMSComponent(AbstractCMSComponentModel component)
deleteCMSComponent in interface CMSAdminComponentServicecomponent - the component model to delete.public Collection<ComposedTypeModel> getAllowedCMSComponentContainers()
getAllowedCMSComponentContainers in interface CMSAdminComponentServicepublic Collection<ComposedTypeModel> getAllowedCMSComponents()
getAllowedCMSComponents in interface CMSAdminComponentService@Deprecated public AbstractCMSComponentModel getCMSComponent(String id) throws CMSItemNotFoundException
getCMSComponent in interface CMSAdminComponentServiceid - the id of cms componentCMSItemNotFoundException - thrown when no cms comoponent has been found@Deprecated public AbstractCMSComponentContainerModel getCMSComponentContainer(String id) throws CMSItemNotFoundException
getCMSComponentContainer in interface CMSAdminComponentServiceid - the id of cms component container.CMSItemNotFoundException - thrown when no cms comoponent container has been foundpublic AbstractCMSComponentContainerModel getCMSComponentContainerForId(String id) throws AmbiguousIdentifierException, UnknownIdentifierException
getCMSComponentContainerForId in interface CMSAdminComponentServiceid - the id of cms component container.AmbiguousIdentifierException - thrown when more than one object has been found.UnknownIdentifierException - thrown when no object has been foundpublic AbstractCMSComponentModel getCMSComponentForId(String id) throws AmbiguousIdentifierException, UnknownIdentifierException
getCMSComponentForId in interface CMSAdminComponentServiceid - the id of cms componentAmbiguousIdentifierException - thrown when more than one object has been found.UnknownIdentifierException - thrown when no object has been foundpublic Collection<SimpleCMSComponentModel> getCMSComponentsForContainerId(String containerId)
getCMSComponentsForContainerId in interface CMSAdminComponentServicecontainerId - the container idpublic Collection<SimpleCMSComponentModel> getCMSComponentsOfContainer(String containerId) throws CMSItemNotFoundException
getCMSComponentsOfContainer in interface CMSAdminComponentServicecontainerId - the container idCMSItemNotFoundException - thrown when no object has been foundpublic Collection<String> getEditorProperties(ItemModel component)
getEditorProperties in interface CMSAdminComponentServicecomponent - the component which editor properties should be retrievedpublic Collection<String> getSystemProperties(AbstractCMSComponentModel component)
getSystemProperties in interface CMSAdminComponentServicecomponent - the component which system properties should be retrievedpublic void removeCMSComponentFromContentSlot(AbstractCMSComponentModel component, ContentSlotModel contentSlot)
removeCMSComponentFromContentSlot in interface CMSAdminComponentServicecomponent - the component to removecontentSlot - the content slot from which the component will be removed.public List<AbstractCMSComponentModel> getAllCMSComponentsForCatalogVersion(CatalogVersionModel catalogVersionModel)
CMSAdminComponentServicegetAllCMSComponentsForCatalogVersion in interface CMSAdminComponentService@Deprecated public void save(AbstractCMSComponentModel component)
save in interface CMSAdminComponentServicecomponent - the component model to save.public Collection<AbstractCMSComponentModel> getCMSComponentsForContainer(AbstractCMSComponentContainerModel container)
CMSAdminComponentService
This service depends on a CMSComponentContainerStrategy to decide if:
getCMSComponentsForContainer in interface CMSAdminComponentServicecontainer - - the container model from which we want to get the componentsnullpublic Collection<AbstractCMSComponentModel> getDisplayedComponentsForContentSlot(ContentSlotModel contentSlot)
CMSAdminComponentService
The difference between ContentSlotModel.getCmsComponents() and getting the displayed components in the
slot has to do with containers. Some containers are rendered as a single component while some others are rendered
as a collection of components or in other ways. So for container components, the
#getCMSComponentsForContainer(AbstractCMSComponentContainerModel) method will be used.
getDisplayedComponentsForContentSlot in interface CMSAdminComponentServicecontentSlot - - the content slot for which we want to get all displayed componentsnullprotected Collection<AbstractCMSComponentModel> getDisplayedComponentsForComponent(AbstractCMSComponentModel component)
component - - the component from which to get the displayed componentsnullprotected Boolean isComponentContainer(AbstractCMSComponentModel component)
component - - the component to checktrue if the component is a container; false otherwisepublic void setCmsComponentDao(CMSComponentDao cmsComponentDao)
public void setSystemProperties(List systemProperties)
public void setTypeService(TypeService typeService)
protected Collection<ComposedTypeModel> getComposedTypeOfCode(String code)
protected PersistentKeyGenerator getComponentUidGenerator()
public void setComponentUidGenerator(PersistentKeyGenerator componentUidGenerator)
protected CMSComponentContainerRegistry getCmsComponentContainerRegistry()
public void setCmsComponentContainerRegistry(CMSComponentContainerRegistry cmsComponentContainerRegistry)
public SearchResult<AbstractCMSComponentModel> findByCatalogVersionAndMask(CatalogVersionModel catalogVersionModel, String mask, PageableData pageableData)
CMSAdminComponentServicePageableData query, will return a page object consisting of the
content list of the requested page number and the total number of entities for the given maskfindByCatalogVersionAndMask in interface CMSAdminComponentServicecatalogVersionModel - the catalog version to filter onmask - the string value on which components will be filtered, implementations may choose to filter on the
component namepageableData - the PageableData object containing the page request details. PageableData may contain a String
value for sort, this will be used by a sorting strategy to select the most appropriate query or resort
to a default one.Copyright © 2017 SAP SE. All Rights Reserved.