
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.InputStreamWithSrcNested classes/interfaces inherited from interface ca.uhn.fhir.jpa.packages.IHapiPackageCacheManager
IHapiPackageCacheManager.PackageContents -
Field Summary
FieldsFields inherited from class org.hl7.fhir.utilities.npm.BasePackageCacheManager
myPackageServers -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPackageServer(org.hl7.fhir.utilities.npm.PackageServer thePackageServer) org.hl7.fhir.utilities.npm.NpmPackageaddPackageToCache(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) org.hl7.fhir.instance.model.api.IBaseResourcefindPackageAsset(FindPackageAssetRequest theRequest) findPackageAssetInfoByUrl(ca.uhn.fhir.context.FhirVersionEnum theFhirVersion, String theCanonicalUrl) List<org.hl7.fhir.instance.model.api.IBaseResource> findPackageAssets(FindPackageAssetRequest theRequest) Returns all package assets matching the request object.ca.uhn.fhir.context.FhirContextgetFhirContext(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.NpmPackageinstallPackage(PackageInstallationSpec theInstallationSpec) protected org.hl7.fhir.utilities.npm.BasePackageCacheManager.InputStreamWithSrcloadFromPackageServer(String id, String version) org.hl7.fhir.utilities.npm.NpmPackageloadPackage(String theS) org.hl7.fhir.utilities.npm.NpmPackageloadPackage(String thePackageId, String thePackageVersion) org.hl7.fhir.instance.model.api.IBaseResourceloadPackageAssetByUrl(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) List<org.hl7.fhir.instance.model.api.IBaseResource> loadPackageAssetsByUrl(ca.uhn.fhir.context.FhirVersionEnum theFhirVersion, String theCanonicalUrl, org.springframework.data.domain.PageRequest thePageRequest) Returns all possible resources by the provided url and fhir version.loadPackageContents(String thePackageId, String theVersion) org.hl7.fhir.utilities.npm.NpmPackageloadPackageFromCacheOnly(String theId, String theVersion) loadPackageMetadata(String thePackageId) search(PackageSearchSpec thePackageSearchSpec) uninstallPackage(String thePackageId, String theVersion) Methods inherited from class org.hl7.fhir.utilities.npm.BasePackageCacheManager
loadPackageFromCacheOnly, setClientFactory, stripAlias
-
Field Details
-
myEntityManager
-
-
Constructor Details
-
JpaPackageCache
public JpaPackageCache()
-
-
Method Details
-
addPackageServer
- Overrides:
addPackageServerin classorg.hl7.fhir.utilities.npm.BasePackageCacheManager
-
getPackageId
- Specified by:
getPackageIdin interfaceorg.hl7.fhir.utilities.npm.IPackageCacheManager- Overrides:
getPackageIdin classorg.hl7.fhir.utilities.npm.BasePackageCacheManager- Throws:
IOException
-
getPackageUrl
- Specified by:
getPackageUrlin interfaceorg.hl7.fhir.utilities.npm.IPackageCacheManager- Overrides:
getPackageUrlin classorg.hl7.fhir.utilities.npm.BasePackageCacheManager- Throws:
IOException
-
getPackageServers
- Overrides:
getPackageServersin classorg.hl7.fhir.utilities.npm.BasePackageCacheManager
-
loadFromPackageServer
protected org.hl7.fhir.utilities.npm.BasePackageCacheManager.InputStreamWithSrc loadFromPackageServer(String id, String version) - Overrides:
loadFromPackageServerin classorg.hl7.fhir.utilities.npm.BasePackageCacheManager
-
loadPackageFromCacheOnly
@Transactional public org.hl7.fhir.utilities.npm.NpmPackage loadPackageFromCacheOnly(String theId, @Nullable String theVersion) - Specified by:
loadPackageFromCacheOnlyin 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:
addPackageToCachein 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:
loadPackagein interfaceorg.hl7.fhir.utilities.npm.IPackageCacheManager- Throws:
org.hl7.fhir.exceptions.FHIRExceptionIOException
-
loadPackage
@Transactional public org.hl7.fhir.utilities.npm.NpmPackage loadPackage(String theS) throws org.hl7.fhir.exceptions.FHIRException, IOException - Specified by:
loadPackagein interfaceorg.hl7.fhir.utilities.npm.IPackageCacheManager- Overrides:
loadPackagein classorg.hl7.fhir.utilities.npm.BasePackageCacheManager- Throws:
org.hl7.fhir.exceptions.FHIRExceptionIOException
-
installPackage
@Transactional(propagation=NEVER) public org.hl7.fhir.utilities.npm.NpmPackage installPackage(PackageInstallationSpec theInstallationSpec) throws IOException - Specified by:
installPackagein interfaceIHapiPackageCacheManager- Throws:
IOException
-
loadPackageAssetByUrl
@Transactional(readOnly=true) public org.hl7.fhir.instance.model.api.IBaseResource loadPackageAssetByUrl(ca.uhn.fhir.context.FhirVersionEnum theFhirVersion, String theCanonicalUrl) - Specified by:
loadPackageAssetByUrlin interfaceIHapiPackageCacheManager
-
loadPackageAssetsByUrl
@Transactional(readOnly=true) public List<org.hl7.fhir.instance.model.api.IBaseResource> loadPackageAssetsByUrl(ca.uhn.fhir.context.FhirVersionEnum theFhirVersion, String theCanonicalUrl, org.springframework.data.domain.PageRequest thePageRequest) Description copied from interface:IHapiPackageCacheManagerReturns all possible resources by the provided url and fhir version.- Specified by:
loadPackageAssetsByUrlin interfaceIHapiPackageCacheManager
-
findPackageAsset
@Transactional(readOnly=true) public org.hl7.fhir.instance.model.api.IBaseResource findPackageAsset(FindPackageAssetRequest theRequest) - Specified by:
findPackageAssetin interfaceIHapiPackageCacheManager
-
findPackageAssets
@Transactional(readOnly=true) public List<org.hl7.fhir.instance.model.api.IBaseResource> findPackageAssets(FindPackageAssetRequest theRequest) Description copied from interface:IHapiPackageCacheManagerReturns all package assets matching the request object.- Specified by:
findPackageAssetsin interfaceIHapiPackageCacheManager- Parameters:
theRequest- the request object- Returns:
- a list of package assets
-
findPackageAssetInfoByUrl
@Transactional(readOnly=true) public List<NpmPackageAssetInfoJson> findPackageAssetInfoByUrl(ca.uhn.fhir.context.FhirVersionEnum theFhirVersion, String theCanonicalUrl) - Specified by:
findPackageAssetInfoByUrlin interfaceIHapiPackageCacheManager
-
loadPackageMetadata
- Specified by:
loadPackageMetadatain interfaceIHapiPackageCacheManager
-
loadPackageContents
@Transactional public IHapiPackageCacheManager.PackageContents loadPackageContents(String thePackageId, @Nullable String theVersion) - Specified by:
loadPackageContentsin interfaceIHapiPackageCacheManager
-
search
- Specified by:
searchin interfaceIHapiPackageCacheManager
-
uninstallPackage
- Specified by:
uninstallPackagein interfaceIHapiPackageCacheManager
-
loadPackageAssetsByType
@Transactional public List<org.hl7.fhir.instance.model.api.IBaseResource> loadPackageAssetsByType(ca.uhn.fhir.context.FhirVersionEnum theFhirVersion, String theResourceType) - Specified by:
loadPackageAssetsByTypein interfaceIHapiPackageCacheManager
-
createSearchPredicates
@Nonnull public List<jakarta.persistence.criteria.Predicate> createSearchPredicates(PackageSearchSpec thePackageSearchSpec, jakarta.persistence.criteria.CriteriaBuilder theCb, jakarta.persistence.criteria.Root<NpmPackageVersionEntity> theRoot) -
getProcessingMessages
-