public abstract class AbstractResourceAdapter extends Object implements ResourceAdapter
Modifier and Type | Field and Description |
---|---|
protected String |
namespace |
CORE_SESSION_CONTEXT_KEY
Constructor and Description |
---|
AbstractResourceAdapter() |
Modifier and Type | Method and Description |
---|---|
Class<?> |
getKlass() |
String |
getNamespace() |
Resource |
getResource(Serializable object,
Map<String,Object> context)
Transforms an incoming object into a Resource.
|
Serializable |
getResourceRepresentation(Resource resource,
Map<String,Object> context)
Resolves the resource to an applicative representation, for instance a
DocumentModel . |
void |
setNamespace(String namespace) |
public AbstractResourceAdapter()
public String getNamespace()
getNamespace
in interface ResourceAdapter
public void setNamespace(String namespace)
setNamespace
in interface ResourceAdapter
public Class<?> getKlass()
getKlass
in interface ResourceAdapter
public Resource getResource(Serializable object, Map<String,Object> context)
ResourceAdapter
getResource
in interface ResourceAdapter
object
- the object to transformcontext
- a context mappublic Serializable getResourceRepresentation(Resource resource, Map<String,Object> context)
ResourceAdapter
DocumentModel
.getResourceRepresentation
in interface ResourceAdapter
context
- a context map (holding for instance a CoreSession
instance.Copyright © 2018 Nuxeo. All rights reserved.