Interface PageContentSlotComponentFacade
- All Known Implementing Classes:
DefaultPageContentSlotComponentFacade
public interface PageContentSlotComponentFacade
Facade for managing content slots contents.
-
Method Summary
Modifier and TypeMethodDescriptionaddComponentToContentSlot(PageContentSlotComponentData pageContentSlotComponent) Add an existing component item into a specific index position of an existing content slot.Get a list of content slot with their components and their position in the slots for a given page.moveComponent(String pageUid, String componentUid, String originSlotUid, PageContentSlotComponentData pageContentSlotComponentData) Moves a component within a slot or between slots.voidremoveComponentFromContentSlot(String slotId, String componentId) Remove a component item from a content slot.
-
Method Details
-
getPageContentSlotComponentsByPageId
List<PageContentSlotComponentData> getPageContentSlotComponentsByPageId(String pageId) throws CMSItemNotFoundException Get a list of content slot with their components and their position in the slots for a given page.- Parameters:
pageId- - the page for which to look up the content slots for- Returns:
- list of content slot ids with the component ids in each slot; never null
- Throws:
CMSItemNotFoundException- when the page cannot be found
-
addComponentToContentSlot
PageContentSlotComponentData addComponentToContentSlot(PageContentSlotComponentData pageContentSlotComponent) throws CMSItemNotFoundException Add an existing component item into a specific index position of an existing content slot.If the index provided is larger than or equal to the next available component index in the slot, then the component will be added into the next available index.
- Parameters:
pageContentSlotComponent- - DTO holding required attributes; never null- Returns:
- the pageContentSlotComponent holding the componentId added to the slot and the pageId, slotId and slot position of the targeted content slot.
- Throws:
CMSItemNotFoundException- when the component or slot cannot be foundValidationException- when some validation rules fail
-
removeComponentFromContentSlot
void removeComponentFromContentSlot(String slotId, String componentId) throws CMSItemNotFoundException Remove a component item from a content slot.- Parameters:
slotId- - the unique identifier of the content slot; never nullcomponentId- - the unique identifier of the component item; never null- Throws:
CMSItemNotFoundException- when the component or slot cannot be foundComponentNotFoundInSlotException- when the component slot does not contain the component
-
moveComponent
PageContentSlotComponentData moveComponent(String pageUid, String componentUid, String originSlotUid, PageContentSlotComponentData pageContentSlotComponentData) throws CMSItemNotFoundException Moves a component within a slot or between slots.- Parameters:
pageUid- Page UIDcomponentUid- UID of the component to moveoriginSlotUid- The UID of the content slot that contains the origin content slotpageContentSlotComponentData-PageContentSlotComponentDataThe component which contains all information of it's final destination- Returns:
- the pageContentSlotComponent holding the componentId moved to the slot and the pageId, slotId and slot position of the targeted content slot.
- Throws:
CMSItemNotFoundException- when the component or slot cannot be foundComponentNotAllowedInSlotException- when the component type is not allowed in the given content slotValidationException- when there are validation errors
-