Class CmsMutableContainerPage
- java.lang.Object
-
- org.opencms.xml.containerpage.mutable.CmsMutableContainerPage
-
public class CmsMutableContainerPage extends java.lang.Object
Mutable bean representing a container page, for use in programmatically editing container pages.
-
-
Constructor Summary
Constructors Constructor Description CmsMutableContainerPage(java.util.List<CmsMutableContainer> containers)
Creates a new instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<CmsMutableContainer>
containers()
Returns the mutable list of containers for this container page.java.util.List<CmsMutableContainer>
containers(java.lang.String name)
Gets all containrs from the container page with a container name matching the given nameCmsMutableContainer
exactContainer(java.lang.String name)
Gets the container with exactly the given container name.CmsMutableContainer
firstContainer(java.lang.String name)
Gets the first container which has a name matching the given name.static CmsMutableContainerPage
fromImmutable(CmsContainerPageBean page)
Converts a CmsContainerPageBean to an instance of this class.CmsContainerPageBean
toImmutable()
Converts this object to a CmsContainerPageBean.
-
-
-
Constructor Detail
-
CmsMutableContainerPage
public CmsMutableContainerPage(java.util.List<CmsMutableContainer> containers)
Creates a new instance.- Parameters:
containers
- the containers comprising this container page.
-
-
Method Detail
-
fromImmutable
public static CmsMutableContainerPage fromImmutable(CmsContainerPageBean page)
Converts a CmsContainerPageBean to an instance of this class.- Parameters:
page
- the container page bean to convert- Returns:
- an instance of this class with the data from the container page bean
-
containers
public java.util.List<CmsMutableContainer> containers()
Returns the mutable list of containers for this container page.- Returns:
- the mutable list of containers
-
containers
public java.util.List<CmsMutableContainer> containers(java.lang.String name)
Gets all containrs from the container page with a container name matching the given name- Parameters:
name
- the name for which to look- Returns:
- the list of containers matching the given name
-
exactContainer
public CmsMutableContainer exactContainer(java.lang.String name)
Gets the container with exactly the given container name.- Parameters:
name
- the container name- Returns:
- the container with the given name, or null if none was found
-
firstContainer
public CmsMutableContainer firstContainer(java.lang.String name)
Gets the first container which has a name matching the given name.- Parameters:
name
- the name to match- Returns:
- the matching container, or null if none was found
-
toImmutable
public CmsContainerPageBean toImmutable()
Converts this object to a CmsContainerPageBean.- Returns:
- the container page bean
-
-