Class RestOperationContext
- java.lang.Object
-
- java.util.AbstractMap<String,Object>
-
- org.nuxeo.ecm.automation.OperationContext
-
- org.nuxeo.ecm.automation.jaxrs.io.operations.RestOperationContext
-
- All Implemented Interfaces:
AutoCloseable
,Map<String,Object>
public class RestOperationContext extends OperationContext
A custom operation context to be used in REST calls on server side. This implementation is delegating the post execution cleanup to the webengine filter throughRequestContext
andRequestCleanupHandler
.This way temporary resources like files used by operations are removed after the response is sent to the client.
- Author:
- Bogdan Stefanescu
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Field Summary
Fields Modifier and Type Field Description protected int
httpStatus
Specify the http status when no failure occurs.-
Fields inherited from class org.nuxeo.ecm.automation.OperationContext
callback, commit, handleTransaction, input, loginStack, stacks, trace, vars
-
-
Constructor Summary
Constructors Constructor Description RestOperationContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addRequestCleanupHandler(javax.servlet.http.HttpServletRequest request)
Must be called before context execution.int
getHttpStatus()
void
setHttpStatus(int httpStatus)
-
Methods inherited from class org.nuxeo.ecm.automation.OperationContext
call, callWithChainParameters, callWithContextVar, close, entrySet, get, getAdapter, getCallback, getChainParameter, getChainParameters, getCoreSession, getInput, getLoginStack, getPrincipal, getSubContext, getSubContext, getVars, handleTransaction, isCommit, peek, pop, pull, push, put, putChainParameters, remove, removeChainParameters, resolve, setCallback, setCommit, setCoreSession, setInput, setRollback
-
Methods inherited from class java.util.AbstractMap
clear, clone, containsKey, containsValue, equals, hashCode, isEmpty, keySet, putAll, size, toString, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-