Class CmsJsonRendererContainerPage
java.lang.Object
org.opencms.xml.xml2json.renderer.CmsJsonRendererContainerPage
Used for rendering container pages as a JSON structure.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionclassTree node wrapper for a container.classTree node wrapper around a container element.
- 
Constructor SummaryConstructorsConstructorDescriptionCmsJsonRendererContainerPage(CmsObject cms, CmsResource page, Predicate<String> propertyFilter) Creates a new renderer instance.
- 
Method SummaryModifier and TypeMethodDescriptionbuildTree(CmsContainerPageBean page, String rootPath) Builds a tree from the given container page bean.Renders the JSON for the container page.
- 
Constructor Details- 
CmsJsonRendererContainerPagepublic CmsJsonRendererContainerPage(CmsObject cms, CmsResource page, Predicate<String> propertyFilter) Creates a new renderer instance.- Parameters:
- cms- the CMS context
- page- the container page to render
- propertyFilter- the property filter
 
 
- 
- 
Method Details- 
buildTreepublic CmsJsonRendererContainerPage.ElementNode buildTree(CmsContainerPageBean page, String rootPath) 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
 
- 
renderJsonRenders the JSON for the container page.- Returns:
- the JSON for the container page
- Throws:
- Exception- if something goes wrong
 
 
-