Interface BatchFacade
public interface BatchFacade
Provides methods to process ODataRequest
s and BatchRequestPart
s
in the context of a batch request.
Within a BatchProcessor
implementation
BatchRequestParts should be passed to handleBatchRequest(BatchRequestPart)
.
Only if the BatchRequestPart represents a change set, the request will be delegated to
BatchProcessor.processChangeSet(BatchFacade, java.util.List)
.
Otherwise the requests will be directly executed.
The processor implementation could use handleODataRequest(ODataRequest)
to process
requests in a change set.
-
Method Summary
Modifier and TypeMethodDescriptionextractBoundaryFromContentType
(String contentType) Extracts the boundary of a multipart/mixed header.handleBatchRequest
(BatchRequestPart request) Handles a BatchRequestPart.handleODataRequest
(ODataRequest request) Executes an ODataRequest, which must be a part of a change set.
-
Method Details
-
handleODataRequest
ODataResponse handleODataRequest(ODataRequest request) throws ODataApplicationException, ODataLibraryException Executes an ODataRequest, which must be a part of a change set. Each request must have a Content-Id header field, which holds an identifier that is unique in the whole batch request.- Parameters:
request
- ODataRequest to process- Returns:
- corresponding ODataResponse to the given request
- Throws:
ODataApplicationException
ODataLibraryException
-
handleBatchRequest
ODataResponsePart handleBatchRequest(BatchRequestPart request) throws ODataApplicationException, ODataLibraryException Handles a BatchRequestPart.- Parameters:
request
- Request to process- Returns:
- corresponding
ODataResponsePart
- Throws:
ODataApplicationException
ODataLibraryException
-
extractBoundaryFromContentType
String extractBoundaryFromContentType(String contentType) throws ODataApplicationException, ODataLibraryException Extracts the boundary of a multipart/mixed header. See RFC 2046#5.1- Parameters:
contentType
- Content Type- Returns:
- boundary
- Throws:
ODataApplicationException
ODataLibraryException
-