Interface IResourceLinkResolver


public interface IResourceLinkResolver
  • Method Summary

    Modifier and Type
    Method
    Description
    findTargetResource(ca.uhn.fhir.interceptor.model.RequestPartitionId theRequestPartitionId, ca.uhn.fhir.context.RuntimeSearchParam theSearchParam, String theSourcePath, org.hl7.fhir.instance.model.api.IIdType theSourceResourceId, String theTypeString, Class<? extends org.hl7.fhir.instance.model.api.IBaseResource> theType, org.hl7.fhir.instance.model.api.IBaseReference theReference, ca.uhn.fhir.rest.api.server.RequestDetails theRequest, ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails)
    This method resolves the target of a reference found within a resource that is being created/updated.
    void
    validateTypeOrThrowException(Class<? extends org.hl7.fhir.instance.model.api.IBaseResource> theType)
     
  • Method Details

    • findTargetResource

      IResourceLookup findTargetResource(ca.uhn.fhir.interceptor.model.RequestPartitionId theRequestPartitionId, ca.uhn.fhir.context.RuntimeSearchParam theSearchParam, String theSourcePath, org.hl7.fhir.instance.model.api.IIdType theSourceResourceId, String theTypeString, Class<? extends org.hl7.fhir.instance.model.api.IBaseResource> theType, org.hl7.fhir.instance.model.api.IBaseReference theReference, ca.uhn.fhir.rest.api.server.RequestDetails theRequest, ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails)
      This method resolves the target of a reference found within a resource that is being created/updated. We do this so that we can create indexed links between resources, and so that we can validate that the target actually exists in cases where we need to check that.

      This method returns an IResourceLookup so as to avoid needing to resolve the entire resource.

      Parameters:
      theRequestPartitionId - The partition ID of the target resource
      theSearchParam - The param that is being indexed
      theSourcePath - The path within the resource where this reference was found
      theSourceResourceId - The ID of the resource containing the reference to the target being resolved
      theTypeString - The type of the resource being resolved
      theType - The resource type of the target
      theReference - The reference being resolved
      theRequest - The incoming request, if any
      theTransactionDetails -
    • validateTypeOrThrowException

      void validateTypeOrThrowException(Class<? extends org.hl7.fhir.instance.model.api.IBaseResource> theType)