Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.platform.relations.adapters
Class DocumentModelResourceAdapter

java.lang.Object
  extended by org.nuxeo.ecm.platform.relations.api.impl.AbstractResourceAdapter
      extended by 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 interface org.nuxeo.ecm.platform.relations.api.ResourceAdapter
CORE_SESSION_ID_CONTEXT_KEY
 
Constructor Summary
DocumentModelResourceAdapter()
           
 
Method Summary
 Class<?> getKlass()
           
 Resource getResource(Serializable object, Map<String,Serializable> context)
          Transforms an incoming object into a Resource.
 Serializable getResourceRepresentation(Resource resource, Map<String,Serializable> context)
          Resolves the resource to an applicative representation, for instance a DocumentModel.
 
Methods inherited from class org.nuxeo.ecm.platform.relations.api.impl.AbstractResourceAdapter
getNamespace, setNamespace
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentModelResourceAdapter

public DocumentModelResourceAdapter()
Method Detail

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 transform
context - 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

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.