Class CmsContainer
java.lang.Object
org.opencms.ade.containerpage.shared.CmsContainer
- All Implemented Interfaces:
com.google.gwt.user.client.rpc.IsSerializable
Container bean.
- Since:
- 8.0.0
-
Constructor Summary
ModifierConstructorDescriptionprotected
Hidden default constructor (for GWT serialization).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. -
Method Summary
Modifier and TypeMethodDescriptionReturns the list of the contained elements id's.Returns the content to display in case the container is empty.int
Returns the maximum number of elements allowed in this container.getName()
Returns the container name, also used as HTML-id for the container DOM-element.Returns the parent container name.Returns the parent instance id.Gets the setting presets.getType()
Returns the container type.int
getWidth()
Returns the container width.boolean
Returnstrue
if the container is displayed in detail view only.boolean
Returns if this container is used for detail views.boolean
Checks if this is a detail view container.boolean
Returns if the container is editable by the current user.boolean
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
Returns if this is a sub container.void
setDetailOnly
(boolean detailOnly) Sets the detail only flag.void
setElements
(List<CmsContainerElement> elements) Sets the elements contained in this container.void
setMaxElements
(int maxElements) Sets the maxElements.void
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
Sets the type.Splits the type attribute of a container into individual types.toString()
-
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-pagetype
- the container typeemptyContainerContent
- content to display in case the container is emptywidth
- the width of the containermaxElements
- the maximum number of elements displayed by this containerisDetailViewContainer
- flag indicating this is a detail view containerdetailView
- flag indicating this container is currently used for a detail vieweditable
- flag indicating the container is editable by the current userelements
- the container elements id'sparentContainerName
- the parent container nameparentInstanceId
- the parent instance idsettingPresets
- the presets for container element settings
-
CmsContainer
protected CmsContainer()Hidden default constructor (for GWT serialization).
-
-
Method Details
-
splitType
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
Returns the maximum number of elements allowed in this container.- Returns:
- the maximum number of elements allowed in this container
-
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
Returns the container type. Used to determine the formatter used to render the contained elements.- Returns:
- the container type
-
getWidth
Returns the container width.- Returns:
- the container width
-
isDetailOnly
Returnstrue
if the container is displayed in detail view only.- Returns:
true
if the container is displayed in detail view only
-
isDetailView
Returns if this container is used for detail views.- Returns:
true
if this container is used for detail views
-
isDetailViewContainer
Checks if this is a detail view container.- Returns:
- true if this is a detail view container
-
isEditable
Returns if the container is editable by the current user.- Returns:
true
if the container is editable by the current user
-
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
Returns if this is a sub container.- Returns:
true
this is a sub container
-
setDetailOnly
Sets the detail only flag.- Parameters:
detailOnly
-true
if the container is displayed in detail view only
-
setElements
Sets the elements contained in this container.- Parameters:
elements
- the elements
-
setMaxElements
Sets the maxElements.- Parameters:
maxElements
- the maxElements to set
-
setName
Sets the name.- Parameters:
name
- the name to set
-
setRootContainer
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
Sets the type.- Parameters:
type
- the type to set
-
toString
-