Class CmsContainer

java.lang.Object
org.opencms.ade.containerpage.shared.CmsContainer
All Implemented Interfaces:
com.google.gwt.user.client.rpc.IsSerializable

public class CmsContainer extends Object implements com.google.gwt.user.client.rpc.IsSerializable
Container bean.

Since:
8.0.0
  • Constructor Details

    • CmsContainer

      public CmsContainer(String name, String type, String emptyContainerContent, int width, int maxElements, boolean isDetailViewContainer, boolean detailView, boolean editable, List<CmsContainerElement> elements, String parentContainerName, String parentInstanceId, Map<String,String> settingPresets)
      Constructor.

      Parameters:
      name - the container name, also used as id within a container-page
      type - the container type
      emptyContainerContent - content to display in case the container is empty
      width - the width of the container
      maxElements - the maximum number of elements displayed by this container
      isDetailViewContainer - flag indicating this is a detail view container
      detailView - flag indicating this container is currently used for a detail view
      editable - flag indicating the container is editable by the current user
      elements - the container elements id's
      parentContainerName - the parent container name
      parentInstanceId - the parent instance id
      settingPresets - the presets for container element settings
    • CmsContainer

      protected CmsContainer()
      Hidden default constructor (for GWT serialization).

  • Method Details

    • splitType

      public static Set<String> splitType(String containerTypeSpec)
      Splits the type attribute of a container into individual types.

      Parameters:
      containerTypeSpec - the container type attribute
      Returns:
      the entries of the type attribute
    • getElements

      Returns the list of the contained elements id's.

      Returns:
      the list of the contained elements id's
    • getEmptyContainerContent

      Returns the content to display in case the container is empty.

      Returns:
      the content to display in case the container is empty
    • getMaxElements

      public int getMaxElements()
      Returns the maximum number of elements allowed in this container.

      Returns:
      the maximum number of elements allowed in this container
    • getName

      public String getName()
      Returns the container name, also used as HTML-id for the container DOM-element. Has to be unique within the template.

      Returns:
      the container name
    • getParentContainerName

      Returns the parent container name.

      Returns:
      the parent container name
    • getParentInstanceId

      Returns the parent instance id.

      Returns:
      the parent instance id
    • getSettingPresets

      Gets the setting presets.
      Returns:
      the setting presets
    • getType

      public String getType()
      Returns the container type. Used to determine the formatter used to render the contained elements.

      Returns:
      the container type
    • getWidth

      public int getWidth()
      Returns the container width.

      Returns:
      the container width
    • isDetailOnly

      public boolean isDetailOnly()
      Returns true if the container is displayed in detail view only.

      Returns:
      true if the container is displayed in detail view only
    • isDetailView

      public boolean isDetailView()
      Returns if this container is used for detail views.

      Returns:
      true if this container is used for detail views
    • isDetailViewContainer

      public boolean isDetailViewContainer()
      Checks if this is a detail view container.
      Returns:
      true if this is a detail view container
    • isEditable

      public boolean isEditable()
      Returns if the container is editable by the current user.

      Returns:
      true if the container is editable by the current user
    • isRootContainer

      public boolean isRootContainer()
      Returns if this container not nested, or in case of a detail only container page the starting point of a detail only container hierarchy.

      Returns:
      true if this container not nested
    • isSubContainer

      public boolean isSubContainer()
      Returns if this is a sub container.

      Returns:
      true this is a sub container
    • setDetailOnly

      public void setDetailOnly(boolean detailOnly)
      Sets the detail only flag.

      Parameters:
      detailOnly - true if the container is displayed in detail view only
    • setElements

      public void setElements(List<CmsContainerElement> elements)
      Sets the elements contained in this container.

      Parameters:
      elements - the elements
    • setMaxElements

      public void setMaxElements(int maxElements)
      Sets the maxElements.

      Parameters:
      maxElements - the maxElements to set
    • setName

      public void setName(String name)
      Sets the name.

      Parameters:
      name - the name to set
    • setRootContainer

      public void setRootContainer(boolean isRootContainer)
      Sets the if this container not nested, or in case of a detail only container page the starting point of a detail only container hierarchy.

      Parameters:
      isRootContainer - true if this container not nested
    • setType

      public void setType(String type)
      Sets the type.

      Parameters:
      type - the type to set
    • toString

      public String toString()
      Overrides:
      toString in class Object
      See Also: