Interface IWorkerContextManager

All Known Implementing Classes:
BaseWorkerContext, SimpleWorkerContext

public interface IWorkerContextManager
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
     
    static interface 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Deprecated.
    void
    cache a resource for later retrieval using fetchResource.
    void
    cache a resource for later retrieval using fetchResource.
    int
    loadFromPackage(org.hl7.fhir.utilities.npm.NpmPackage pi, IContextResourceLoader loader)
    Load relevant resources of the appropriate types (as specified by the loader) from the nominated package note that the package system may use lazy loading; the loader will be called later when the classes that use the context need the relevant resource
    int
    loadFromPackageAndDependencies(org.hl7.fhir.utilities.npm.NpmPackage pi, IContextResourceLoader loader, org.hl7.fhir.utilities.npm.BasePackageCacheManager pcm)
    Load relevant resources of the appropriate types (as specified by the loader) from the nominated package note that the package system uses lazy loading; the loader will be called later when the classes that use the context need the relevant resource This method also loads all the packages that the package depends on (recursively)
    int
    loadPackage(String idAndVer)
    Load relevant resources of the appropriate types (as specified by the loader) from the nominated package note that the package system may use lazy loading; the loader will be called later when the classes that use the context need the relevant resource
    int
    loadPackage(org.hl7.fhir.utilities.npm.NpmPackage pi)
    Load relevant resources of the appropriate types (as specified by the loader) from the nominated package note that the package system may use lazy loading; the loader will be called later when the classes that use the context need the relevant resource
    org.hl7.fhir.utilities.npm.IPackageCacheManager
     
    void
    Get the expansion parameters passed through the terminology server when txServer calls are made Note that the Validation Options override these when they are specified on validateCode
    void
    setLocale(Locale locale)
    Deprecated.
    Usage of this method is discouraged outside very specific scenarios in testing and the IG publisher.
    void
    setPackageManager(org.hl7.fhir.utilities.npm.IPackageCacheManager manager)
     
  • Method Details

    • packageManager

      org.hl7.fhir.utilities.npm.IPackageCacheManager packageManager()
    • setPackageManager

      void setPackageManager(org.hl7.fhir.utilities.npm.IPackageCacheManager manager)
    • setExpansionParameters

      void setExpansionParameters(Parameters expParameters)
      Get the expansion parameters passed through the terminology server when txServer calls are made Note that the Validation Options override these when they are specified on validateCode
    • setLocale

      Deprecated.
      Usage of this method is discouraged outside very specific scenarios in testing and the IG publisher. It is preferred to set the locale via the constructor of the implementing class.
      Sets the locale for this worker context.
      Parameters:
      locale - The locale to use.
    • cacheResource

      void cacheResource(Resource res) throws org.hl7.fhir.exceptions.FHIRException
      cache a resource for later retrieval using fetchResource. Note that various context implementations will have their own ways of loading rseources, and not all need implement cacheResource. If the resource is loaded out of a package, call cacheResourceFromPackage instead
      Parameters:
      res -
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • cacheResourceFromPackage

      void cacheResourceFromPackage(Resource res, PackageInformation packageInfo) throws org.hl7.fhir.exceptions.FHIRException
      cache a resource for later retrieval using fetchResource. The package information is used to help manage the cache internally, and to help with reference resolution. Packages should be define using cachePackage (but don't have to be) Note that various context implementations will have their own ways of loading rseources, and not all need implement cacheResource
      Parameters:
      res -
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • cachePackage

      Deprecated.
      Inform the cache about package dependencies. This can be used to help resolve references Note that the cache doesn't load dependencies
      Parameters:
      packageInfo -
    • loadFromPackage

      int loadFromPackage(org.hl7.fhir.utilities.npm.NpmPackage pi, IContextResourceLoader loader) throws FileNotFoundException, IOException, org.hl7.fhir.exceptions.FHIRException
      Load relevant resources of the appropriate types (as specified by the loader) from the nominated package note that the package system may use lazy loading; the loader will be called later when the classes that use the context need the relevant resource
      Parameters:
      pi - - the package to load
      loader - - an implemenation of IContextResourceLoader that knows how to read the resources in the package (e.g. for the appropriate version).
      Returns:
      the number of resources loaded
      Throws:
      FileNotFoundException
      IOException
      org.hl7.fhir.exceptions.FHIRException
    • loadPackage

      int loadPackage(org.hl7.fhir.utilities.npm.NpmPackage pi) throws FileNotFoundException, IOException, org.hl7.fhir.exceptions.FHIRException
      Load relevant resources of the appropriate types (as specified by the loader) from the nominated package note that the package system may use lazy loading; the loader will be called later when the classes that use the context need the relevant resource
      Parameters:
      pi - - the package to load
      Returns:
      the number of resources loaded
      Throws:
      FileNotFoundException
      IOException
      org.hl7.fhir.exceptions.FHIRException
    • loadPackage

      int loadPackage(String idAndVer) throws FileNotFoundException, IOException, org.hl7.fhir.exceptions.FHIRException
      Load relevant resources of the appropriate types (as specified by the loader) from the nominated package note that the package system may use lazy loading; the loader will be called later when the classes that use the context need the relevant resource
      Parameters:
      idAndVer - - the package to load
      Returns:
      the number of resources loaded
      Throws:
      FileNotFoundException
      IOException
      org.hl7.fhir.exceptions.FHIRException
    • loadFromPackageAndDependencies

      int loadFromPackageAndDependencies(org.hl7.fhir.utilities.npm.NpmPackage pi, IContextResourceLoader loader, org.hl7.fhir.utilities.npm.BasePackageCacheManager pcm) throws FileNotFoundException, IOException, org.hl7.fhir.exceptions.FHIRException
      Load relevant resources of the appropriate types (as specified by the loader) from the nominated package note that the package system uses lazy loading; the loader will be called later when the classes that use the context need the relevant resource This method also loads all the packages that the package depends on (recursively)
      Parameters:
      pi - - the package to load
      loader - - an implemenation of IContextResourceLoader that knows how to read the resources in the package (e.g. for the appropriate version).
      pcm - - used to find and load additional dependencies
      Returns:
      the number of resources loaded
      Throws:
      FileNotFoundException
      IOException
      org.hl7.fhir.exceptions.FHIRException