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()ResourcegetResource(Serializable object, Map<String,Object> context)Transforms an incoming object into a Resource.SerializablegetResourceRepresentation(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:ResourceAdapterResolves the resource to an applicative representation, for instance aDocumentModel.- Specified by:
getResourceRepresentationin interfaceResourceAdapter- Overrides:
getResourceRepresentationin classAbstractResourceAdaptercontext- a context map (holding for instance aCoreSessioninstance.- Returns:
- the representation
-
getResource
public Resource getResource(Serializable object, Map<String,Object> context)
Description copied from interface:ResourceAdapterTransforms an incoming object into a Resource.- Specified by:
getResourcein interfaceResourceAdapter- Overrides:
getResourcein classAbstractResourceAdapter- Parameters:
object- the object to transformcontext- a context map- Returns:
- the resource
-
getKlass
public Class<?> getKlass()
- Specified by:
getKlassin interfaceResourceAdapter- Overrides:
getKlassin classAbstractResourceAdapter- Returns:
- the class being adapted
-
-