Package org.opencms.ade.containerpage
Class CmsDetailOnlyContainerPageBuilder
- java.lang.Object
-
- org.opencms.ade.containerpage.CmsDetailOnlyContainerPageBuilder
-
public class CmsDetailOnlyContainerPageBuilder extends java.lang.Object
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
Nested Classes Modifier and Type Class Description static class
CmsDetailOnlyContainerPageBuilder.ContainerInfo
Bean containing the information for a single container.
-
Constructor Summary
Constructors Constructor Description CmsDetailOnlyContainerPageBuilder(CmsObject cms, CmsADEConfigData config)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addContainerElement(java.lang.String name, CmsResource resource)
Adds a resource to a container as an element.CmsContainerPageBean
build()
Builds the container page bean.void
setContainerType(java.lang.String name, java.lang.String type)
Sets the type of a container.void
setContainerWidth(java.lang.String name, java.lang.String width)
Sets the width of a container.
-
-
-
Constructor Detail
-
CmsDetailOnlyContainerPageBuilder
public CmsDetailOnlyContainerPageBuilder(CmsObject cms, CmsADEConfigData config)
Creates a new instance.- Parameters:
cms
- the current CMS contextconfig
- the sitemap configuration which should be used to determine the
-
-
Method Detail
-
addContainerElement
public void addContainerElement(java.lang.String name, CmsResource resource)
Adds a resource to a container as an element.- Parameters:
name
- the container nameresource
- the resource to add as a container elementv
-
build
public CmsContainerPageBean build()
Builds the container page bean.- Returns:
- the container page bean
-
setContainerType
public void setContainerType(java.lang.String name, java.lang.String type)
Sets the type of a container.- Parameters:
name
- the container nametype
- the container type
-
setContainerWidth
public void setContainerWidth(java.lang.String name, java.lang.String width)
Sets the width of a container.- Parameters:
name
- the container namewidth
- the container width
-
-