public abstract class SizeLimitedUpdateOperation extends BaseUpdateOperation
BaseUpdateOperation
extension that filters input data that is "too large". Implementations of this class are
free to load SINGLE documents into memory. This provides no protection against loading ALL documents into memory. The
filter limit is currently 1 MB and inputs that exceed the limit will be filtered out and marked as an application
error. It's still best practice to use a proper in memory parser instead of converting every stream to a string or
byte[].Modifier | Constructor and Description |
---|---|
protected |
SizeLimitedUpdateOperation(BaseConnection<OperationContext> connection)
Creates a new instance using the provided connection.
|
protected |
SizeLimitedUpdateOperation(OperationContext context)
Creates a new instance using the provided context.
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
executeSizeLimitedUpdate(UpdateRequest request,
OperationResponse response)
Execute the implementation update logic
|
protected void |
executeUpdate(UpdateRequest request,
OperationResponse response)
Creates a filtered
UpdateRequest that does not include any documents that exceed the size limit. |
protected String |
getSizeExceededMessage()
Returns the status message for excluded inputs.
|
protected String |
getSizeExceededStatusCode()
Returns the status code for excluded.
|
protected boolean |
includeSizeExceededPayload()
Indicates if the input document should be echoed as the application error payload.
|
execute
getConnection, getContext
protected SizeLimitedUpdateOperation(BaseConnection<OperationContext> connection)
protected SizeLimitedUpdateOperation(OperationContext context)
protected final void executeUpdate(UpdateRequest request, OperationResponse response)
UpdateRequest
that does not include any documents that exceed the size limit. The
filtered request is passed to executeSizeLimitedUpdate(UpdateRequest, OperationResponse)
implementation.executeUpdate
in class BaseUpdateOperation
request
- request given to BaseUpdateOperation.execute(com.boomi.connector.api.OperationRequest, com.boomi.connector.api.OperationResponse)
, downcast to the correct typeresponse
- response given to BaseUpdateOperation.execute(com.boomi.connector.api.OperationRequest, com.boomi.connector.api.OperationResponse)
protected abstract void executeSizeLimitedUpdate(UpdateRequest request, OperationResponse response)
request
- the filtered requestresponse
- the operation responseprotected String getSizeExceededStatusCode()
DEFAULT_STATUS_CODE
.protected String getSizeExceededMessage()
DEFAULT_STATUS_MESSAGE
.protected boolean includeSizeExceededPayload()