Package ca.uhn.fhir.jpa.packages.loader
Class PackageLoaderSvc
java.lang.Object
org.hl7.fhir.utilities.npm.BasePackageCacheManager
ca.uhn.fhir.jpa.packages.loader.PackageLoaderSvc
- All Implemented Interfaces:
org.hl7.fhir.utilities.npm.IPackageCacheManager
-
Nested Class Summary
Nested classes/interfaces inherited from class org.hl7.fhir.utilities.npm.BasePackageCacheManager
org.hl7.fhir.utilities.npm.BasePackageCacheManager.InputStreamWithSrc
-
Field Summary
Fields inherited from class org.hl7.fhir.utilities.npm.BasePackageCacheManager
myPackageServers, silent
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.hl7.fhir.utilities.npm.NpmPackage
addPackageToCache
(String theS, String theS1, InputStream theInputStream, String theS2) createNpmPackageDataFromData
(String thePackageId, String thePackageVersionId, String theSourceDesc, InputStream thePackageTgzInputStream) Creates an NpmPackage data object.fetchPackageFromPackageSpec
(String thePackageId, String thePackageVersion) Loads the package, but won't save it anywhere.org.hl7.fhir.utilities.npm.NpmPackage
loadPackage
(String theS, String theS1) org.hl7.fhir.utilities.npm.NpmPackage
loadPackageFromCacheOnly
(String theS, String theS1) byte[]
loadPackageUrlContents
(String thePackageUrl) Methods inherited from class org.hl7.fhir.utilities.npm.BasePackageCacheManager
addPackageServer, getPackageId, getPackageServers, getPackageUrl, loadFromPackageServer, loadPackage, loadPackageFromCacheOnly, setClientFactory, setSilent
-
Constructor Details
-
PackageLoaderSvc
public PackageLoaderSvc()
-
-
Method Details
-
fetchPackageFromPackageSpec
public NpmPackageData fetchPackageFromPackageSpec(PackageInstallationSpec theSpec) throws IOException - Throws:
IOException
-
fetchPackageFromPackageSpec
public NpmPackageData fetchPackageFromPackageSpec(String thePackageId, String thePackageVersion) throws org.hl7.fhir.exceptions.FHIRException, IOException Loads the package, but won't save it anywhere. Returns the data to the caller- Returns:
- - a POJO containing information about the NpmPackage, as well as it's contents as fetched from the server
- Throws:
IOException
org.hl7.fhir.exceptions.FHIRException
-
createNpmPackageDataFromData
public NpmPackageData createNpmPackageDataFromData(String thePackageId, String thePackageVersionId, String theSourceDesc, InputStream thePackageTgzInputStream) throws IOException Creates an NpmPackage data object.- Parameters:
thePackageId
- - the id of the npm packagethePackageVersionId
- - the version id of the npm packagetheSourceDesc
- - the installation spec description or package urlthePackageTgzInputStream
- - the package contents. Typically fetched from a server, but can be added directly to the package spec- Returns:
- Throws:
IOException
-
loadPackageFromCacheOnly
public org.hl7.fhir.utilities.npm.NpmPackage loadPackageFromCacheOnly(String theS, @Nullable String theS1) - Specified by:
loadPackageFromCacheOnly
in classorg.hl7.fhir.utilities.npm.BasePackageCacheManager
-
addPackageToCache
public org.hl7.fhir.utilities.npm.NpmPackage addPackageToCache(String theS, String theS1, InputStream theInputStream, String theS2) throws IOException - Throws:
IOException
-
loadPackage
public org.hl7.fhir.utilities.npm.NpmPackage loadPackage(String theS, String theS1) throws org.hl7.fhir.exceptions.FHIRException - Throws:
org.hl7.fhir.exceptions.FHIRException
-
loadPackageUrlContents
-