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>
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 through
RequestContext
and RequestCleanupHandler
.
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
Modifier and TypeFieldDescriptionprotected int
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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addRequestCleanupHandler
(javax.servlet.http.HttpServletRequest request) Must be called before context execution.int
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
-
Field Details
-
httpStatus
protected int httpStatusSpecify the http status when no failure occurs.- Since:
- 7.1
-
-
Constructor Details
-
RestOperationContext
public RestOperationContext()
-
-
Method Details
-
addRequestCleanupHandler
public void addRequestCleanupHandler(javax.servlet.http.HttpServletRequest request) Must be called before context execution. -
getHttpStatus
public int getHttpStatus()- Since:
- 7.1
-
setHttpStatus
public void setHttpStatus(int httpStatus) - Since:
- 7.1
-