
Package org.hl7.fhir.r5.context
Interface IWorkerContextManager
- All Known Implementing Classes:
BaseWorkerContext,SimpleWorkerContext
public interface IWorkerContextManager
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfacestatic interface -
Method Summary
Modifier and TypeMethodDescriptionvoidcachePackage(PackageInformation packageInfo) Deprecated.voidcacheResource(Resource res) cache a resource for later retrieval using fetchResource.voidcacheResourceFromPackage(Resource res, PackageInformation packageInfo) cache a resource for later retrieval using fetchResource.intloadFromPackage(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 resourceintloadFromPackageAndDependencies(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)intloadPackage(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 resourceintloadPackage(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 resourceorg.hl7.fhir.utilities.npm.IPackageCacheManagervoidsetExpansionParameters(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 validateCodevoidDeprecated.Usage of this method is discouraged outside very specific scenarios in testing and the IG publisher.voidsetPackageManager(org.hl7.fhir.utilities.npm.IPackageCacheManager manager)
-
Method Details
-
packageManager
org.hl7.fhir.utilities.npm.IPackageCacheManager packageManager() -
setPackageManager
-
setExpansionParameters
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
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 loadloader- - 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:
FileNotFoundExceptionIOExceptionorg.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:
FileNotFoundExceptionIOExceptionorg.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:
FileNotFoundExceptionIOExceptionorg.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 loadloader- - 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:
FileNotFoundExceptionIOExceptionorg.hl7.fhir.exceptions.FHIRException
-