org.apache.olingo.odata2.api.processor.part

## Interface BatchProcessor

- All Superinterfaces:
    ODataProcessor
  All Known Implementing Classes:
    CustomODataJPAProcessor, ListsProcessor, ODataJPADefaultProcessor, ODataJPAProcessor, ODataSingleProcessor

      public interface BatchProcessor
      extends ODataProcessor

  Execute a OData batch request.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `ODataResponse` | `executeBatch(BatchHandler handler, String contentType, InputStream content)` Executes a OData batch request and provide Batch Response as `ODataResponse`
    `BatchResponsePart` | `executeChangeSet(BatchHandler handler, List<ODataRequest> requests)` Executes a Change Set and provide BatchResponsePart as `BatchResponsePart` that contains the responses to change requests.

    - ### Methods inherited from interface org.apache.olingo.odata2.api.processor.ODataProcessor

      `getContext, setContext`

- - ### Method Detail

    - #### executeBatch

          ODataResponse executeBatch(BatchHandler handler,
                                     String contentType,
                                     InputStream content)
                              throws ODataException

      Executes a OData batch request and provide Batch Response as `ODataResponse`
      Parameters:
        `handler` - batch handler
        `contentType` - the content type of the request
        `content` - Batch Request body
      Returns:
        a `ODataResponse` object
      Throws:
        `ODataException`

    - #### executeChangeSet

          BatchResponsePart executeChangeSet(BatchHandler handler,
                                             List<ODataRequest> requests)
                                      throws ODataException

      Executes a Change Set and provide BatchResponsePart as `BatchResponsePart` that contains the responses to change requests. The method has to define a rollback semantic that may be applied when a request within a Change Set fails (all-or-nothing requirement). If a request within a Change Set fails, instead of Change Set Response should be returned the error response
      Parameters:
        `handler` - batch handler
        `requests` - list of single change requests
      Returns:
        a `BatchResponsePart` object
      Throws:
        `ODataException`

Copyright © 2013-2022 The Apache Software Foundation. All Rights Reserved.