Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.platform.relations.api.impl
Class AbstractResourceAdapter

java.lang.Object
  extended by org.nuxeo.ecm.platform.relations.api.impl.AbstractResourceAdapter
All Implemented Interfaces:
ResourceAdapter
Direct Known Subclasses:
DocumentModelResourceAdapter

public abstract class AbstractResourceAdapter
extends java.lang.Object
implements ResourceAdapter

Author:
Anahide Tchertchian

Field Summary
 
Fields inherited from interface org.nuxeo.ecm.platform.relations.api.ResourceAdapter
CORE_SESSION_ID_CONTEXT_KEY
 
Constructor Summary
AbstractResourceAdapter()
           
 
Method Summary
 java.lang.Class<?> getKlass()
           
 java.lang.String getNamespace()
           
 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.
 void setNamespace(java.lang.String namespace)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractResourceAdapter

public AbstractResourceAdapter()
Method Detail

getNamespace

public java.lang.String getNamespace()
Specified by:
getNamespace in interface ResourceAdapter

setNamespace

public void setNamespace(java.lang.String namespace)
Specified by:
setNamespace in interface ResourceAdapter

getKlass

public java.lang.Class<?> getKlass()
Specified by:
getKlass in interface ResourceAdapter
Returns:
the class being adapted

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
Parameters:
object - the object to transform
context - a context map
Returns:
the resource

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
context - a context map (holding for instance a CoreSession instance.
Returns:
the representation

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.