Class JSonTreeSerializer

java.lang.Object
org.nuxeo.ecm.webengine.ui.tree.JSonTreeSerializer
All Implemented Interfaces:
TreeItemVisitor
Direct Known Subclasses:
JSonDocumentTreeSerializer

public class JSonTreeSerializer extends Object implements TreeItemVisitor
Author:
Bogdan Stefanescu
  • Constructor Details

    • JSonTreeSerializer

      public JSonTreeSerializer()
  • Method Details

    • getUrl

      public String getUrl(TreeItem item)
      Must be overridden to provide real URLs
    • toJSON

      public net.sf.json.JSONArray toJSON(Collection<TreeItem> items)
    • toJSON

      public net.sf.json.JSONArray toJSON(TreeItem[] items)
    • toJSON

      public net.sf.json.JSONObject toJSON(TreeItem root)
    • visit

      public Object visit(TreeItem item)
      Description copied from interface: TreeItemVisitor
      Visit a tree item.
      Specified by:
      visit in interface TreeItemVisitor
      Parameters:
      item - the item to visit
    • item2JSON

      protected net.sf.json.JSONObject item2JSON(TreeItem item, net.sf.json.JSONArray children)
      You may override this method to change the output JSON.