Package org.nuxeo.ecm.webengine.ui.tree
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 Summary
Constructors Constructor Description JSonTreeSerializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getUrl(TreeItem item)
Must be overridden to provide real URLsprotected net.sf.json.JSONObject
item2JSON(TreeItem item, net.sf.json.JSONArray children)
You may override this method to change the output JSON.net.sf.json.JSONArray
toJSON(Collection<TreeItem> items)
net.sf.json.JSONObject
toJSON(TreeItem root)
net.sf.json.JSONArray
toJSON(TreeItem[] items)
Object
visit(TreeItem item)
Visit a tree item.
-
-
-
Method Detail
-
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 interfaceTreeItemVisitor
- 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.
-
-