@Test(expectedExceptions = ValidationException.class, expectedExceptionsMessageRegExp = ".*Invalid stream reference found.*") public void testInvalidTextOutputStreamReference() { TransformRequest transformRequest = createTransformWithOutputStreams(CUSTOMER_ID); transformRequest.getOutputStreams().setText(Collections.singletonList(createOutputStream(DEFAULT_INPUT_REF))); validator.validatePOST(createRequest(transformRequest)); }
@Override public void validatePOST(DataObjectRequest<TransformRequest> request) { super.validatePOST(request); validationIssues = new LinkedList<>(); TransformRequest transform = request.getDataObject(); JsonNode rootTransformNode = jsonHelper.getObjectMapper().valueToTree(transform); validateInputs(transform.getInputs()); validateReferences(transform, rootTransformNode); processValidationIssues(validationIssues); }
TransformValidator extends DataObjectValidator<TransformRequest, DataObjectRequest<TransformRequest>> { @Override public void validatePOST(DataObjectRequest<TransformRequest> request) { super.validatePOST(request); validationIssues = new LinkedList<>(); TransformRequest transform = request.getDataObject(); JsonNode rootTransformNode = jsonHelper.getObjectMapper().valueToTree(transform); validateInputs(transform.getInputs()); validateReferences(transform, rootTransformNode); processValidationIssues(validationIssues); } }
TransformValidator extends DataObjectValidator<TransformRequest, DataObjectRequest<TransformRequest>> { @Override public void validatePOST(DataObjectRequest<TransformRequest> request) { super.validatePOST(request); validationIssues = new LinkedList<>(); TransformRequest transform = request.getDataObject(); JsonNode rootTransformNode = jsonHelper.getObjectMapper().valueToTree(transform); validateInputs(transform.getInputs()); validateReferences(transform, rootTransformNode); processValidationIssues(validationIssues); }  }
TransformValidator extends DataObjectValidator<TransformRequest, DataObjectRequest<TransformRequest>> { @Override public void validatePOST(DataObjectRequest<TransformRequest> request) { super.validatePOST(request); validationIssues = new LinkedList<>(); TransformRequest transform = request.getDataObject(); JsonNode rootTransformNode = jsonHelper.getObjectMapper().valueToTree(transform); validateInputs(transform.getInputs()); validateReferences(transform, rootTransformNode); processValidationIssues(validationIssues); }  @Override void validatePOST(DataObjectRequest<TransformRequest> request); void setJsonHelper(JsonHelper jsonHelper); }
TransformValidator extends DataObjectValidator<TransformRequest, DataObjectRequest<TransformRequest>> { @Override public void validatePOST(DataObjectRequest<TransformRequest> request) { super.validatePOST(request); validationIssues = new LinkedList<>(); TransformRequest transform = request.getDataObject(); JsonNode rootTransformNode = jsonHelper.getObjectMapper().valueToTree(transform); validateInputs(transform.getInputs()); validateReferences(transform, rootTransformNode); processValidationIssues(validationIssues); }  @Override void validatePOST(DataObjectRequest<TransformRequest> request); void setJsonHelper(JsonHelper jsonHelper);  }