Class CmsContainer

  • All Implemented Interfaces:
    com.google.gwt.user.client.rpc.IsSerializable

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

    Since:
    8.0.0
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected CmsContainer()
      Hidden default constructor (for GWT serialization).
        CmsContainer​(java.lang.String name, java.lang.String type, java.lang.String emptyContainerContent, int width, int maxElements, boolean isDetailViewContainer, boolean detailView, boolean editable, java.util.List<CmsContainerElement> elements, java.lang.String parentContainerName, java.lang.String parentInstanceId, java.util.Map<java.lang.String,​java.lang.String> settingPresets)
      Constructor.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<CmsContainerElement> getElements()
      Returns the list of the contained elements id's.
      java.lang.String getEmptyContainerContent()
      Returns the content to display in case the container is empty.
      int getMaxElements()
      Returns the maximum number of elements allowed in this container.
      java.lang.String getName()
      Returns the container name, also used as HTML-id for the container DOM-element.
      java.lang.String getParentContainerName()
      Returns the parent container name.
      java.lang.String getParentInstanceId()
      Returns the parent instance id.
      java.util.Map<java.lang.String,​java.lang.String> getSettingPresets()
      Gets the setting presets.
      java.lang.String getType()
      Returns the container type.
      int getWidth()
      Returns the container width.
      boolean isDetailOnly()
      Returns true if the container is displayed in detail view only.
      boolean isDetailView()
      Returns if this container is used for detail views.
      boolean isDetailViewContainer()
      Checks if this is a detail view container.
      boolean isEditable()
      Returns if the container is editable by the current user.
      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.
      boolean isSubContainer()
      Returns if this is a sub container.
      void setDetailOnly​(boolean detailOnly)
      Sets the detail only flag.
      void setElements​(java.util.List<CmsContainerElement> elements)
      Sets the elements contained in this container.
      void setMaxElements​(int maxElements)
      Sets the maxElements.
      void setName​(java.lang.String name)
      Sets the name.
      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.
      void setType​(java.lang.String type)
      Sets the type.
      static java.util.Set<java.lang.String> splitType​(java.lang.String containerTypeSpec)
      Splits the type attribute of a container into individual types.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • CmsContainer

        public CmsContainer​(java.lang.String name,
                            java.lang.String type,
                            java.lang.String emptyContainerContent,
                            int width,
                            int maxElements,
                            boolean isDetailViewContainer,
                            boolean detailView,
                            boolean editable,
                            java.util.List<CmsContainerElement> elements,
                            java.lang.String parentContainerName,
                            java.lang.String parentInstanceId,
                            java.util.Map<java.lang.String,​java.lang.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 Detail

      • splitType

        public static java.util.Set<java.lang.String> splitType​(java.lang.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

        public java.util.List<CmsContainerElementgetElements()
        Returns the list of the contained elements id's.

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

        public java.lang.String 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 java.lang.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

        public java.lang.String getParentContainerName()
        Returns the parent container name.

        Returns:
        the parent container name
      • getParentInstanceId

        public java.lang.String getParentInstanceId()
        Returns the parent instance id.

        Returns:
        the parent instance id
      • getSettingPresets

        public java.util.Map<java.lang.String,​java.lang.String> getSettingPresets()
        Gets the setting presets.
        Returns:
        the setting presets
      • getType

        public java.lang.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​(java.util.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​(java.lang.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​(java.lang.String type)
        Sets the type.

        Parameters:
        type - the type to set
      • toString

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