001package org.hl7.fhir.utilities.npm; 002 003import java.io.IOException; 004import java.io.InputStream; 005 006import org.hl7.fhir.exceptions.FHIRException; 007 008public interface IPackageCacheManager { 009 010 String getPackageId(String canonicalUrl) throws IOException; 011 012 NpmPackage addPackageToCache(String id, String version, InputStream packageTgzInputStream, String sourceDesc) throws IOException; 013 014 String getPackageUrl(String packageId) throws IOException; 015 016 NpmPackage loadPackage(String id, String version) throws FHIRException, IOException; 017 018 /** 019 * 020 * @param idAndVer - use id#ver 021 * @return 022 * @throws FHIRException 023 * @throws IOException 024 */ 025 NpmPackage loadPackage(String idAndVer) throws FHIRException, IOException; 026}