public interface CMSAdminComponentService
| Modifier and Type | Method and Description |
|---|---|
AbstractCMSComponentModel |
createCmsComponent(ContentSlotModel contentSlotModel,
java.lang.String componentUid,
java.lang.String componentName,
java.lang.String typeCode)
Creates cms component model.
|
SearchResult<AbstractCMSComponentModel> |
findByCatalogVersionAndMask(CatalogVersionModel catalogVersionModel,
java.lang.String mask,
PageableData pageableData)
For a given mask used as filter and a
PageableData 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 mask |
java.lang.String |
generateCmsComponentUid()
Generates a new CMS component UID
|
java.util.List<AbstractCMSComponentModel> |
getAllCMSComponentsForCatalogVersion(CatalogVersionModel catalogVersionModel)
gets all cms components for a given catalog.
|
java.util.Collection<ComposedTypeModel> |
getAllowedCMSComponentContainers()
Gets the allowed cms component containers.
|
java.util.Collection<ComposedTypeModel> |
getAllowedCMSComponents()
Gets the allowed cms components.
|
AbstractCMSComponentContainerModel |
getCMSComponentContainerForId(java.lang.String id)
Gets the cms component container for id.
|
AbstractCMSComponentModel |
getCMSComponentForId(java.lang.String id)
Gets the cms component for id.
|
AbstractCMSComponentModel |
getCMSComponentForIdAndCatalogVersions(java.lang.String id,
java.util.Collection<CatalogVersionModel> catalogVersions)
Gets the cms component matching the id by searching in the given catalog versions.
|
java.util.Collection<AbstractCMSComponentModel> |
getCMSComponentsForContainer(AbstractCMSComponentContainerModel container)
Get the collection of components that should be provided when a container component is requested.
|
java.util.Collection<AbstractCMSComponentContainerModel> |
getContainersForContentSlot(ContentSlotModel contentSlot)
Gets the collection of containers within a content slot.
|
java.util.Collection<AbstractCMSComponentModel> |
getDisplayedComponentsForContentSlot(ContentSlotModel contentSlot)
Get the collection of displayed components within a content slot.
|
java.util.Collection<java.lang.String> |
getEditorProperties(ItemModel component)
Get all editor properties for the given content element.
|
java.util.Collection<java.lang.String> |
getSystemProperties(AbstractCMSComponentModel component)
Get all system properties for the given content element.
|
void |
removeCMSComponentFromContentSlot(AbstractCMSComponentModel component,
ContentSlotModel slotModel)
Removes the cms component from content slot.
|
AbstractCMSComponentModel createCmsComponent(ContentSlotModel contentSlotModel, java.lang.String componentUid, java.lang.String componentName, java.lang.String typeCode)
contentSlotModel - the content slotcomponentUid - the uid for the new cms componentcomponentName - the name for new cms componenttypeCode - the composed type code for new cms componentjava.lang.String generateCmsComponentUid()
java.util.Collection<ComposedTypeModel> getAllowedCMSComponentContainers()
java.util.Collection<ComposedTypeModel> getAllowedCMSComponents()
AbstractCMSComponentContainerModel getCMSComponentContainerForId(java.lang.String id) throws AmbiguousIdentifierException, UnknownIdentifierException
id - the id of cms component container.AmbiguousIdentifierException - thrown when more than one object has been found.UnknownIdentifierException - thrown when no object has been foundAbstractCMSComponentModel getCMSComponentForId(java.lang.String id) throws AmbiguousIdentifierException, UnknownIdentifierException
id - the id of cms componentAmbiguousIdentifierException - thrown when more than one object has been found.UnknownIdentifierException - thrown when no object has been foundAbstractCMSComponentModel getCMSComponentForIdAndCatalogVersions(java.lang.String id, java.util.Collection<CatalogVersionModel> catalogVersions) throws AmbiguousIdentifierException, UnknownIdentifierException
id - the id of cms componentcatalogVersions - the collection of catalog versionsAmbiguousIdentifierException - thrown when more than one object has been found.UnknownIdentifierException - thrown when no object has been foundjava.util.Collection<java.lang.String> getEditorProperties(ItemModel component)
component - the component which editor properties should be retrievedjava.util.Collection<java.lang.String> getSystemProperties(AbstractCMSComponentModel component)
component - the component which system properties should be retrievedvoid removeCMSComponentFromContentSlot(AbstractCMSComponentModel component, ContentSlotModel slotModel)
component - the component to removeslotModel - the content slot from which the component will be removed.java.util.List<AbstractCMSComponentModel> getAllCMSComponentsForCatalogVersion(CatalogVersionModel catalogVersionModel)
catalogVersionModel - the catalog version modeljava.util.Collection<AbstractCMSComponentModel> getCMSComponentsForContainer(AbstractCMSComponentContainerModel container)
This service depends on a CMSComponentContainerStrategy to decide if:
container - - the container model from which we want to get the componentsnulljava.util.Collection<AbstractCMSComponentModel> getDisplayedComponentsForContentSlot(ContentSlotModel contentSlot)
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.
contentSlot - - the content slot for which we want to get all displayed componentsnulljava.util.Collection<AbstractCMSComponentContainerModel> getContainersForContentSlot(ContentSlotModel contentSlot)
contentSlot - - the content slot for which to get all containersnullSearchResult<AbstractCMSComponentModel> findByCatalogVersionAndMask(CatalogVersionModel catalogVersionModel, java.lang.String mask, PageableData pageableData)
PageableData 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 maskcatalogVersionModel - 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 © 2018 SAP SE. All Rights Reserved.