public interface Session
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Remove any resources held by this session.
|
Object |
execute(OperationRequest request) |
void |
execute(OperationRequest request,
AsyncCallback<Object> cb) |
<T> T |
getAdapter(Class<T> type)
Get an adapter of the current session.
|
AutomationClient |
getClient()
Get the client that created this session.
|
String |
getDefaultSchemas()
Get the default schemas that should be sent by the server.
|
Blob |
getFile(String path)
Get a file from the server given a path identifying the file.
|
void |
getFile(String path,
AsyncCallback<Blob> cb) |
Blobs |
getFiles(String path)
Get a collection of files from the server given the path identifying the
collection.
|
void |
getFiles(String path,
AsyncCallback<Blobs> cb) |
LoginInfo |
getLogin()
Get the login used to authenticate against the server
|
OperationDocumentation |
getOperation(String id) |
Map<String,OperationDocumentation> |
getOperations() |
OperationRequest |
newRequest(String id)
Create a new operation request given an operation ID.
|
OperationRequest |
newRequest(String id,
Map<String,Object> ctx)
Create a new operation request given an operation ID and an operation
context map.
|
void |
setDefaultSchemas(String defaultSchemas)
Set the default schemas that should be sent by the server.
|
AutomationClient getClient()
LoginInfo getLogin()
OperationRequest newRequest(String id) throws Exception
id - the ID of the operation to be executed.ExceptionOperationRequest newRequest(String id, Map<String,Object> ctx) throws Exception
id - the operation idctx - the context map to be used when executing the operation on
the server.ExceptionObject execute(OperationRequest request) throws Exception
Exceptionvoid execute(OperationRequest request, AsyncCallback<Object> cb)
Blob getFile(String path) throws Exception
path - the file pathExceptionBlobs getFiles(String path) throws Exception
path - the file pathExceptionvoid getFile(String path, AsyncCallback<Blob> cb) throws Exception
Exceptionvoid getFiles(String path, AsyncCallback<Blobs> cb) throws Exception
ExceptionOperationDocumentation getOperation(String id)
Map<String,OperationDocumentation> getOperations()
<T> T getAdapter(Class<T> type)
Optional operation. Environments that cannot support this method (like
GWT) must throw UnsupportedOperationException
AutomationClient#getAdapter(Object, Class)String getDefaultSchemas()
This is a comma separated String (ex: dublincore,file)
default value is null (let the server decide what to send)
when Automation server convert the Documents to JSON, it will use this list to select what properties should be sent. You can explicitly set the X-NXDocumentProperties header at request level. If defaultSchemas, the request that don't already have the header set will inherit the default value.
void setDefaultSchemas(String defaultSchemas)
This is a comma separated String (ex: dublincore,file)
when Automation server convert the Documents to JSON, it will use this list to select what properties should be sent. You can explicitly set the X-NXDocumentProperties header at request level. If defaultSchemas, the request that don't already have the header set will inherit the default value.
defaultSchemas - list of schemas as a comma separated stringvoid close()
Copyright © 2013 Nuxeo SA. All Rights Reserved.