Interface PageContentSlotComponentFacade

All Known Implementing Classes:
DefaultPageContentSlotComponentFacade

public interface PageContentSlotComponentFacade
Facade for managing content slots contents.
  • 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 found
      ValidationException - 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 null
      componentId - - the unique identifier of the component item; never null
      Throws:
      CMSItemNotFoundException - when the component or slot cannot be found
      ComponentNotFoundInSlotException - 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 UID
      componentUid - UID of the component to move
      originSlotUid - The UID of the content slot that contains the origin content slot
      pageContentSlotComponentData - PageContentSlotComponentData The 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 found
      ComponentNotAllowedInSlotException - when the component type is not allowed in the given content slot
      ValidationException - when there are validation errors