use of com.thinkbiganalytics.spark.rest.model.ModifiedTransformResponse in project kylo by Teradata.
the class AbstractTransformResponseModifier method modify.
/**
* Wrapper around the TransformRespone object
* This will call the <code>modifySuccessfulResults()</code> method when successfully returned
* otherwise it will return the wrapped response in its same state (i.e. PENDING, ERROR)
* @param response the response to check
* @return
*/
public ModifiedTransformResponse<T> modify(TransformResponse response) {
this.response = response;
this.responseTransformer = new TransformResponseUtil(response);
ModifiedTransformResponse modifiedTransformResponse = new ModifiedTransformResponse(response);
if (response.getStatus() == TransformResponse.Status.SUCCESS) {
modifySuccessfulResults(modifiedTransformResponse);
}
return modifiedTransformResponse;
}
Aggregations