Class DocumentModelResourceAdapter
java.lang.Object
org.nuxeo.ecm.platform.relations.api.impl.AbstractResourceAdapter
org.nuxeo.ecm.platform.relations.adapters.DocumentModelResourceAdapter
- All Implemented Interfaces:
Serializable
,ResourceAdapter
Resource adapter using the document model id.
- Author:
- Anahide Tchertchian
- See Also:
-
Field Summary
Fields inherited from class org.nuxeo.ecm.platform.relations.api.impl.AbstractResourceAdapter
namespace
Fields inherited from interface org.nuxeo.ecm.platform.relations.api.ResourceAdapter
CORE_SESSION_CONTEXT_KEY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionClass<?>
getKlass()
getResource
(Serializable object, Map<String, Object> context) Transforms an incoming object into a Resource.getResourceRepresentation
(Resource resource, Map<String, Object> context) Resolves the resource to an applicative representation, for instance aDocumentModel
.Methods inherited from class org.nuxeo.ecm.platform.relations.api.impl.AbstractResourceAdapter
getNamespace, setNamespace
-
Constructor Details
-
DocumentModelResourceAdapter
public DocumentModelResourceAdapter()
-
-
Method Details
-
getResourceRepresentation
Description copied from interface:ResourceAdapter
Resolves the resource to an applicative representation, for instance aDocumentModel
.- Specified by:
getResourceRepresentation
in interfaceResourceAdapter
- Overrides:
getResourceRepresentation
in classAbstractResourceAdapter
context
- a context map (holding for instance aCoreSession
instance.- Returns:
- the representation
-
getResource
Description copied from interface:ResourceAdapter
Transforms an incoming object into a Resource.- Specified by:
getResource
in interfaceResourceAdapter
- Overrides:
getResource
in classAbstractResourceAdapter
- Parameters:
object
- the object to transformcontext
- a context map- Returns:
- the resource
-
getKlass
- Specified by:
getKlass
in interfaceResourceAdapter
- Overrides:
getKlass
in classAbstractResourceAdapter
- Returns:
- the class being adapted
-