Package org.nuxeo.ecm.restapi.server
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.JSONDocumentObject
This object basically overrides the default DocumentObject that doesn't know how to produce/consume JSON
- Since:
- 5.7.2
-
Field Summary
Fields inherited from class org.nuxeo.ecm.core.rest.DocumentObject
doc
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.Response
doDelete()
jakarta.ws.rs.core.Response
doGet()
jakarta.ws.rs.core.Response
doPost
(DocumentModel inputDoc, jakarta.ws.rs.core.HttpHeaders headers) doPut
(DocumentModel inputDoc, jakarta.ws.rs.core.HttpHeaders headers) newDocument
(String path) newDocument
(DocumentModel doc) newDocument
(DocumentRef ref) search()
protected void
updateCommentFromHeader
(jakarta.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
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
-
Constructor Details
-
JSONDocumentObject
public JSONDocumentObject()
-
-
Method Details
-
doGet
@GET public jakarta.ws.rs.core.Response doGet()- Overrides:
doGet
in classDocumentObject
-
doPut
@PUT @Consumes("application/json") public DocumentModel doPut(DocumentModel inputDoc, @Context jakarta.ws.rs.core.HttpHeaders headers) - Returns:
- the document or the last version document in case of versioning handled
-
doPost
@POST @Consumes("application/json") public jakarta.ws.rs.core.Response doPost(DocumentModel inputDoc, @Context jakarta.ws.rs.core.HttpHeaders headers) -
doDelete
@DELETE public jakarta.ws.rs.core.Response doDelete()- Overrides:
doDelete
in classDocumentObject
-
search
- Overrides:
search
in classDocumentObject
-
newDocument
- Overrides:
newDocument
in classDocumentObject
-
newDocument
- Overrides:
newDocument
in classDocumentObject
-
newDocument
- Overrides:
newDocument
in classDocumentObject
-
updateCommentFromHeader
protected void updateCommentFromHeader(jakarta.ws.rs.core.HttpHeaders headers) Fills thedoc
context data with a comment from theUpdate-Comment
header if present.- Since:
- 9.3
-