Class JSONDocumentObject
- java.lang.Object
-
- org.nuxeo.ecm.webengine.model.impl.AbstractResource<ResourceTypeImpl>
-
- org.nuxeo.ecm.webengine.model.impl.DefaultObject
-
- org.nuxeo.ecm.core.rest.DocumentObject
-
- org.nuxeo.ecm.restapi.server.jaxrs.JSONDocumentObject
-
public class JSONDocumentObject extends DocumentObject
This object basically overrides the default DocumentObject that doesn't know how to produce/consume JSON- Since:
- 5.7.2
-
-
Field Summary
Fields Modifier and Type Field Description protected static Log
log
-
Fields inherited from class org.nuxeo.ecm.core.rest.DocumentObject
doc
-
-
Constructor Summary
Constructors Constructor Description JSONDocumentObject()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.Response
doDelete()
DocumentModel
doGet()
javax.ws.rs.core.Response
doPost(DocumentModel inputDoc, javax.ws.rs.core.HttpHeaders headers)
DocumentModel
doPut(DocumentModel inputDoc, javax.ws.rs.core.HttpHeaders headers)
DocumentObject
newDocument(String path)
DocumentObject
newDocument(DocumentModel doc)
DocumentObject
newDocument(DocumentRef ref)
Object
search()
protected void
updateCommentFromHeader(javax.ws.rs.core.HttpHeaders headers)
Fills thedoc
context data with a comment from theUpdate-Comment
header if present.-
Methods inherited from class org.nuxeo.ecm.core.rest.DocumentObject
doHead, doPost, doPut, getAdapter, getCoreSession, getDelete, getDocument, getPut, getTitle, initialize, traverse
-
Methods inherited from class org.nuxeo.ecm.webengine.model.impl.DefaultObject
disptachAdapter, isAdapter
-
Methods inherited from class org.nuxeo.ecm.webengine.model.impl.AbstractResource
checkGuard, dispose, getActiveAdapter, getContext, getFacets, getLinks, getModule, getName, getNext, getNextSegment, getPath, getPrevious, getTemplate, getTrailingPath, getType, getURL, getView, hasFacet, initialize, isInstanceOf, isRoot, newAdapter, newObject, redirect, setNext, setPrevious, setRoot, toString
-
-
-
-
Field Detail
-
log
protected static final Log log
-
-
Method Detail
-
doGet
public DocumentModel doGet()
- Overrides:
doGet
in classDocumentObject
-
doPut
public DocumentModel doPut(DocumentModel inputDoc, @Context javax.ws.rs.core.HttpHeaders headers)
- Returns:
- the document or the last version document in case of versioning handled
-
doPost
public javax.ws.rs.core.Response doPost(DocumentModel inputDoc, @Context javax.ws.rs.core.HttpHeaders headers)
-
doDelete
public javax.ws.rs.core.Response doDelete()
- Overrides:
doDelete
in classDocumentObject
-
search
public Object search()
- Overrides:
search
in classDocumentObject
-
newDocument
public DocumentObject newDocument(String path)
- Overrides:
newDocument
in classDocumentObject
-
newDocument
public DocumentObject newDocument(DocumentRef ref)
- Overrides:
newDocument
in classDocumentObject
-
newDocument
public DocumentObject newDocument(DocumentModel doc)
- Overrides:
newDocument
in classDocumentObject
-
updateCommentFromHeader
protected void updateCommentFromHeader(javax.ws.rs.core.HttpHeaders headers)
Fills thedoc
context data with a comment from theUpdate-Comment
header if present.- Since:
- 9.3
-
-