Class CmsJsonRendererContainerPage

java.lang.Object
org.opencms.xml.xml2json.renderer.CmsJsonRendererContainerPage

Used for rendering container pages as a JSON structure.
  • Constructor Details

  • Method Details

    • buildTree

      Builds a tree from the given container page bean.

      The returned tree consists of container nodes (which have children corresponding the container elements) and element nodes (which have children corresponding to the nested containers of the element). The root of the tree is a dummy element node which does not correspond to any element in the page, but just acts as a container for the top-level containers of the page.

      Parameters:
      page - the container page bean
      rootPath - the root path of the container page
      Returns:
      the dummy root element node
    • renderJson

      public Object renderJson() throws Exception
      Renders the JSON for the container page.
      Returns:
      the JSON for the container page
      Throws:
      Exception - if something goes wrong