org.nuxeo.ecm.automation
Class OperationContext
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<java.lang.String,java.lang.Object>
org.nuxeo.ecm.automation.OperationContext
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,java.lang.Object>
- Direct Known Subclasses:
- RestOperationContext
public class OperationContext
- extends java.util.HashMap<java.lang.String,java.lang.Object>
An operation context. Holds context objects, a context parameters map and a
list of operations to run.
Context objects are:
- The Operation Chain Input - optional. It will be used as the input for
the first operation in the chain. If input is null then only VOID methods in
the first operation will be matched.
- A Core Session - which is optional and should be provided by the caller.
(either at creation time as a constructor argument, either using the
setCoreSession(CoreSession)
method. When running the operation chain
in asynchronous mode another session will be created by preserving the
current session credentials.
Each entry in the operation list contains the ID of the operation to be run
and a map of operation parameters to use when initializing the operation.
The context parameters map can be filled with contextual information by the
caller. Each operation will be able to access the contextual data at runtime
and to update it if needed.
- Author:
- Bogdan Stefanescu
- See Also:
- Serialized Form
Nested classes/interfaces inherited from class java.util.AbstractMap |
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V> |
Methods inherited from class java.util.HashMap |
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values |
Methods inherited from class java.util.AbstractMap |
equals, hashCode, toString |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
equals, hashCode |
OperationContext
public OperationContext()
OperationContext
public OperationContext(CoreSession session)
setCoreSession
public void setCoreSession(CoreSession session)
setCommit
public void setCommit(boolean commit)
isCommit
public boolean isCommit()
getCoreSession
public CoreSession getCoreSession()
getLoginStack
public LoginStack getLoginStack()
getPrincipal
public java.security.Principal getPrincipal()
setInput
public void setInput(java.lang.Object input)
getInput
public java.lang.Object getInput()
peek
public java.lang.Object peek(java.lang.String type)
push
public void push(java.lang.String type,
java.lang.Object obj)
pop
public java.lang.Object pop(java.lang.String type)
pull
public java.lang.Object pull(java.lang.String type)
getAdapter
public <T> T getAdapter(java.lang.Class<T> type)
addCleanupHandler
public void addCleanupHandler(CleanupHandler handler)
removeCleanupHandler
public void removeCleanupHandler(CleanupHandler handler)
dispose
public void dispose()
throws OperationException
- Throws:
OperationException
Copyright © 2010 Nuxeo SAS. All Rights Reserved.