Interface ResourceAdapter
-
- All Known Implementing Classes:
AbstractResourceAdapter
,DocumentModelResourceAdapter
public interface ResourceAdapter
Adapter to transform any javaSerializable
into a qualified name resource and conversely.- Author:
- Anahide Tchertchian
-
-
Field Summary
Fields Modifier and Type Field Description static String
CORE_SESSION_CONTEXT_KEY
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method 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 aDocumentModel
.void
setNamespace(String namespace)
-
-
-
Field Detail
-
CORE_SESSION_CONTEXT_KEY
static final String CORE_SESSION_CONTEXT_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getNamespace
String getNamespace()
-
setNamespace
void setNamespace(String namespace)
-
getResource
Resource getResource(Serializable object, Map<String,Object> 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,Object> context)
Resolves the resource to an applicative representation, for instance aDocumentModel
.- Parameters:
context
- a context map (holding for instance aCoreSession
instance.- Returns:
- the representation
-
getKlass
Class<?> getKlass()
- Returns:
- the class being adapted
-
-