
Class RepositoryValidatingInterceptor
java.lang.Object
ca.uhn.fhir.jpa.interceptor.validation.RepositoryValidatingInterceptor
This interceptor enforces validation rules on any data saved in a HAPI FHIR JPA repository.
See Repository Validating Interceptor
in the HAPI FHIR documentation for more information on how to use this.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructorRepositoryValidatingInterceptor(ca.uhn.fhir.context.FhirContext theFhirContext, List<IRepositoryValidatingRule> theRules) Constructor -
Method Summary
Modifier and TypeMethodDescriptionReturns a multiline string describing the rules in place for this interceptor.protected voidvoidsetFhirContext(ca.uhn.fhir.context.FhirContext theFhirContext) Provide the FHIR Context (mandatory)voidsetRules(List<IRepositoryValidatingRule> theRules) Provide the rules to use for validation (mandatory)
-
Constructor Details
-
RepositoryValidatingInterceptor
public RepositoryValidatingInterceptor()ConstructorIf this constructor is used,
setFhirContext(FhirContext)andsetRules(List)must be called manually before the interceptor is used. -
RepositoryValidatingInterceptor
public RepositoryValidatingInterceptor(ca.uhn.fhir.context.FhirContext theFhirContext, List<IRepositoryValidatingRule> theRules) Constructor- Parameters:
theFhirContext- The FHIR Context (must not benull)theRules- The rule list (must not benull)
-
-
Method Details
-
setFhirContext
Provide the FHIR Context (mandatory) -
setRules
Provide the rules to use for validation (mandatory) -
describeRules
Returns a multiline string describing the rules in place for this interceptor. This is mostly intended for troubleshooting, and the format returned is only semi-human-consumable. -
handleFailure
-