Package ca.uhn.fhir.jpa.packages
Class JpaPackageCache
java.lang.Object
org.hl7.fhir.utilities.npm.BasePackageCacheManager
ca.uhn.fhir.jpa.packages.JpaPackageCache
- All Implemented Interfaces:
IHapiPackageCacheManager
,org.hl7.fhir.utilities.npm.IPackageCacheManager
public class JpaPackageCache
extends org.hl7.fhir.utilities.npm.BasePackageCacheManager
implements IHapiPackageCacheManager
-
Nested Class Summary
Nested classes/interfaces inherited from class org.hl7.fhir.utilities.npm.BasePackageCacheManager
org.hl7.fhir.utilities.npm.BasePackageCacheManager.InputStreamWithSrc
Nested classes/interfaces inherited from interface ca.uhn.fhir.jpa.packages.IHapiPackageCacheManager
IHapiPackageCacheManager.PackageContents
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.hl7.fhir.utilities.npm.NpmPackage
addPackageToCache
(String thePackageId, String thePackageVersionId, InputStream thePackageTgzInputStream, String theSourceDesc) List<javax.persistence.criteria.Predicate>
createSearchPredicates
(PackageSearchSpec thePackageSearchSpec, javax.persistence.criteria.CriteriaBuilder theCb, javax.persistence.criteria.Root<NpmPackageVersionEntity> theRoot) ca.uhn.fhir.context.FhirContext
getFhirContext
(ca.uhn.fhir.context.FhirVersionEnum theFhirVersion) getProcessingMessages
(org.hl7.fhir.utilities.npm.NpmPackage thePackage) org.hl7.fhir.utilities.npm.NpmPackage
installPackage
(PackageInstallationSpec theInstallationSpec) org.hl7.fhir.utilities.npm.NpmPackage
loadPackage
(String thePackageId, String thePackageVersion) org.hl7.fhir.instance.model.api.IBaseResource
loadPackageAssetByUrl
(ca.uhn.fhir.context.FhirVersionEnum theFhirVersion, String theCanonicalUrl) List<org.hl7.fhir.instance.model.api.IBaseResource>
loadPackageAssetsByType
(ca.uhn.fhir.context.FhirVersionEnum theFhirVersion, String theResourceType) loadPackageContents
(String thePackageId, String theVersion) org.hl7.fhir.utilities.npm.NpmPackage
loadPackageFromCacheOnly
(String theId, String theVersion) loadPackageMetadata
(String thePackageId) protected byte[]
loadPackageUrlContents
(String thePackageUrl) search
(PackageSearchSpec thePackageSearchSpec) uninstallPackage
(String thePackageId, String theVersion) Methods inherited from class org.hl7.fhir.utilities.npm.BasePackageCacheManager
addPackageServer, getPackageId, getPackageServers, getPackageUrl, loadFromPackageServer, loadPackage, loadPackageFromCacheOnly, setClientFactory
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.hl7.fhir.utilities.npm.IPackageCacheManager
getPackageId, getPackageUrl, loadPackage
-
Field Details
-
UTF8_BOM
- See Also:
-
myEntityManager
-
-
Constructor Details
-
JpaPackageCache
public JpaPackageCache()
-
-
Method Details
-
loadPackageFromCacheOnly
public org.hl7.fhir.utilities.npm.NpmPackage loadPackageFromCacheOnly(String theId, @Nullable String theVersion) - Specified by:
loadPackageFromCacheOnly
in classorg.hl7.fhir.utilities.npm.BasePackageCacheManager
-
addPackageToCache
public org.hl7.fhir.utilities.npm.NpmPackage addPackageToCache(String thePackageId, String thePackageVersionId, InputStream thePackageTgzInputStream, String theSourceDesc) throws IOException - Specified by:
addPackageToCache
in interfaceorg.hl7.fhir.utilities.npm.IPackageCacheManager
- Throws:
IOException
-
getFhirContext
@Nonnull public ca.uhn.fhir.context.FhirContext getFhirContext(ca.uhn.fhir.context.FhirVersionEnum theFhirVersion) -
loadPackage
public org.hl7.fhir.utilities.npm.NpmPackage loadPackage(String thePackageId, String thePackageVersion) throws org.hl7.fhir.exceptions.FHIRException, IOException - Specified by:
loadPackage
in interfaceorg.hl7.fhir.utilities.npm.IPackageCacheManager
- Throws:
org.hl7.fhir.exceptions.FHIRException
IOException
-
installPackage
public org.hl7.fhir.utilities.npm.NpmPackage installPackage(PackageInstallationSpec theInstallationSpec) throws IOException - Specified by:
installPackage
in interfaceIHapiPackageCacheManager
- Throws:
IOException
-
loadPackageUrlContents
-
loadPackageAssetByUrl
public org.hl7.fhir.instance.model.api.IBaseResource loadPackageAssetByUrl(ca.uhn.fhir.context.FhirVersionEnum theFhirVersion, String theCanonicalUrl) - Specified by:
loadPackageAssetByUrl
in interfaceIHapiPackageCacheManager
-
loadPackageMetadata
- Specified by:
loadPackageMetadata
in interfaceIHapiPackageCacheManager
-
loadPackageContents
public IHapiPackageCacheManager.PackageContents loadPackageContents(String thePackageId, String theVersion) - Specified by:
loadPackageContents
in interfaceIHapiPackageCacheManager
-
search
- Specified by:
search
in interfaceIHapiPackageCacheManager
-
uninstallPackage
- Specified by:
uninstallPackage
in interfaceIHapiPackageCacheManager
-
loadPackageAssetsByType
public List<org.hl7.fhir.instance.model.api.IBaseResource> loadPackageAssetsByType(ca.uhn.fhir.context.FhirVersionEnum theFhirVersion, String theResourceType) - Specified by:
loadPackageAssetsByType
in interfaceIHapiPackageCacheManager
-
createSearchPredicates
@Nonnull public List<javax.persistence.criteria.Predicate> createSearchPredicates(PackageSearchSpec thePackageSearchSpec, javax.persistence.criteria.CriteriaBuilder theCb, javax.persistence.criteria.Root<NpmPackageVersionEntity> theRoot) -
getProcessingMessages
-