org.nuxeo.ecm.platform.contentview.json
Class DocumentModelToJSON
java.lang.Object
org.nuxeo.ecm.platform.contentview.json.DocumentModelToJSON
- All Implemented Interfaces:
- PropertyVisitor
public class DocumentModelToJSON
- extends Object
- implements PropertyVisitor
Transforms a document model properties into a json object.
Only non-null properties are exported.
- Since:
- 5.4.2
DocumentModelToJSON
public DocumentModelToJSON()
getResult
public net.sf.json.JSONObject getResult()
run
public net.sf.json.JSONObject run(DocumentModel doc)
throws ClientException
- Throws:
ClientException
acceptPhantoms
public boolean acceptPhantoms()
- Specified by:
acceptPhantoms
in interface PropertyVisitor
visit
public Object visit(MapProperty property,
Object arg)
throws PropertyException
- Specified by:
visit
in interface PropertyVisitor
- Throws:
PropertyException
visit
public Object visit(ListProperty property,
Object arg)
throws PropertyException
- Specified by:
visit
in interface PropertyVisitor
- Throws:
PropertyException
visit
public Object visit(ScalarProperty property,
Object arg)
throws PropertyException
- Specified by:
visit
in interface PropertyVisitor
- Throws:
PropertyException
Copyright © 2011 Nuxeo SAS. All Rights Reserved.