public class JSonTreeSerializer extends Object implements TreeItemVisitor
Constructor and Description |
---|
JSonTreeSerializer() |
Modifier and Type | Method and Description |
---|---|
String |
getUrl(TreeItem item)
Must be overridden to provide real URLs
|
protected 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.
|
public JSonTreeSerializer()
public net.sf.json.JSONArray toJSON(Collection<TreeItem> items)
public Object visit(TreeItem item)
TreeItemVisitor
visit
in interface TreeItemVisitor
item
- the item to visitCopyright © 2018 Nuxeo. All rights reserved.