Package dev.dsf.fhir.service
Class ReferenceResolverImpl
java.lang.Object
dev.dsf.fhir.service.ReferenceResolverImpl
- All Implemented Interfaces:
ReferenceResolver,org.springframework.beans.factory.InitializingBean
public class ReferenceResolverImpl
extends Object
implements ReferenceResolver, org.springframework.beans.factory.InitializingBean
-
Constructor Summary
ConstructorsConstructorDescriptionReferenceResolverImpl(String serverBase, DaoProvider daoProvider, ResponseGenerator responseGenerator, ExceptionHandler exceptionHandler, ClientProvider clientProvider, ParameterConverter parameterConverter) -
Method Summary
Modifier and TypeMethodDescriptionvoidOptional<org.hl7.fhir.r4.model.OperationOutcome>checkConditionalReference(Identity identity, org.hl7.fhir.r4.model.Resource resource, ResourceReference reference, Connection connection, Integer bundleIndex) Optional<org.hl7.fhir.r4.model.OperationOutcome>checkLiteralExternalReference(org.hl7.fhir.r4.model.Resource resource, ResourceReference resourceReference) Optional<org.hl7.fhir.r4.model.OperationOutcome>checkLiteralExternalReference(org.hl7.fhir.r4.model.Resource resource, ResourceReference reference, Integer bundleIndex) Optional<org.hl7.fhir.r4.model.OperationOutcome>checkLiteralInternalReference(org.hl7.fhir.r4.model.Resource resource, ResourceReference resourceReference, Connection connection) Optional<org.hl7.fhir.r4.model.OperationOutcome>checkLiteralInternalReference(org.hl7.fhir.r4.model.Resource resource, ResourceReference reference, Connection connection, Integer bundleIndex) Optional<org.hl7.fhir.r4.model.OperationOutcome>checkLogicalReference(Identity identity, org.hl7.fhir.r4.model.Resource resource, ResourceReference resourceReference, Connection connection) Optional<org.hl7.fhir.r4.model.OperationOutcome>checkLogicalReference(Identity identity, org.hl7.fhir.r4.model.Resource resource, ResourceReference reference, Connection connection, Integer bundleIndex) booleanreferenceCanBeChecked(ResourceReference reference, Connection connection) booleanreferenceCanBeResolved(ResourceReference reference, Connection connection) Optional<org.hl7.fhir.r4.model.Resource>resolveReference(Identity identity, ResourceReference reference, Connection connection)
-
Constructor Details
-
ReferenceResolverImpl
public ReferenceResolverImpl(String serverBase, DaoProvider daoProvider, ResponseGenerator responseGenerator, ExceptionHandler exceptionHandler, ClientProvider clientProvider, ParameterConverter parameterConverter)
-
-
Method Details
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
referenceCanBeResolved
- Specified by:
referenceCanBeResolvedin interfaceReferenceResolver- Parameters:
reference- notnullconnection- notnull- Returns:
trueif theResourceReferencecan be resolved
-
referenceCanBeChecked
- Specified by:
referenceCanBeCheckedin interfaceReferenceResolver- Parameters:
reference- notnullconnection- notnull- Returns:
trueif theResourceReferencecan be checked
-
resolveReference
public Optional<org.hl7.fhir.r4.model.Resource> resolveReference(Identity identity, ResourceReference reference, Connection connection) - Specified by:
resolveReferencein interfaceReferenceResolver- Parameters:
identity- notnullreference- notnullconnection- notnull- Returns:
Optional.empty()if the reference could not be resolved
-
checkLiteralInternalReference
public Optional<org.hl7.fhir.r4.model.OperationOutcome> checkLiteralInternalReference(org.hl7.fhir.r4.model.Resource resource, ResourceReference resourceReference, Connection connection) throws IllegalArgumentException - Specified by:
checkLiteralInternalReferencein interfaceReferenceResolver- Parameters:
resource- notnullresourceReference- notnullconnection- notnull- Returns:
Optional.empty()if the reference could be resolved- Throws:
IllegalArgumentException- if the reference is not of typeResourceReference.ReferenceType.LITERAL_INTERNAL- See Also:
-
checkLiteralInternalReference
public Optional<org.hl7.fhir.r4.model.OperationOutcome> checkLiteralInternalReference(org.hl7.fhir.r4.model.Resource resource, ResourceReference reference, Connection connection, Integer bundleIndex) throws IllegalArgumentException - Specified by:
checkLiteralInternalReferencein interfaceReferenceResolver- Parameters:
resource- notnullreference- notnullconnection- notnullbundleIndex- may benull- Returns:
Optional.empty()if the reference could be resolved- Throws:
IllegalArgumentException- if the reference is not of typeResourceReference.ReferenceType.LITERAL_INTERNAL- See Also:
-
checkLiteralExternalReference
public Optional<org.hl7.fhir.r4.model.OperationOutcome> checkLiteralExternalReference(org.hl7.fhir.r4.model.Resource resource, ResourceReference resourceReference) throws IllegalArgumentException - Specified by:
checkLiteralExternalReferencein interfaceReferenceResolver- Parameters:
resource- notnullresourceReference- notnull- Returns:
Optional.empty()if the reference check was @Override successful- Throws:
IllegalArgumentException- if the reference is not of typeResourceReference.ReferenceType.LITERAL_EXTERNAL- See Also:
-
checkLiteralExternalReference
public Optional<org.hl7.fhir.r4.model.OperationOutcome> checkLiteralExternalReference(org.hl7.fhir.r4.model.Resource resource, ResourceReference reference, Integer bundleIndex) throws IllegalArgumentException - Specified by:
checkLiteralExternalReferencein interfaceReferenceResolver- Parameters:
resource- notnullreference- notnullbundleIndex- may benull- Returns:
Optional.empty()if the reference check was successful- Throws:
IllegalArgumentException- if the reference is not of typeResourceReference.ReferenceType.LITERAL_EXTERNAL- See Also:
-
checkConditionalReference
public Optional<org.hl7.fhir.r4.model.OperationOutcome> checkConditionalReference(Identity identity, org.hl7.fhir.r4.model.Resource resource, ResourceReference reference, Connection connection, Integer bundleIndex) throws IllegalArgumentException - Specified by:
checkConditionalReferencein interfaceReferenceResolver- Parameters:
identity- notnullresource- notnullreference- notnullconnection- notnullbundleIndex- may benull- Returns:
Optional.empty()if the reference check was successful- Throws:
IllegalArgumentException- if the reference is not of typeResourceReference.ReferenceType.CONDITIONAL- See Also:
-
checkLogicalReference
public Optional<org.hl7.fhir.r4.model.OperationOutcome> checkLogicalReference(Identity identity, org.hl7.fhir.r4.model.Resource resource, ResourceReference resourceReference, Connection connection) throws IllegalArgumentException - Specified by:
checkLogicalReferencein interfaceReferenceResolver- Parameters:
identity- notnullresource- notnullresourceReference- notnullconnection- notnull- Returns:
Optional.empty()if the reference check was successful- Throws:
IllegalArgumentException- if the reference is not of typeResourceReference.ReferenceType.LOGICAL- See Also:
-
checkLogicalReference
public Optional<org.hl7.fhir.r4.model.OperationOutcome> checkLogicalReference(Identity identity, org.hl7.fhir.r4.model.Resource resource, ResourceReference reference, Connection connection, Integer bundleIndex) throws IllegalArgumentException - Specified by:
checkLogicalReferencein interfaceReferenceResolver- Parameters:
identity- notnullresource- notnullreference- notnullconnection- notnullbundleIndex- may benull- Returns:
Optional.empty()if the reference check was successful- Throws:
IllegalArgumentException- if the reference is not of typeResourceReference.ReferenceType.LOGICAL- See Also:
-