Package org.hl7.fhir.utilities.npm
Interface IPackageCacheManager
-
- All Known Implementing Classes:
BasePackageCacheManager,FilesystemPackageCacheManager
public interface IPackageCacheManager
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description NpmPackageaddPackageToCache(String id, String version, InputStream packageTgzInputStream, String sourceDesc)StringgetPackageId(String canonicalUrl)StringgetPackageUrl(String packageId)NpmPackageloadPackage(String idAndVer)Load the package specified by the id and version specified in the idAndVer parameter.NpmPackageloadPackage(String id, String version)Load the package specified by the id and version specified by the parameters.
-
-
-
Method Detail
-
getPackageId
String getPackageId(String canonicalUrl) throws IOException
- Throws:
IOException
-
addPackageToCache
NpmPackage addPackageToCache(String id, String version, InputStream packageTgzInputStream, String sourceDesc) throws IOException
- Throws:
IOException
-
getPackageUrl
String getPackageUrl(String packageId) throws IOException
- Throws:
IOException
-
loadPackage
NpmPackage loadPackage(String id, String version) throws FHIRException, IOException
Load the package specified by the id and version specified by the parameters. Depending on the implementation logic, this may be from the package cache, or resolved from another service.- Parameters:
id- The package idversion- The package version. If this is null, the implementation logic will attempt to resolve an appropriate version based on the package id.- Returns:
- the NPM Package
- Throws:
FHIRExceptionIOException
-
loadPackage
NpmPackage loadPackage(String idAndVer) throws FHIRException, IOException
Load the package specified by the id and version specified in the idAndVer parameter. Depending on the implementation logic, this may be from the package cache, or resolved from another service.- Parameters:
idAndVer- - use id#ver- Returns:
- the NPM Package or
- Throws:
FHIRExceptionIOException
-
-