Package ca.cdr.test.app.clients
Class PackageSpecBuilder
java.lang.Object
ca.cdr.test.app.clients.PackageSpecBuilder
Builder for creating
PackageInstallationSpec
objects using a fluent API.
This builder follows the requirements from the INITIAL.md specification.-
Method Summary
Modifier and TypeMethodDescriptionca.uhn.fhir.jpa.packages.PackageInstallationSpec
build()
Build the PackageInstallationSpecfetchDependencies
(boolean theFetchDependencies) Set whether dependencies should be automatically resolved and installedinstallMode
(ca.uhn.fhir.jpa.packages.PackageInstallationSpec.InstallModeEnum theInstallMode) installResourceTypes
(String... theResourceTypes) Set specific resource types to install from the packagestatic PackageSpecBuilder
Static factory method to start building a package specificationpackageUrl
(String thePackageUrl) Set the package URLreloadExisting
(boolean theReloadExisting) Set whether existing resources should be reloaded during package installationSet install mode to STORE_AND_INSTALLSet install mode to STORE_ONLYSet the package version
-
Method Details
-
name
Static factory method to start building a package specification- Parameters:
theName
- The package name- Returns:
- A new PackageSpecBuilder instance
-
version
Set the package version- Parameters:
theVersion
- The package version- Returns:
- This builder for chaining
-
packageUrl
Set the package URL- Parameters:
thePackageUrl
- The package URL- Returns:
- This builder for chaining
-
storeOnly
Set install mode to STORE_ONLY- Returns:
- This builder for chaining
-
installMode
public PackageSpecBuilder installMode(ca.uhn.fhir.jpa.packages.PackageInstallationSpec.InstallModeEnum theInstallMode) -
storeAndInstall
Set install mode to STORE_AND_INSTALL- Returns:
- This builder for chaining
-
reloadExisting
Set whether existing resources should be reloaded during package installation- Parameters:
theReloadExisting
- true to reload existing resources, false to skip- Returns:
- This builder for chaining
-
fetchDependencies
Set whether dependencies should be automatically resolved and installed- Parameters:
theFetchDependencies
- true to fetch and install dependencies, false to skip- Returns:
- This builder for chaining
-
installResourceTypes
Set specific resource types to install from the package- Parameters:
theResourceTypes
- Array of resource type names to install- Returns:
- This builder for chaining
-
build
Build the PackageInstallationSpec- Returns:
- A configured PackageInstallationSpec instance
-