org.nuxeo.ecm.platform.relations.api.impl
Class AbstractResourceAdapter
java.lang.Object
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
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 |
AbstractResourceAdapter
public AbstractResourceAdapter()
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 transformcontext
- 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
Copyright © 2010 Nuxeo SAS. All Rights Reserved.