org.nuxeo.ecm.platform.relations.adapters
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
DocumentModelResourceAdapter
public DocumentModelResourceAdapter()
getResourceRepresentation
public Serializable getResourceRepresentation(Resource resource,
Map<String,Serializable> context)
- Description copied from interface:
ResourceAdapter
- Resolves the resource to an applicative representation, for instance a
DocumentModel
.
- Specified by:
getResourceRepresentation
in interface ResourceAdapter
- Overrides:
getResourceRepresentation
in class AbstractResourceAdapter
context
- a context map (holding for instance a CoreSession
instance.
- Returns:
- the representation
getResource
public Resource getResource(Serializable object,
Map<String,Serializable> context)
- Description copied from interface:
ResourceAdapter
- Transforms an incoming object into a Resource.
- Specified by:
getResource
in interface ResourceAdapter
- Overrides:
getResource
in class AbstractResourceAdapter
- Parameters:
object
- the object to transformcontext
- a context map
- Returns:
- the resource
getKlass
public Class<?> getKlass()
- Specified by:
getKlass
in interface ResourceAdapter
- Overrides:
getKlass
in class AbstractResourceAdapter
- Returns:
- the class being adapted
Copyright © 2011 Nuxeo SAS. All Rights Reserved.