Skip to content

Commit

Permalink
cleanup chandges
Browse files Browse the repository at this point in the history
  • Loading branch information
grapigeau committed Sep 10, 2024
1 parent 2c1ffb3 commit 6833cf5
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 71 deletions.
6 changes: 0 additions & 6 deletions plugin-nabu/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
</dependency>
<dependency>
<groupId>ca.on.oicr.gsi</groupId>
<artifactId>shesmu-plugin-guanyin</artifactId>
<version>1.34.3-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<finalName>shesmu-plugin-nabu</finalName>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
public class ArchiveCaseAction extends JsonParameterisedAction {

private final Definer<NabuPlugin> owner;
private final ObjectNode parameters;
private final ObjectNode rootParameters = MAPPER.createObjectNode();
static final ObjectMapper MAPPER = new ObjectMapper();
private List<String> errors = List.of();
public String caseId;
Expand All @@ -48,7 +46,6 @@ public class ArchiveCaseAction extends JsonParameterisedAction {
public ArchiveCaseAction(Definer<NabuPlugin> owner) {
super("nabu-plugin");
this.owner = owner;
parameters = rootParameters.putObject("parameters");
}

@ActionParameter
Expand Down Expand Up @@ -245,7 +242,6 @@ public ObjectNode toJson(ObjectMapper mapper) {
limsIds.forEach(node.putArray("limsIds")::add);
workflowRunIdsForOffsiteArchive.forEach(node.putArray("workflowRunIdsForOffsiteArchive")::add);
workflowRunIdsForVidarrArchival.forEach(node.putArray("workflowRunIdsForVidarrArchival")::add);
node.set("parameters", parameters);
return node;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,67 +61,6 @@ private Stream<NabuCaseArchiveValue> caseArchives(String baseUrl)
: Optional.of(ca.getWorkflowRunIdsForVidarrArchival())));
}

// private Stream<NabuCaseArchiveValue> newCaseArchive(String baseUrl, NabuCaseArchiveDto
// cArchive)
// throws IOException, InterruptedException {
//
// final var builder = HttpRequest.newBuilder(URI.create(baseUrl + "/case"));
// final var wfrIdsForOffsiteArchiveString =
// cArchive.getWorkflowRunIdsForOffsiteArchive().stream()
// .collect(Collectors.joining("','", "'", "'"));
// final var wfrIdsForVidarrArchivalString =
// cArchive.getWorkflowRunIdsForVidarrArchival().stream()
// .collect(Collectors.joining("','", "'", "'"));
// final var request =
// String.format(
// "{ \"caseIdentifier\":%s, \"requisitionId\":%s, \"limsIds\":%s,
// \"workflowRunIdsForOffsiteArchive\":[%s],"
// + " \"workflowRunIdsForVidarrArchival\":[%s]}",
// cArchive.getCaseIdentifier(),
// cArchive.getRequisitionId(),
// cArchive.getLimsIds(),
// wfrIdsForOffsiteArchiveString,
// wfrIdsForVidarrArchivalString);
// final var response =
// HTTP_CLIENT.send(
// builder
// .header("Content-Type", "application/json")
// .POST(BodyPublishers.ofString(request))
// .build(),
// new JsonListBodyHandler<>(MAPPER, NabuCaseArchiveDto.class));
// if (response.statusCode() / 100 != 2) {
// return response
// .body()
// .get()
// .map(
// ca ->
// new NabuCaseArchiveValue(
// ca.getCaseFilesUnloaded() == null
// ? Optional.empty()
// : Optional.of(Instant.parse(ca.getCaseFilesUnloaded())),
// ca.getCaseIdentifier(),
// Optional.ofNullable(ca.getCommvaultBackupJobId()),
// Instant.parse(ca.getCreated()),
// ca.getFilesCopiedToOffsiteArchiveStagingDir() == null
// ? Optional.empty()
// : Optional.of(
// Instant.parse(ca.getFilesCopiedToOffsiteArchiveStagingDir())),
// ca.getFilesLoadedIntoVidarrArchival() == null
// ? Optional.empty()
// :
// Optional.of(Instant.parse(ca.getFilesLoadedIntoVidarrArchival())),
// ca.getLimsIds(),
// Instant.parse(ca.getModified()),
// ca.getRequisitionId(),
// ca.getWorkflowRunIdsForOffsiteArchive(),
// ca.getWorkflowRunIdsForVidarrArchival() == null
// ? Optional.empty()
// : Optional.of(ca.getWorkflowRunIdsForVidarrArchival())));
// } else {
// throw new IOException();
// }
// }

@Override
protected Stream<NabuCaseArchiveValue> fetch(Instant lastUpdated) throws Exception {
if (config.isEmpty()) {
Expand Down

0 comments on commit 6833cf5

Please sign in to comment.