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 inherited from class org.hl7.fhir.utilities.npm.BasePackageCacheManager
myPackageServers, silent
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addPackageServer
(org.hl7.fhir.utilities.npm.PackageServer thePackageServer) org.hl7.fhir.utilities.npm.NpmPackage
addPackageToCache
(String thePackageId, String thePackageVersionId, InputStream thePackageTgzInputStream, String theSourceDesc) List
<jakarta.persistence.criteria.Predicate> createSearchPredicates
(PackageSearchSpec thePackageSearchSpec, jakarta.persistence.criteria.CriteriaBuilder theCb, jakarta.persistence.criteria.Root<NpmPackageVersionEntity> theRoot) ca.uhn.fhir.context.FhirContext
getFhirContext
(ca.uhn.fhir.context.FhirVersionEnum theFhirVersion) getPackageId
(String theS) List
<org.hl7.fhir.utilities.npm.PackageServer> getPackageUrl
(String theS) getProcessingMessages
(org.hl7.fhir.utilities.npm.NpmPackage thePackage) org.hl7.fhir.utilities.npm.NpmPackage
installPackage
(PackageInstallationSpec theInstallationSpec) protected org.hl7.fhir.utilities.npm.BasePackageCacheManager.InputStreamWithSrc
loadFromPackageServer
(String id, String version) org.hl7.fhir.utilities.npm.NpmPackage
loadPackage
(String theS) 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) search
(PackageSearchSpec thePackageSearchSpec) void
setSilent
(boolean silent) uninstallPackage
(String thePackageId, String theVersion) Methods inherited from class org.hl7.fhir.utilities.npm.BasePackageCacheManager
loadPackageFromCacheOnly, setClientFactory
-
Field Details
-
UTF8_BOM
- See Also:
-
myEntityManager
-
-
Constructor Details
-
JpaPackageCache
public JpaPackageCache()
-
-
Method Details
-
addPackageServer
- Overrides:
addPackageServer
in classorg.hl7.fhir.utilities.npm.BasePackageCacheManager
-
getPackageId
- Specified by:
getPackageId
in interfaceorg.hl7.fhir.utilities.npm.IPackageCacheManager
- Overrides:
getPackageId
in classorg.hl7.fhir.utilities.npm.BasePackageCacheManager
- Throws:
IOException
-
setSilent
- Overrides:
setSilent
in classorg.hl7.fhir.utilities.npm.BasePackageCacheManager
-
getPackageUrl
- Specified by:
getPackageUrl
in interfaceorg.hl7.fhir.utilities.npm.IPackageCacheManager
- Overrides:
getPackageUrl
in classorg.hl7.fhir.utilities.npm.BasePackageCacheManager
- Throws:
IOException
-
getPackageServers
- Overrides:
getPackageServers
in classorg.hl7.fhir.utilities.npm.BasePackageCacheManager
-
loadFromPackageServer
protected org.hl7.fhir.utilities.npm.BasePackageCacheManager.InputStreamWithSrc loadFromPackageServer(String id, String version) - Overrides:
loadFromPackageServer
in classorg.hl7.fhir.utilities.npm.BasePackageCacheManager
-
loadPackageFromCacheOnly
@Transactional 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
@Transactional 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
-
loadPackage
public org.hl7.fhir.utilities.npm.NpmPackage loadPackage(String theS) throws org.hl7.fhir.exceptions.FHIRException, IOException - Specified by:
loadPackage
in interfaceorg.hl7.fhir.utilities.npm.IPackageCacheManager
- Overrides:
loadPackage
in classorg.hl7.fhir.utilities.npm.BasePackageCacheManager
- Throws:
org.hl7.fhir.exceptions.FHIRException
IOException
-
installPackage
@Transactional(propagation=NEVER) public org.hl7.fhir.utilities.npm.NpmPackage installPackage(PackageInstallationSpec theInstallationSpec) throws IOException - Specified by:
installPackage
in interfaceIHapiPackageCacheManager
- Throws:
IOException
-
loadPackageAssetByUrl
@Transactional 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
@Transactional public IHapiPackageCacheManager.PackageContents loadPackageContents(String thePackageId, String theVersion) - Specified by:
loadPackageContents
in interfaceIHapiPackageCacheManager
-
search
- Specified by:
search
in interfaceIHapiPackageCacheManager
-
uninstallPackage
@Transactional public PackageDeleteOutcomeJson uninstallPackage(String thePackageId, String theVersion) - Specified by:
uninstallPackage
in interfaceIHapiPackageCacheManager
-
loadPackageAssetsByType
@Transactional 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<jakarta.persistence.criteria.Predicate> createSearchPredicates(PackageSearchSpec thePackageSearchSpec, jakarta.persistence.criteria.CriteriaBuilder theCb, jakarta.persistence.criteria.Root<NpmPackageVersionEntity> theRoot) -
getProcessingMessages
-