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 Object
- implements ResourceAdapter
- Author:
- Anahide Tchertchian
AbstractResourceAdapter
public AbstractResourceAdapter()
getNamespace
public String getNamespace()
- Specified by:
getNamespace
in interface ResourceAdapter
setNamespace
public void setNamespace(String namespace)
- Specified by:
setNamespace
in interface ResourceAdapter
getKlass
public Class<?> getKlass()
- Specified by:
getKlass
in interface ResourceAdapter
- Returns:
- the class being adapted
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
- Parameters:
object
- the object to transformcontext
- a context map
- Returns:
- the resource
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
context
- a context map (holding for instance a CoreSession
instance.
- Returns:
- the representation
Copyright © 2011 Nuxeo SAS. All Rights Reserved.