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
public class DocumentModelResourceAdapter extends AbstractResourceAdapter implements Serializable
Resource adapter using the document model id.- Author:
- Anahide Tchertchian
- See Also:
- Serialized Form
-
-
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
Constructors Constructor Description DocumentModelResourceAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<?>
getKlass()
Resource
getResource(Serializable object, Map<String,Object> context)
Transforms an incoming object into a Resource.Serializable
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 Detail
-
DocumentModelResourceAdapter
public DocumentModelResourceAdapter()
-
-
Method Detail
-
getResourceRepresentation
public Serializable getResourceRepresentation(Resource resource, Map<String,Object> context)
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
public Resource getResource(Serializable object, Map<String,Object> context)
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
public Class<?> getKlass()
- Specified by:
getKlass
in interfaceResourceAdapter
- Overrides:
getKlass
in classAbstractResourceAdapter
- Returns:
- the class being adapted
-
-