Skip to content

Commit 41f7f94

Browse files
committed
Add method for experiment description
1 parent 7d97528 commit 41f7f94

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

project-management/src/main/java/life/qbic/projectmanagement/application/api/AsyncExperimentService.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77

88
public interface AsyncExperimentService {
99

10-
sealed interface UpdateRequestBody permits ExperimentalVariables {
10+
sealed interface UpdateRequestBody permits ExperimentDescription, ExperimentalVariables {
1111

1212
}
1313

14-
sealed interface UpdateResponseBody permits ExperimentalVariables {
14+
sealed interface UpdateResponseBody permits ExperimentDescription, ExperimentalVariables {
1515

1616
}
1717

@@ -25,6 +25,13 @@ record ExperimentalVariables(List<ExperimentalVariable> experimentalVariables) i
2525

2626
}
2727

28+
record ExperimentDescription(String experimentName, Set<String> species, Set<String> specimen,
29+
Set<String> analytes) implements UpdateRequestBody,
30+
UpdateResponseBody {
31+
32+
33+
}
34+
2835
record ExperimentUpdateRequest(String projectId, String experimentId, UpdateRequestBody body,
2936
String requestId) {
3037

project-management/src/main/java/life/qbic/projectmanagement/application/api/AsyncExperimentServiceImpl.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,20 @@ public Mono<ExperimentUpdateResponse> update(ExperimentUpdateRequest request) {
1111
case ExperimentalVariables experimentalVariables ->
1212
updateExperimentalVariables(request.projectId(), request.experimentId(),
1313
experimentalVariables);
14+
case ExperimentDescription experimentDescription ->
15+
updateExperimentDescription(request.projectId(), request.experimentId(),
16+
experimentDescription);
17+
1418
}).subscribeOn(Schedulers.boundedElastic());
1519
}
1620

21+
private ExperimentUpdateResponse updateExperimentDescription(String projectId,
22+
String experimentId,
23+
ExperimentDescription experimentDescription) {
24+
//TODO implement
25+
throw new RuntimeException("Not implemented");
26+
}
27+
1728
private ExperimentUpdateResponse updateExperimentalVariables(String projectId,
1829
String experimentId, ExperimentalVariables experimentalVariables) {
1930
//TODO implement

0 commit comments

Comments
 (0)