Class BaseRestfulValidator
java.lang.Object
ca.uhn.fhir.rest.server.interceptor.validation.address.impl.BaseRestfulValidator
- All Implemented Interfaces:
IAddressValidator
- Direct Known Subclasses:
LoquateAddressValidator
-
Field Summary
FieldsFields inherited from interface ca.uhn.fhir.rest.server.interceptor.validation.address.IAddressValidator
ADDRESS_GEO_ACCURACY_EXTENSION_URL, ADDRESS_QUALITY_EXTENSION_URL, ADDRESS_VALIDATION_EXTENSION_URL, ADDRESS_VERIFICATION_CODE_EXTENSION_URL, FHIR_GEOCODE_EXTENSION_URL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Stringprotected Stringprotected abstract org.springframework.http.ResponseEntity<String>getResponseEntity(org.hl7.fhir.instance.model.api.IBase theAddress, ca.uhn.fhir.context.FhirContext theFhirContext) protected abstract AddressValidationResultgetValidationResult(AddressValidationResult theResult, com.fasterxml.jackson.databind.JsonNode response, ca.uhn.fhir.context.FhirContext theFhirContext) protected booleanisValid(org.hl7.fhir.instance.model.api.IBase theAddress, ca.uhn.fhir.context.FhirContext theFhirContext) Validates address against a serviceprotected org.springframework.web.client.RestTemplatevoidsetProperties(Properties theProperties)
-
Field Details
-
PROPERTY_SERVICE_KEY
- See Also:
-
PROPERTY_SERVICE_ENDPOINT
- See Also:
-
-
Constructor Details
-
BaseRestfulValidator
-
-
Method Details
-
getValidationResult
protected abstract AddressValidationResult getValidationResult(AddressValidationResult theResult, com.fasterxml.jackson.databind.JsonNode response, ca.uhn.fhir.context.FhirContext theFhirContext) throws Exception - Throws:
Exception
-
getResponseEntity
protected abstract org.springframework.http.ResponseEntity<String> getResponseEntity(org.hl7.fhir.instance.model.api.IBase theAddress, ca.uhn.fhir.context.FhirContext theFhirContext) throws Exception - Throws:
Exception
-
newTemplate
-
isValid
public AddressValidationResult isValid(org.hl7.fhir.instance.model.api.IBase theAddress, ca.uhn.fhir.context.FhirContext theFhirContext) throws AddressValidationException Description copied from interface:IAddressValidatorValidates address against a service- Specified by:
isValidin interfaceIAddressValidator- Parameters:
theAddress- Address to be validatedtheFhirContext- Current FHIR context- Returns:
- Returns true in case address represents a valid
- Throws:
AddressValidationException- AddressValidationException is thrown in case validation can not be completed successfully.
-
isError
-
getProperties
-
setProperties
-
getApiKey
-
getApiEndpoint
-