Nuxeo Enterprise Platform 5.4

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:
java.io.Serializable, ResourceAdapter

public class DocumentModelResourceAdapter
extends AbstractResourceAdapter
implements java.io.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
 java.lang.Class<?> getKlass()
           
 Resource getResource(java.io.Serializable object, java.util.Map<java.lang.String,java.io.Serializable> context)
          Transforms an incoming object into a Resource.
 java.io.Serializable getResourceRepresentation(Resource resource, java.util.Map<java.lang.String,java.io.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 java.io.Serializable getResourceRepresentation(Resource resource,
                                                      java.util.Map<java.lang.String,java.io.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(java.io.Serializable object,
                            java.util.Map<java.lang.String,java.io.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 java.lang.Class<?> getKlass()
Specified by:
getKlass in interface ResourceAdapter
Overrides:
getKlass in class AbstractResourceAdapter
Returns:
the class being adapted

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.