Package org.hl7.fhir.utilities.npm
Class PackageClient
- java.lang.Object
-
- org.hl7.fhir.utilities.npm.PackageClient
-
- Direct Known Subclasses:
CachingPackageClient
public class PackageClient extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static StringPRIMARY_SERVERstatic StringSECONDARY_SERVER
-
Constructor Summary
Constructors Constructor Description PackageClient(String address)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanexists(String id, String ver)InputStreamfetch(String id, String ver)InputStreamfetch(PackageInfo info)InputStreamfetchCached(String url)InputStreamfetchNpm(String id, String ver)protected Stringfn(String url)StringgetLatestVersion(String id)StringgetLatestVersion(String id, String majMinVersion)DategetNewPackages(Date lastCalled, List<PackageInfo> updates)List<PackageInfo>getVersions(String id)List<PackageInfo>listFromRegistry(String name, String canonical, String fhirVersion)List<PackageInfo>search(String name, String canonical, String fhirVersion, boolean preRelease)Stringurl(String id, String v)
-
-
-
Field Detail
-
PRIMARY_SERVER
public static final String PRIMARY_SERVER
- See Also:
- Constant Field Values
-
SECONDARY_SERVER
public static final String SECONDARY_SERVER
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PackageClient
public PackageClient(String address)
-
-
Method Detail
-
exists
public boolean exists(String id, String ver) throws IOException
- Throws:
IOException
-
fetch
public InputStream fetch(String id, String ver) throws IOException
- Throws:
IOException
-
fetch
public InputStream fetch(PackageInfo info) throws IOException
- Throws:
IOException
-
fetchNpm
public InputStream fetchNpm(String id, String ver) throws IOException
- Throws:
IOException
-
fetchCached
public InputStream fetchCached(String url) throws IOException, FileNotFoundException
- Throws:
IOExceptionFileNotFoundException
-
getVersions
public List<PackageInfo> getVersions(String id) throws IOException
- Throws:
IOException
-
search
public List<PackageInfo> search(String name, String canonical, String fhirVersion, boolean preRelease) throws IOException
- Throws:
IOException
-
getNewPackages
public Date getNewPackages(Date lastCalled, List<PackageInfo> updates)
-
getLatestVersion
public String getLatestVersion(String id) throws IOException
- Throws:
IOException
-
getLatestVersion
public String getLatestVersion(String id, String majMinVersion) throws IOException
- Throws:
IOException
-
listFromRegistry
public List<PackageInfo> listFromRegistry(String name, String canonical, String fhirVersion) throws IOException
- Throws:
IOException
-
-