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 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
  • Field Details

    • httpStatus

      protected int httpStatus
      Specify 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