Package org.nuxeo.ecm.core.rest
Class DocumentObject
- java.lang.Object
-
- org.nuxeo.ecm.webengine.model.impl.AbstractResource<ResourceTypeImpl>
-
- org.nuxeo.ecm.webengine.model.impl.DefaultObject
-
- org.nuxeo.ecm.core.rest.DocumentObject
-
- Direct Known Subclasses:
DocumentRoot
,JSONDocumentObject
public class DocumentObject extends DefaultObject
- Author:
- Bogdan Stefanescu
-
-
Field Summary
Fields Modifier and Type Field Description protected DocumentModel
doc
-
Constructor Summary
Constructors Constructor Description DocumentObject()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.Response
doDelete()
Object
doGet()
Object
doHead()
javax.ws.rs.core.Response
doPost()
javax.ws.rs.core.Response
doPut()
<A> A
getAdapter(Class<A> adapter)
Returns an object which is an instance of the given class associated with this object.CoreSession
getCoreSession()
javax.ws.rs.core.Response
getDelete()
DocumentModel
getDocument()
javax.ws.rs.core.Response
getPut()
String
getTitle()
void
initialize(Object... args)
DocumentObject
newDocument(String path)
DocumentObject
newDocument(DocumentModel doc)
DocumentObject
newDocument(DocumentRef ref)
Object
search()
Resource
traverse(String path)
-
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
-
doc
protected DocumentModel doc
-
-
Method Detail
-
getAdapter
public <A> A getAdapter(Class<A> adapter)
Description copied from interface:Adaptable
Returns an object which is an instance of the given class associated with this object. Returnsnull
if no such object can be found.- Specified by:
getAdapter
in interfaceAdaptable
- Overrides:
getAdapter
in classAbstractResource<ResourceTypeImpl>
- Parameters:
adapter
- the adapter class to look up- Returns:
- a object castable to the given class, or
null
if this object does not have an adapter for the given class
-
initialize
public void initialize(Object... args)
- Overrides:
initialize
in classAbstractResource<ResourceTypeImpl>
-
doGet
public Object doGet()
-
getDelete
public javax.ws.rs.core.Response getDelete()
-
search
public Object search()
-
doDelete
public javax.ws.rs.core.Response doDelete()
-
doPost
public javax.ws.rs.core.Response doPost()
-
doPut
public javax.ws.rs.core.Response doPut()
-
getPut
public javax.ws.rs.core.Response getPut()
-
doHead
public Object doHead()
-
newDocument
public DocumentObject newDocument(String path)
-
newDocument
public DocumentObject newDocument(DocumentRef ref)
-
newDocument
public DocumentObject newDocument(DocumentModel doc)
-
getCoreSession
public CoreSession getCoreSession()
-
getDocument
public DocumentModel getDocument()
-
getTitle
public String getTitle()
-
-