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.ResponsedoDelete()jakarta.ws.rs.core.ResponsedoGet()jakarta.ws.rs.core.ResponsedoPost(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 voidupdateCommentFromHeader(jakarta.ws.rs.core.HttpHeaders headers) Fills thedoccontext data with a comment from theUpdate-Commentheader if present.Methods inherited from class org.nuxeo.ecm.core.rest.DocumentObject
doPost, doPut, getAdapter, getCoreSession, getDelete, getDocument, getPut, getTitle, initialize, traverseMethods inherited from class org.nuxeo.ecm.webengine.model.impl.DefaultObject
disptachAdapter, isAdapterMethods 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, newObject, redirect, retrieveWebObjectType, setNext, setPrevious, setRoot, toString
-
Constructor Details
-
JSONDocumentObject
public JSONDocumentObject()
-
-
Method Details
-
doGet
@GET public jakarta.ws.rs.core.Response doGet()- Overrides:
doGetin 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:
doDeletein classDocumentObject
-
search
- Overrides:
searchin classDocumentObject
-
newDocument
- Overrides:
newDocumentin classDocumentObject
-
newDocument
- Overrides:
newDocumentin classDocumentObject
-
newDocument
- Overrides:
newDocumentin classDocumentObject
-
updateCommentFromHeader
protected void updateCommentFromHeader(jakarta.ws.rs.core.HttpHeaders headers) Fills thedoccontext data with a comment from theUpdate-Commentheader if present.- Since:
- 9.3
-