Class CmsContainerPageWrapper

java.lang.Object
org.opencms.xml.containerpage.mutable.CmsContainerPageWrapper

public class CmsContainerPageWrapper extends Object
'Wrapper' around XML container page used for programmatic editing operations on container pages.

Uses mutable helper classes for the container page and its containers.

  • Constructor Details

  • Method Details

    • addElementToContainer

      public boolean addElementToContainer(String containerName, CmsContainerElementBean element)
      Adds an element to the given container (the first container with the given container suffix is used).
      Parameters:
      containerName - the container name or suffix
      element - the element to add
      Returns:
      false if there was no container to add the element to, true otherwise
    • marshal

      public byte[] marshal() throws CmsException
      Marshals the page data without writing it to the VFS.
      Returns:
      the marshalled page data
      Throws:
      CmsException - if something goes wrong
    • page

      Gets the mutable page bean instance.
      Returns:
      the mutable page bean
    • saveToVfs

      public void saveToVfs() throws CmsException
      Saves the page data to the VFS, using the same resource from which this object was created.
      Throws:
      CmsException - if something goes wrong