Package org.fhirfrog.frog.server.config
Class LocalPackageResolver
java.lang.Object
org.fhirfrog.frog.server.config.LocalPackageResolver
Resolves local (
dev/current) FHIR packages from the filesystem cache
into tgz archives suitable for mounting into a Docker container.
For each package classified as dev or current version, this resolver:
- Locates it in the local FHIR cache (
~/.fhir/packages) - Creates a tgz archive via
NpmPackage.save(java.io.File) - Records the container-local file URL for HAPI's
packageUrldirective - Records the actual installed version for the test config
Versioned packages (e.g. 1.0.0) are left to HAPI to download from the
registry at bootstrap time.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordResult of resolving local packages. -
Constructor Summary
ConstructorsConstructorDescriptionLocalPackageResolver(Consumer<String> logger) Creates a resolver with a logger callback. -
Method Summary
Modifier and TypeMethodDescriptionresolve(List<PackageClassifier.PackageRef> includes, Path outputDir) Resolves local packages and writes tgz archives tooutputDir/packages/.
-
Constructor Details
-
LocalPackageResolver
Creates a resolver with a logger callback.- Parameters:
logger- receives status messages (e.g. "Creating foo.tgz from local FHIR cache...")
-
-
Method Details
-
resolve
public LocalPackageResolver.LocalPackages resolve(List<PackageClassifier.PackageRef> includes, Path outputDir) throws IOException Resolves local packages and writes tgz archives tooutputDir/packages/.- Parameters:
includes- the classified package list fromPackageClassifieroutputDir- the output directory (e.g..fhir-frog)- Returns:
- resolved local package URLs and versions
- Throws:
IOException- if file operations fail
-