Package org.opencms.ade.containerpage
Class CmsDetailOnlyContainerPageBuilder
java.lang.Object
org.opencms.ade.containerpage.CmsDetailOnlyContainerPageBuilder
This is a simple helper class to more easily produce container page beans to be used as detail-only containers.
To use this helper, you will need to set the type or width of each container and then add the resources to be used as container elements. The type or width must be set because this helper tries to automatically determine a default formatter for each container element.
Finally, call the build() method to produce the desired container page bean Element settings and nested containers are currently not supported.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Bean containing the information for a single container. -
Constructor Summary
ConstructorDescriptionCmsDetailOnlyContainerPageBuilder
(CmsObject cms, CmsADEConfigData config) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addContainerElement
(String name, CmsResource resource) Adds a resource to a container as an element.build()
Builds the container page bean.void
setContainerType
(String name, String type) Sets the type of a container.void
setContainerWidth
(String name, String width) Sets the width of a container.
-
Constructor Details
-
CmsDetailOnlyContainerPageBuilder
Creates a new instance.- Parameters:
cms
- the current CMS contextconfig
- the sitemap configuration which should be used to determine the
-
-
Method Details
-
addContainerElement
Adds a resource to a container as an element.- Parameters:
name
- the container nameresource
- the resource to add as a container elementv
-
build
Builds the container page bean.- Returns:
- the container page bean
-
setContainerType
Sets the type of a container.- Parameters:
name
- the container nametype
- the container type
-
setContainerWidth
Sets the width of a container.- Parameters:
name
- the container namewidth
- the container width
-