spotless apply formatting

This commit is contained in:
Justin McKelvy
2023-11-28 07:19:13 -07:00
parent 8c18c7dbc7
commit 0aa001b6f6
47 changed files with 757 additions and 668 deletions

View File

@@ -9,10 +9,16 @@ import java.io.IOException;
public interface IImplementationGuideOperationProvider {
static PackageInstallationSpec toPackageInstallationSpec(byte[] npmPackageAsByteArray) throws IOException {
NpmPackage npmPackage = NpmPackage.fromPackage(new ByteArrayInputStream(npmPackageAsByteArray));
return new PackageInstallationSpec().setName(npmPackage.name()).setPackageContents(npmPackageAsByteArray).setVersion(npmPackage.version()).setInstallMode(PackageInstallationSpec.InstallModeEnum.STORE_AND_INSTALL).setFetchDependencies(false);
return new PackageInstallationSpec()
.setName(npmPackage.name())
.setPackageContents(npmPackageAsByteArray)
.setVersion(npmPackage.version())
.setInstallMode(PackageInstallationSpec.InstallModeEnum.STORE_AND_INSTALL)
.setFetchDependencies(false);
}
//The following declaration is the one that counts but cannot be used across different versions as stating Base64BinaryType would bind to a separate version
//@Operation(name = "$install", typeName = "ImplementationGuide")
//Parameters install(@OperationParam(name = "npmContent",min = 1, max = 1) Base64BinaryType implementationGuide);
// The following declaration is the one that counts but cannot be used across different versions as stating
// Base64BinaryType would bind to a separate version
// @Operation(name = "$install", typeName = "ImplementationGuide")
// Parameters install(@OperationParam(name = "npmContent",min = 1, max = 1) Base64BinaryType implementationGuide);
}

View File

@@ -22,14 +22,15 @@ public class ImplementationGuideR4OperationProvider implements IImplementationGu
}
@Operation(name = "$install", typeName = "ImplementationGuide")
public Parameters install(@OperationParam(name = "npmContent", min = 1, max = 1) Base64BinaryType implementationGuide) {
public Parameters install(
@OperationParam(name = "npmContent", min = 1, max = 1) Base64BinaryType implementationGuide) {
try {
packageInstallerSvc.install(IImplementationGuideOperationProvider.toPackageInstallationSpec(implementationGuide.getValue()));
packageInstallerSvc.install(
IImplementationGuideOperationProvider.toPackageInstallationSpec(implementationGuide.getValue()));
} catch (IOException e) {
throw new RuntimeException(e);
}
return new Parameters();
}
}

View File

@@ -22,15 +22,15 @@ public class ImplementationGuideR5OperationProvider {
}
@Operation(name = "$install", typeName = "ImplementationGuide")
public Parameters install(@OperationParam(name = "npmContent", min = 1, max = 1) Base64BinaryType implementationGuide) {
public Parameters install(
@OperationParam(name = "npmContent", min = 1, max = 1) Base64BinaryType implementationGuide) {
try {
packageInstallerSvc.install(IImplementationGuideOperationProvider.toPackageInstallationSpec(implementationGuide.getValue()));
packageInstallerSvc.install(
IImplementationGuideOperationProvider.toPackageInstallationSpec(implementationGuide.getValue()));
} catch (IOException e) {
throw new RuntimeException(e);
}
return new Parameters();
}
}