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
 
 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected Stringnamespace- 
Fields inherited from interface org.nuxeo.ecm.platform.relations.api.ResourceAdapter
CORE_SESSION_CONTEXT_KEY 
 - 
 
- 
Constructor Summary
Constructors Constructor Description AbstractResourceAdapter() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<?>getKlass()StringgetNamespace()ResourcegetResource(Serializable object, Map<String,Object> context)Transforms an incoming object into a Resource.SerializablegetResourceRepresentation(Resource resource, Map<String,Object> context)Resolves the resource to an applicative representation, for instance aDocumentModel.voidsetNamespace(String namespace) 
 - 
 
- 
- 
Field Detail
- 
namespace
protected String namespace
 
 - 
 
- 
Method Detail
- 
getNamespace
public String getNamespace()
- Specified by:
 getNamespacein interfaceResourceAdapter
 
- 
setNamespace
public void setNamespace(String namespace)
- Specified by:
 setNamespacein interfaceResourceAdapter
 
- 
getKlass
public Class<?> getKlass()
- Specified by:
 getKlassin interfaceResourceAdapter- Returns:
 - the class being adapted
 
 
- 
getResource
public Resource getResource(Serializable object, Map<String,Object> context)
Description copied from interface:ResourceAdapterTransforms an incoming object into a Resource.- Specified by:
 getResourcein interfaceResourceAdapter- Parameters:
 object- the object to transformcontext- a context map- Returns:
 - the resource
 
 
- 
getResourceRepresentation
public Serializable getResourceRepresentation(Resource resource, Map<String,Object> context)
Description copied from interface:ResourceAdapterResolves the resource to an applicative representation, for instance aDocumentModel.- Specified by:
 getResourceRepresentationin interfaceResourceAdaptercontext- a context map (holding for instance aCoreSessioninstance.- Returns:
 - the representation
 
 
 - 
 
 -