public abstract class BasePackageCacheManager extends Object implements IPackageCacheManager
Modifier and Type | Class and Description |
---|---|
class |
BasePackageCacheManager.InputStreamWithSrc |
Constructor and Description |
---|
BasePackageCacheManager()
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addPackageServer(String thePackageServer)
Add a package server that can be used to fetch remote packages
|
String |
getPackageId(String canonicalUrl) |
List<String> |
getPackageServers() |
String |
getPackageUrl(String packageId) |
protected BasePackageCacheManager.InputStreamWithSrc |
loadFromPackageServer(String id,
String version)
Try to load a package from all registered package servers, and return
null
if it can not be found at any of them. |
NpmPackage |
loadPackage(String idAndVer) |
NpmPackage |
loadPackageFromCacheOnly(String id)
Load the latest version of the identified package from the cache - it it exists
|
abstract NpmPackage |
loadPackageFromCacheOnly(String id,
String version) |
void |
setClientFactory(Function<String,PackageClient> theClientFactory)
Provide a new client factory implementation
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addPackageToCache, loadPackage
public BasePackageCacheManager()
public void setClientFactory(Function<String,PackageClient> theClientFactory)
public List<String> getPackageServers()
public void addPackageServer(@Nonnull String thePackageServer)
public NpmPackage loadPackageFromCacheOnly(String id) throws IOException
IOException
@Nullable protected BasePackageCacheManager.InputStreamWithSrc loadFromPackageServer(String id, String version)
null
if it can not be found at any of them.public abstract NpmPackage loadPackageFromCacheOnly(String id, @Nullable String version) throws IOException
IOException
public String getPackageUrl(String packageId) throws IOException
getPackageUrl
in interface IPackageCacheManager
IOException
public String getPackageId(String canonicalUrl) throws IOException
getPackageId
in interface IPackageCacheManager
IOException
public NpmPackage loadPackage(String idAndVer) throws FHIRException, IOException
loadPackage
in interface IPackageCacheManager
idAndVer
- - use id#verFHIRException
IOException
Copyright © 2014–2021 Health Level 7. All rights reserved.