public interface CMSAdminContentSlotService
| Modifier and Type | Method and Description |
|---|---|
void |
addCMSComponentToContentSlot(AbstractCMSComponentModel component,
ContentSlotModel slot,
Integer index)
Add an existing component item into a specific index position of an existing content slot.
|
ContentSlotModel |
createContentSlot(AbstractPageModel page,
String id,
String name,
String position)
Creates the
ContentSlotModel object and ContentSlotForPageModel relation. |
ContentSlotModel |
createContentSlot(AbstractPageModel page,
String id,
String name,
String position,
boolean active)
Creates the
ContentSlotModel object and ContentSlotForPageModel relation. |
ContentSlotModel |
createContentSlot(AbstractPageModel page,
String id,
String name,
String position,
boolean active,
Date activeFrom,
Date activeUntil)
Creates the
ContentSlotModel object and ContentSlotForPageModel relation. |
void |
deleteContentSlot(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,
String position)
deletes a relation between a page and a content slot.
|
Collection<CMSRelationModel> |
getAllRelationsForSlot(ContentSlotModel contentSlot)
Returns all page and template relations with references to this content slot
|
ContentSlotModel |
getContentSlot(String contentSlotId)
Deprecated.
use
getContentSlotForId(String) instead. |
ContentSlotModel |
getContentSlot(String contentSlotId,
Collection<CatalogVersionModel> catalogVersions)
Deprecated.
|
ContentSlotModel |
getContentSlotForId(String contentSlotId)
Gets the content slot for specific content slot id.
|
ContentSlotModel |
getContentSlotForIdAndCatalogVersions(String contentSlotId,
Collection<CatalogVersionModel> catalogVersions)
Gets the content slot for slot id and collection of catalog versions.
|
Collection<ContentSlotModel> |
getContentSlotsForCatalogVersion(CatalogVersionModel catalogVersion)
Find all content slots that belong to a given catalog version.
|
Collection<ContentSlotData> |
getContentSlotsForPage(AbstractPageModel page)
returns a collection of all content slots for the given page.
|
Collection<CMSRelationModel> |
getOnlyContentSlotRelationsForSlot(ContentSlotModel contentSlot)
Returns only page relations with references to this content slot.
|
Collection<ContentSlotForPageModel> |
getPageRelationsForSlot(ContentSlotModel contentSlot)
Deprecated.
since version 6.3; Please use
getContentSlotsForPage(AbstractPageModel) instead to retrieve
shared content slot information. |
Collection<ContentSlotForTemplateModel> |
getTemplateRelationsForSlot(ContentSlotModel contentSlot)
Deprecated.
since version 6.3; Please use
getContentSlotsForPage(AbstractPageModel) instead to retrieve
shared content slot information. |
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,
Integer index)
Update the position of an existing component item into a specific index position of an existing content slot.
|
ContentSlotModel createContentSlot(AbstractPageModel page, String id, String name, 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, String id, String name, 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, String id, String name, String position, boolean active, Date activeFrom, 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(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 - contentSlot - void deleteRelationByPosition(AbstractPageModel page, String position)
page - position - Collection<CMSRelationModel> getAllRelationsForSlot(ContentSlotModel contentSlot)
contentSlot - the content slot@Deprecated ContentSlotModel getContentSlot(String contentSlotId) throws CMSItemNotFoundException
getContentSlotForId(String) instead.contentSlotId - the content slot idCMSItemNotFoundException - the CMS item not found exceptionContentSlotModel getContentSlotForId(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 found@Deprecated ContentSlotModel getContentSlot(String contentSlotId, Collection<CatalogVersionModel> catalogVersions) throws CMSItemNotFoundException
getContentSlotForIdAndCatalogVersions(String, Collection) instead.contentSlotId - the content slot idcatalogVersions - the catalog versionsCMSItemNotFoundException - the CMS item not found exceptionContentSlotModel getContentSlotForIdAndCatalogVersions(String contentSlotId, 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 foundCollection<ContentSlotData> getContentSlotsForPage(AbstractPageModel page)
page - boolean hasOtherRelations(AbstractPageModel page, ContentSlotModel contentSlot)
page - contentSlot - true if there are other relations between the content slot and other pages; false
otherwiseboolean hasRelations(ContentSlotModel contentSlot)
contentSlot - true if there are relations to at least one other page; false otherwiseCollection<CMSRelationModel> getOnlyContentSlotRelationsForSlot(ContentSlotModel contentSlot)
getAllRelationsForSlot(ContentSlotModel) it does not return template relationscontentSlot - the content slotgetAllRelationsForSlot(ContentSlotModel)void addCMSComponentToContentSlot(AbstractCMSComponentModel component, ContentSlotModel slot, 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, 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 number@Deprecated Collection<ContentSlotForPageModel> getPageRelationsForSlot(ContentSlotModel contentSlot)
getContentSlotsForPage(AbstractPageModel) instead to retrieve
shared content slot information.contentSlot - the content slotContentSlotForPageModel objects or empty list when not found@Deprecated Collection<ContentSlotForTemplateModel> getTemplateRelationsForSlot(ContentSlotModel contentSlot)
getContentSlotsForPage(AbstractPageModel) instead to retrieve
shared content slot information.contentSlot - the content slotContentSlotForTemplateModel objects or empty list when not foundCollection<ContentSlotModel> getContentSlotsForCatalogVersion(CatalogVersionModel catalogVersion)
catalogVersion - - the catalog versionnullCopyright © 2017 SAP SE. All Rights Reserved.