public interface CMSAdminContentSlotService
| Modifier and Type | Method and Description |
|---|---|
void |
addCMSComponentToContentSlot(AbstractCMSComponentModel component,
ContentSlotModel slot,
java.lang.Integer index)
Add an existing component item into a specific index position of an existing content slot.
|
ContentSlotModel |
createContentSlot(AbstractPageModel page,
java.lang.String id,
java.lang.String name,
java.lang.String position)
Creates the
ContentSlotModel object and ContentSlotForPageModel relation. |
ContentSlotModel |
createContentSlot(AbstractPageModel page,
java.lang.String id,
java.lang.String name,
java.lang.String position,
boolean active)
Creates the
ContentSlotModel object and ContentSlotForPageModel relation. |
ContentSlotModel |
createContentSlot(AbstractPageModel page,
java.lang.String id,
java.lang.String name,
java.lang.String position,
boolean active,
java.util.Date activeFrom,
java.util.Date activeUntil)
Creates the
ContentSlotModel object and ContentSlotForPageModel relation. |
void |
deleteContentSlot(java.lang.String contentSlotId)
delete a content slot and ALL PAGE RELATIONS to it.
|
void |
deleteRelation(AbstractPageModel page,
ContentSlotModel contentSlot)
delete the relation between a content slot and a page
|
void |
deleteRelationByPosition(AbstractPageModel page,
java.lang.String position)
deletes a relation between a page and a content slot.
|
java.util.List<ContentSlotForPageModel> |
findAllContentSlotRelationsByPage(AbstractPageModel page)
Find all content slot relations by page.
|
java.util.List<ContentSlotForTemplateModel> |
findAllContentSlotRelationsByPageTemplate(PageTemplateModel template)
Find all content slot relations by page template.
|
java.util.Collection<CMSRelationModel> |
getAllRelationsForSlot(ContentSlotModel contentSlot)
Returns all page and template relations with references to this content slot
|
ContentSlotModel |
getContentSlotForId(java.lang.String contentSlotId)
Gets the content slot for specific content slot id.
|
ContentSlotModel |
getContentSlotForIdAndCatalogVersions(java.lang.String contentSlotId,
java.util.Collection<CatalogVersionModel> catalogVersions)
Gets the content slot for slot id and collection of catalog versions.
|
ContentSlotModel |
getContentSlotOverride(AbstractPageModel page,
ContentSlotModel contentSlot)
Find the content slot in the catalog hierarchy (used with multi-country)
|
java.lang.String |
getContentSlotPosition(AbstractPageModel page,
ContentSlotModel contentSlot)
Find the position of the content slot on the page or its associated page template
|
java.util.List<ContentSlotForPageModel> |
getContentSlotRelationsByPageId(java.lang.String pageId,
CatalogVersionModel catalogVersion)
Find content slot relations for a given pageId and catalog version.
|
java.util.Collection<ContentSlotModel> |
getContentSlotsForCatalogVersion(CatalogVersionModel catalogVersion)
Find all content slots that belong to a given catalog version.
|
java.util.Collection<ContentSlotData> |
getContentSlotsForPage(AbstractPageModel page)
returns a collection of all content slots for the given page.
|
java.util.Collection<ContentSlotData> |
getContentSlotsForPage(AbstractPageModel page,
boolean includeMasterTemplateSlots)
Returns a collection of all content slots for the given page.
|
java.util.Collection<CMSRelationModel> |
getOnlyContentSlotRelationsForSlot(ContentSlotModel contentSlot)
Returns only page relations with references to this content slot.
|
java.util.List<ContentSlotModel> |
getSortedMultiCountryContentSlots(java.util.List<ContentSlotModel> contentSlots,
java.util.List<CatalogVersionModel> catalogVersions)
Orders the given content slots according to the catalog level where the slots are defined.
|
boolean |
hasOtherRelations(AbstractPageModel page,
ContentSlotModel contentSlot)
Checks if there are other relations between the given content slot and other pages (except the given one)
|
boolean |
hasRelations(ContentSlotModel contentSlot)
Checks if the given content slot has relations to one or more pages
|
void |
updatePositionCMSComponentInContentSlot(AbstractCMSComponentModel component,
ContentSlotModel slot,
java.lang.Integer index)
Update the position of an existing component item into a specific index position of an existing content slot.
|
ContentSlotModel createContentSlot(AbstractPageModel page, java.lang.String id, java.lang.String name, java.lang.String position)
ContentSlotModel object and ContentSlotForPageModel relation. Method
explicitly saves both objects.page - the page which will be set for ContentSlotForPageModel relation.id - the id of content slot.name - the name of content slot.position - the position of page.ContentSlotModel object.ContentSlotModel createContentSlot(AbstractPageModel page, java.lang.String id, java.lang.String name, java.lang.String position, boolean active)
ContentSlotModel object and ContentSlotForPageModel relation. Method
explicitly saves both objects.page - the page which will be set for ContentSlotForPageModel relation.id - the id of content slot.name - the name of content slot.position - the position of page.active - the activity of content slot (true or false)ContentSlotModel object.ContentSlotModel createContentSlot(AbstractPageModel page, java.lang.String id, java.lang.String name, java.lang.String position, boolean active, java.util.Date activeFrom, java.util.Date activeUntil)
ContentSlotModel object and ContentSlotForPageModel relation. Method
explicitly saves both objects.page - the page which will be set for ContentSlotForPageModel relation.id - the id of content slot.name - the name of content slot.position - the position of page.active - the activity of content slot (true or false)activeFrom - start date of activity.activeUntil - end date of activity.ContentSlotModel object.void deleteContentSlot(java.lang.String contentSlotId)
throws CMSItemNotFoundException
contentSlotId - the identifier of the content slot to be deletedCMSItemNotFoundException - if the content slot could not be foundvoid deleteRelation(AbstractPageModel page, ContentSlotModel contentSlot)
page - the page modelcontentSlot - the content slot modelvoid deleteRelationByPosition(AbstractPageModel page, java.lang.String position)
page - the page modelposition - the positionjava.util.Collection<CMSRelationModel> getAllRelationsForSlot(ContentSlotModel contentSlot)
contentSlot - the content slotContentSlotModel getContentSlotForId(java.lang.String contentSlotId) throws UnknownIdentifierException, AmbiguousIdentifierException
contentSlotId - the content slot idAmbiguousIdentifierException - thrown when more than one object has been found.UnknownIdentifierException - thrown when no object has been foundContentSlotModel getContentSlotForIdAndCatalogVersions(java.lang.String contentSlotId, java.util.Collection<CatalogVersionModel> catalogVersions) throws UnknownIdentifierException, AmbiguousIdentifierException
contentSlotId - the content slot idcatalogVersions - the collection of catalog versionsAmbiguousIdentifierException - thrown when more than one object has been found.UnknownIdentifierException - thrown when no object has been foundjava.util.Collection<ContentSlotData> getContentSlotsForPage(AbstractPageModel page)
page - the page modeljava.util.List<ContentSlotForTemplateModel> findAllContentSlotRelationsByPageTemplate(PageTemplateModel template)
template - the page templateContentSlotForTemplateModel objects or empty list when not found.java.util.List<ContentSlotForPageModel> findAllContentSlotRelationsByPage(AbstractPageModel page)
page - the pageContentSlotForPageModel objects or empty list when not foundjava.util.Collection<ContentSlotData> getContentSlotsForPage(AbstractPageModel page, boolean includeMasterTemplateSlots)
page - the page for which to retrieve the content slotsincludeMasterTemplateSlots - true to include the content slots defined in the master page template, false otherwiseboolean hasOtherRelations(AbstractPageModel page, ContentSlotModel contentSlot)
page - the page modelcontentSlot - the content slot modeltrue if there are other relations between the content slot and other pages; false
otherwiseboolean hasRelations(ContentSlotModel contentSlot)
contentSlot - the content slot modeltrue if there are relations to at least one other page; false otherwisejava.util.Collection<CMSRelationModel> getOnlyContentSlotRelationsForSlot(ContentSlotModel contentSlot)
getAllRelationsForSlot(ContentSlotModel) it does not return template relationscontentSlot - the content slotgetAllRelationsForSlot(ContentSlotModel)void addCMSComponentToContentSlot(AbstractCMSComponentModel component, ContentSlotModel slot, java.lang.Integer index)
If the index provided is larger than the last available position in the slot, then the component will be added to the last position.
component - - the component item; never nullslot - - the content slot; never nullindex - - where to insert the component in the slot; never null, must be a positive numbervoid updatePositionCMSComponentInContentSlot(AbstractCMSComponentModel component, ContentSlotModel slot, java.lang.Integer index)
If the index provided is larger than the last available position in the slot, then the component will be added to the last position.
component - - the component item; never nullslot - - the content slot; never nullindex - - where to insert the component in the slot; never null, must be a positive numberjava.util.Collection<ContentSlotModel> getContentSlotsForCatalogVersion(CatalogVersionModel catalogVersion)
catalogVersion - - the catalog versionnulljava.util.List<ContentSlotModel> getSortedMultiCountryContentSlots(java.util.List<ContentSlotModel> contentSlots, java.util.List<CatalogVersionModel> catalogVersions)
CatalogLevelService to determine the ordering.contentSlots - - the content slots to be sortedcatalogVersions - - the catalog versionsContentSlotModel getContentSlotOverride(AbstractPageModel page, ContentSlotModel contentSlot)
page - - the page model used to determine the target catalog versioncontentSlot - - the content slot to be overriddenjava.util.List<ContentSlotForPageModel> getContentSlotRelationsByPageId(java.lang.String pageId, CatalogVersionModel catalogVersion)
pageId - the page identifiercatalogVersion - the catalog versionsContentSlotForPageModel objects or empty list when not foundjava.lang.String getContentSlotPosition(AbstractPageModel page, ContentSlotModel contentSlot)
page - the page model containing the content slotcontentSlot - the content slot to search fornull if not foundCopyright © 2018 SAP SE. All Rights Reserved.