Package ca.cdr.test.app.clients
Class NpmPackageClient
java.lang.Object
ca.cdr.test.app.clients.NpmPackageClient
NpmPackageClient is a client for the NPM Package Registry API of the CDR.
It currently supports anonymous and http-basic authentication.
This client provides access to package installation operations through
Smile CDR's package registry endpoint, typically running on port 8002.
-
Method Summary
Modifier and TypeMethodDescriptionstatic NpmPackageClient
Build an NpmPackageClient with authenticationstatic NpmPackageClient
buildAnonymous
(String theBaseUrl) Build an anonymous NpmPackageClientca.uhn.fhir.jpa.packages.PackageInstallOutcomeJson
installPackageBySpec
(ca.uhn.fhir.jpa.packages.PackageInstallationSpec theSpec) Install a package using the provided specificationca.uhn.fhir.jpa.packages.PackageInstallOutcomeJson
installPackageBySpec
(String theSpecJson) Install a package using the provided specification as a JSON string
-
Method Details
-
build
Build an NpmPackageClient with authentication- Parameters:
theBaseUrl
- The base URL of the package registrytheUsername
- Username for authenticationthePassword
- Password for authentication- Returns:
- Configured NpmPackageClient
-
buildAnonymous
Build an anonymous NpmPackageClient- Parameters:
theBaseUrl
- The base URL of the package registry- Returns:
- Configured NpmPackageClient
-
installPackageBySpec
@Nonnull public ca.uhn.fhir.jpa.packages.PackageInstallOutcomeJson installPackageBySpec(ca.uhn.fhir.jpa.packages.PackageInstallationSpec theSpec) Install a package using the provided specification- Parameters:
theSpec
- The package installation specification- Returns:
- The installation outcome
-
installPackageBySpec
@Nonnull public ca.uhn.fhir.jpa.packages.PackageInstallOutcomeJson installPackageBySpec(String theSpecJson) Install a package using the provided specification as a JSON string- Parameters:
theSpecJson
- The package installation specification as JSON string- Returns:
- The installation outcome
-