org.opencms.xml.containerpage
Class CmsContainerBean

java.lang.Object
  extended by org.opencms.xml.containerpage.CmsContainerBean

public class CmsContainerBean
extends java.lang.Object

One container of a container page.

Since:
8.0

Constructor Summary
CmsContainerBean(java.lang.String name, java.lang.String type, int maxElements, java.util.List<CmsContainerElementBean> elements)
          Creates a new container bean.
CmsContainerBean(java.lang.String name, java.lang.String type, java.util.List<CmsContainerElementBean> elements)
          Creates a new container bean with an unlimited number of elements.
 
Method Summary
 boolean containsElement(CmsUUID elementId)
          Returns true if the element with the provided id is contained in this container.
 java.util.Map<CmsUUID,java.lang.Boolean> getContainsElement()
          Returns a lazy initialized map that describes if a certain element if part of this container.
 java.util.List<CmsUUID> getElementIds()
          Returns the id's of all elements in this container.
 java.util.List<CmsContainerElementBean> getElements()
          Returns the elements in this container.
 int getMaxElements()
          Returns the maximal number of elements in this container.
 java.lang.String getName()
          Returns the name of this container.
 java.lang.String getType()
          Returns the type of this container.
 java.lang.String getWidth()
          Returns the container width set by the rendering container tag.
 void setMaxElements(int maxElements)
          Sets the maximal number of elements in the container.
 void setWidth(java.lang.String width)
          Sets the client side render with of this container.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmsContainerBean

public CmsContainerBean(java.lang.String name,
                        java.lang.String type,
                        java.util.List<CmsContainerElementBean> elements)
Creates a new container bean with an unlimited number of elements.

Parameters:
name - the container name
type - the container type
elements - the elements

CmsContainerBean

public CmsContainerBean(java.lang.String name,
                        java.lang.String type,
                        int maxElements,
                        java.util.List<CmsContainerElementBean> elements)
Creates a new container bean.

Parameters:
name - the container name
type - the container type
maxElements - the maximal number of elements in the container
elements - the elements
Method Detail

containsElement

public boolean containsElement(CmsUUID elementId)
Returns true if the element with the provided id is contained in this container.

Parameters:
elementId - the element id to check
Returns:
true if the element with the provided id is contained in this container

getContainsElement

public java.util.Map<CmsUUID,java.lang.Boolean> getContainsElement()
Returns a lazy initialized map that describes if a certain element if part of this container.

Returns:
a lazy initialized map that describes if a certain element if part of this container

getElementIds

public java.util.List<CmsUUID> getElementIds()
Returns the id's of all elements in this container.

Returns:
the id's of all elements in this container

getElements

public java.util.List<CmsContainerElementBean> getElements()
Returns the elements in this container.

Returns:
the elements in this container

getMaxElements

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

Returns:
the maximal number of elements in this container

getName

public java.lang.String getName()
Returns the name of this container.

Returns:
the name of this container

getType

public java.lang.String getType()
Returns the type of this container.

Returns:
the type of this container

getWidth

public java.lang.String getWidth()
Returns the container width set by the rendering container tag.

Returns:
the container width

setMaxElements

public void setMaxElements(int maxElements)
Sets the maximal number of elements in the container.

Parameters:
maxElements - the maximal number of elements to set

setWidth

public void setWidth(java.lang.String width)
Sets the client side render with of this container.

Parameters:
width - the client side render with of this container