Package com.boomi.connector.util
Class BaseDeleteOperation
- java.lang.Object
-
- com.boomi.connector.util.ContextualOperation
-
- com.boomi.connector.util.BaseOperation
-
- com.boomi.connector.util.BaseDeleteOperation
-
- All Implemented Interfaces:
Operation
public abstract class BaseDeleteOperation extends BaseOperation
Utility base class for implementing a DELETEOperation
.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
BaseDeleteOperation(OperationContext context)
protected
BaseDeleteOperation(BaseConnection<OperationContext> conn)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
execute(OperationRequest request, OperationResponse response)
Executes an operation with the given request, passing results to the given response.protected abstract void
executeDelete(DeleteRequest request, OperationResponse response)
Actual implementation of this DELETE Operation.-
Methods inherited from class com.boomi.connector.util.ContextualOperation
getConnection, getContext
-
-
-
-
Constructor Detail
-
BaseDeleteOperation
protected BaseDeleteOperation(OperationContext context)
-
BaseDeleteOperation
protected BaseDeleteOperation(BaseConnection<OperationContext> conn)
-
-
Method Detail
-
execute
public void execute(OperationRequest request, OperationResponse response)
Executes an operation with the given request, passing results to the given response.Any
TrackedData
received as part of a request should eventually be passed into the response. Any data not passed along will be marked as "failed" by the atom (thus, any thrown exceptions will cause all outstanding data to be marked as "failed"). There are 4 scenarios for input/output relationships, each of which can be handled conveniently via theResponseUtil
utility:- Single Input(TrackedData) -> Single Output(Payload) - the common scenario where each input results in
a single output. Each input TrackedData will be passed to the response with the relevant output using
OperationResponse.addResult(com.boomi.connector.api.TrackedData, com.boomi.connector.api.OperationStatus, java.lang.String, java.lang.String, com.boomi.connector.api.Payload)
. - Multiple Inputs(TrackedData) -> Single Output(Payload) - this scenario generally results from
operations which take batches of input and return a single result status. Since multiple inputs are responsible
for the single output, they should all be passed together to the response with the relevant output using
OperationResponse.addCombinedResult(java.lang.Iterable<? extends com.boomi.connector.api.TrackedData>, com.boomi.connector.api.OperationStatus, java.lang.String, java.lang.String, com.boomi.connector.api.Payload)
. - Single Input(TrackedData) -> Multiple Outputs(Payload) - this scenario generally results from query
type operations where a single query returns many results. Since the same input is responsible for many outputs,
the outputs should be passed to the response as a "partial" result using
OperationResponse.addPartialResult(com.boomi.connector.api.TrackedData, com.boomi.connector.api.OperationStatus, java.lang.String, java.lang.String, com.boomi.connector.api.Payload)
until all results have been processed, at which point the input should be passed to the response as "finished" usingOperationResponse.finishPartialResult(com.boomi.connector.api.TrackedData)
. - Single/Multiple Inputs(TrackedData) -> No Output(Payload) - this scenario may result from operations
which return no response, such as a GET request with an id for which no object exists. Each input TrackedData
should be passed to the response using
OperationResponse.addEmptyResult(com.boomi.connector.api.TrackedData, com.boomi.connector.api.OperationStatus, java.lang.String, java.lang.String)
.
Base implementation redirects to
executeDelete(com.boomi.connector.api.DeleteRequest, com.boomi.connector.api.OperationResponse)
.- Specified by:
execute
in interfaceOperation
- Overrides:
execute
in classBaseOperation
- Parameters:
request
- the current request for this operation. this object should be downcast to the request type for the relevant operation, one ofGetRequest
,DeleteRequest
,QueryRequest
orUpdateRequest
(for CREATE,UPDATE, and UPSERT operations).response
- object which should be updated with the results of this operation (see comments above).
- Single Input(TrackedData) -> Single Output(Payload) - the common scenario where each input results in
a single output. Each input TrackedData will be passed to the response with the relevant output using
-
executeDelete
protected abstract void executeDelete(DeleteRequest request, OperationResponse response)
Actual implementation of this DELETE Operation.- Parameters:
request
- request given toexecute(com.boomi.connector.api.OperationRequest, com.boomi.connector.api.OperationResponse)
, downcast to the correct typeresponse
- response given toexecute(com.boomi.connector.api.OperationRequest, com.boomi.connector.api.OperationResponse)
-
-