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 net.sf.json.JSONArray toJSON(Collection<TreeItem> items)
public net.sf.json.JSONArray toJSON(TreeItem[] items)
public net.sf.json.JSONObject toJSON(TreeItem root)
public Object visit(TreeItem item)
TreeItemVisitorvisit in interface TreeItemVisitoritem - the item to visitprotected net.sf.json.JSONObject item2JSON(TreeItem item, net.sf.json.JSONArray children)
Copyright © 2020 Nuxeo SA. All rights reserved.