org.nuxeo.ecm.platform.relations.api
Interface ResourceAdapter
- All Known Implementing Classes:
- AbstractResourceAdapter, DocumentModelResourceAdapter
public interface ResourceAdapter
Adapter to transform any java Serializable
into a qualified name
resource and conversely.
- Author:
- Anahide Tchertchian
CORE_SESSION_ID_CONTEXT_KEY
static final String CORE_SESSION_ID_CONTEXT_KEY
- See Also:
- Constant Field Values
getNamespace
String getNamespace()
setNamespace
void setNamespace(String namespace)
getResource
Resource getResource(Serializable object,
Map<String,Serializable> context)
- Transforms an incoming object into a Resource.
- Parameters:
object
- the object to transformcontext
- a context map
- Returns:
- the resource
- Since:
- 5.2-M1
getResourceRepresentation
Serializable getResourceRepresentation(Resource resource,
Map<String,Serializable> context)
- Resolves the resource to an applicative representation, for instance a
DocumentModel
.
- Parameters:
resource
- context
- a context map (holding for instance a CoreSession
instance.
- Returns:
- the representation
getKlass
Class<?> getKlass()
- Returns:
- the class being adapted
Copyright © 2011 Nuxeo SAS. All Rights Reserved.