Skip to content

Commit 3663902

Browse files
committed
Add confounding variables record
1 parent 41f7f94 commit 3663902

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,18 @@
33
import java.util.List;
44
import java.util.Set;
55
import java.util.UUID;
6+
import life.qbic.projectmanagement.application.confounding.ConfoundingVariableService.ConfoundingVariableInformation;
67
import reactor.core.publisher.Mono;
78

89
public interface AsyncExperimentService {
910

10-
sealed interface UpdateRequestBody permits ExperimentDescription, ExperimentalVariables {
11+
sealed interface UpdateRequestBody permits ConfoundingVariables, ExperimentDescription,
12+
ExperimentalVariables {
1113

1214
}
1315

14-
sealed interface UpdateResponseBody permits ExperimentDescription, ExperimentalVariables {
16+
sealed interface UpdateResponseBody permits ConfoundingVariables, ExperimentDescription,
17+
ExperimentalVariables {
1518

1619
}
1720

@@ -32,6 +35,11 @@ record ExperimentDescription(String experimentName, Set<String> species, Set<Str
3235

3336
}
3437

38+
record ConfoundingVariables(List<ConfoundingVariableInformation> confoundingVariables) implements
39+
UpdateRequestBody, UpdateResponseBody {
40+
41+
}
42+
3543
record ExperimentUpdateRequest(String projectId, String experimentId, UpdateRequestBody body,
3644
String requestId) {
3745

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,18 @@ public Mono<ExperimentUpdateResponse> update(ExperimentUpdateRequest request) {
1515
updateExperimentDescription(request.projectId(), request.experimentId(),
1616
experimentDescription);
1717

18+
case ConfoundingVariables confoundingVariables ->
19+
updateConfoundingVariables(request.projectId(), request.experimentId(),
20+
confoundingVariables);
1821
}).subscribeOn(Schedulers.boundedElastic());
1922
}
2023

24+
private ExperimentUpdateResponse updateConfoundingVariables(String projectId, String experimentId,
25+
ConfoundingVariables confoundingVariables) {
26+
//TODO implement
27+
throw new RuntimeException("Not implemented");
28+
}
29+
2130
private ExperimentUpdateResponse updateExperimentDescription(String projectId,
2231
String experimentId,
2332
ExperimentDescription experimentDescription) {

0 commit comments

Comments
 (0)