Nuxeo Enterprise Platform 5.4

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

Field Summary
static java.lang.String CORE_SESSION_ID_CONTEXT_KEY
           
 
Method Summary
 java.lang.Class<?> getKlass()
           
 java.lang.String getNamespace()
           
 Resource getResource(java.io.Serializable object, java.util.Map<java.lang.String,java.io.Serializable> context)
          Transforms an incoming object into a Resource.
 java.io.Serializable getResourceRepresentation(Resource resource, java.util.Map<java.lang.String,java.io.Serializable> context)
          Resolves the resource to an applicative representation, for instance a DocumentModel.
 void setNamespace(java.lang.String namespace)
           
 

Field Detail

CORE_SESSION_ID_CONTEXT_KEY

static final java.lang.String CORE_SESSION_ID_CONTEXT_KEY
See Also:
Constant Field Values
Method Detail

getNamespace

java.lang.String getNamespace()

setNamespace

void setNamespace(java.lang.String namespace)

getResource

Resource getResource(java.io.Serializable object,
                     java.util.Map<java.lang.String,java.io.Serializable> context)
Transforms an incoming object into a Resource.

Parameters:
object - the object to transform
context - a context map
Returns:
the resource
Since:
5.2-M1

getResourceRepresentation

java.io.Serializable getResourceRepresentation(Resource resource,
                                               java.util.Map<java.lang.String,java.io.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

java.lang.Class<?> getKlass()
Returns:
the class being adapted

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.