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
Fields 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
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
protected String
protected abstract org.springframework.http.ResponseEntity
<String> getResponseEntity
(org.hl7.fhir.instance.model.api.IBase theAddress, ca.uhn.fhir.context.FhirContext theFhirContext) protected abstract AddressValidationResult
getValidationResult
(AddressValidationResult theResult, com.fasterxml.jackson.databind.JsonNode response, ca.uhn.fhir.context.FhirContext theFhirContext) protected boolean
isValid
(org.hl7.fhir.instance.model.api.IBase theAddress, ca.uhn.fhir.context.FhirContext theFhirContext) Validates address against a serviceprotected org.springframework.web.client.RestTemplate
void
setProperties
(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:IAddressValidator
Validates address against a service- Specified by:
isValid
in 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
-