public BaseValidatingInterceptor<T> addValidatorModule(IValidatorModule theModule) { Validate.notNull(theModule, "theModule must not be null"); if (getValidatorModules() == null) { setValidatorModules(new ArrayList<IValidatorModule>()); } getValidatorModules().add(theModule); return this; }
/** * Sets the name of the response header to add validation failures to * * @see #DEFAULT_RESPONSE_HEADER_NAME * @see #setAddResponseHeaderOnSeverity(ResultSeverityEnum) */ @Override public void setResponseHeaderName(String theResponseHeaderName) { super.setResponseHeaderName(theResponseHeaderName); }
validationResult = doValidate(validator, theRequest); } catch (Exception e) { if (myIgnoreValidatorExceptions) { for (SingleValidationMessage next : validationResult.getMessages()) { if (next.getSeverity().ordinal() >= myAddResponseIssueHeaderOnSeverity) { addResponseIssueHeader(theRequestDetails, next); found = true; for (SingleValidationMessage next : validationResult.getMessages()) { if (next.getSeverity().ordinal() >= myFailOnSeverity) { postProcessResultOnFailure(theRequestDetails, validationResult); fail(theRequestDetails, validationResult); return validationResult; IParser parser = theRequestDetails.getServer().getFhirContext().newJsonParser().setPrettyPrint(false); String encoded = parser.encodeResourceToString(outcome); if (encoded.length() > getMaximumHeaderLength()) { encoded = encoded.substring(0, getMaximumHeaderLength() - 3) + "..."; postProcessResult(theRequestDetails, validationResult);
validationResult = doValidate(validator, theRequest); } catch (Exception e) { if (myIgnoreValidatorExceptions) { for (SingleValidationMessage next : validationResult.getMessages()) { if (next.getSeverity().ordinal() >= myAddResponseIssueHeaderOnSeverity) { addResponseIssueHeader(theRequestDetails, next); found = true; for (SingleValidationMessage next : validationResult.getMessages()) { if (next.getSeverity().ordinal() >= myFailOnSeverity) { postProcessResultOnFailure(theRequestDetails, validationResult); fail(theRequestDetails, validationResult); return validationResult; IParser parser = theRequestDetails.getServer().getFhirContext().newJsonParser().setPrettyPrint(false); String encoded = parser.encodeResourceToString(outcome); if (encoded.length() > getMaximumHeaderLength()) { encoded = encoded.substring(0, getMaximumHeaderLength() - 3) + "..."; postProcessResult(theRequestDetails, validationResult);
public BaseValidatingInterceptor<T> addValidatorModule(IValidatorModule theModule) { Validate.notNull(theModule, "theModule must not be null"); if (getValidatorModules() == null) { setValidatorModules(new ArrayList<IValidatorModule>()); } getValidatorModules().add(theModule); return this; }
/** * Sets the name of the response header to add validation failures to * * @see #DEFAULT_RESPONSE_HEADER_NAME * @see #setAddResponseHeaderOnSeverity(ResultSeverityEnum) */ @Override public void setResponseHeaderName(String theResponseHeaderName) { super.setResponseHeaderName(theResponseHeaderName); }
/** * Sets the name of the response header to add validation failures to * * @see #DEFAULT_RESPONSE_HEADER_NAME * @see #setAddResponseHeaderOnSeverity(ResultSeverityEnum) */ @Override public void setResponseHeaderName(String theResponseHeaderName) { super.setResponseHeaderName(theResponseHeaderName); }
/** * Sets the name of the response header to add validation failures to * * @see #DEFAULT_RESPONSE_HEADER_NAME * @see #setAddResponseHeaderOnSeverity(ResultSeverityEnum) */ @Override public void setResponseHeaderName(String theResponseHeaderName) { super.setResponseHeaderName(theResponseHeaderName); }