Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.automation.client.jaxrs
Interface Session

All Known Implementing Classes:
DefaultSession

public interface Session

Author:
Bogdan Stefanescu

Method Summary
 java.lang.Object execute(OperationRequest request)
           
 void execute(OperationRequest request, AsyncCallback<java.lang.Object> cb)
           
<T> T
getAdapter(java.lang.Class<T> type)
          Get an adapter of the current session.
 AutomationClient getClient()
          Get the client that created this session.
 Blob getFile(java.lang.String path)
          Get a file from the server given a path identifying the file.
 void getFile(java.lang.String path, AsyncCallback<Blob> cb)
           
 Blobs getFiles(java.lang.String path)
          Get a collection of files from the server given the path identifying the collection.
 void getFiles(java.lang.String path, AsyncCallback<Blobs> cb)
           
 LoginInfo getLogin()
          Get the login used to authenticate against the server
 OperationDocumentation getOperation(java.lang.String id)
           
 java.util.Map<java.lang.String,OperationDocumentation> getOperations()
           
 OperationRequest newRequest(java.lang.String id)
          Create a new operation request given an operation ID.
 OperationRequest newRequest(java.lang.String id, java.util.Map<java.lang.String,java.lang.String> ctx)
          Create a new operation request given an operation ID and an operation context map.
 

Method Detail

getClient

AutomationClient getClient()
Get the client that created this session.

Returns:
the client. cannot be null.

getLogin

LoginInfo getLogin()
Get the login used to authenticate against the server

Returns:
the login. cannot be null.

newRequest

OperationRequest newRequest(java.lang.String id)
                            throws java.lang.Exception
Create a new operation request given an operation ID.

Parameters:
id - the ID of the operation to be executed.
Returns:
the operation request
Throws:
java.lang.Exception

newRequest

OperationRequest newRequest(java.lang.String id,
                            java.util.Map<java.lang.String,java.lang.String> ctx)
                            throws java.lang.Exception
Create a new operation request given an operation ID and an operation context map.

Parameters:
id - the operation id
ctx - the context map to be used when executing the operation on the server.
Returns:
the operation request
Throws:
java.lang.Exception

execute

java.lang.Object execute(OperationRequest request)
                         throws java.lang.Exception
Throws:
java.lang.Exception

execute

void execute(OperationRequest request,
             AsyncCallback<java.lang.Object> cb)

getFile

Blob getFile(java.lang.String path)
             throws java.lang.Exception
Get a file from the server given a path identifying the file.

Parameters:
path - the file path
Returns:
a blob representation of the file
Throws:
java.lang.Exception

getFiles

Blobs getFiles(java.lang.String path)
               throws java.lang.Exception
Get a collection of files from the server given the path identifying the collection.

Parameters:
path - the file path
Returns:
a collection of files represented as blobs.
Throws:
java.lang.Exception

getFile

void getFile(java.lang.String path,
             AsyncCallback<Blob> cb)
             throws java.lang.Exception
Throws:
java.lang.Exception

getFiles

void getFiles(java.lang.String path,
              AsyncCallback<Blobs> cb)
              throws java.lang.Exception
Throws:
java.lang.Exception

getOperation

OperationDocumentation getOperation(java.lang.String id)

getOperations

java.util.Map<java.lang.String,OperationDocumentation> getOperations()

getAdapter

<T> T getAdapter(java.lang.Class<T> type)
Get an adapter of the current session. Adapters can be used to define custom API over a Nuxeo Automation Session.

Optional operation. Environments that cannot support this method (like GWT) must throw UnsupportedOperationException

See Also:
AutomationClient.getAdapter(Object, Class)

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.