001package org.hl7.fhir.utilities.npm;
002
003import org.hl7.fhir.exceptions.FHIRException;
004
005import java.io.IOException;
006import java.io.InputStream;
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}