Skip to content

Commit

Permalink
Add registration exception
Browse files Browse the repository at this point in the history
  • Loading branch information
sven1103 committed Sep 23, 2024
1 parent 2de29fe commit 8bba670
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,19 @@ public SampleRegistrationServiceV2(BatchRegistrationService batchRegistrationSer

@PreAuthorize("hasPermission(#projectId, 'life.qbic.projectmanagement.domain.model.project.Project', 'WRITE')")
public CompletableFuture<Void> registerNewSamples(Collection<SampleMetadata> sampleMetadata,
ExperimentId experimentId, ProjectId projectId, String batchLabel, boolean batchIsPilot) {

ExperimentId experimentId, ProjectId projectId, String batchLabel, boolean batchIsPilot) throws RegistrationException{
batchRegistrationService.registerBatch(batchLabel, batchIsPilot, projectId);
throw new UnsupportedOperationException("Not implemented yet");
}

@PreAuthorize("hasPermission(#projectId, 'life.qbic.projectmanagement.domain.model.project.Project', 'WRITE')")
public CompletableFuture<Void> updateSamples(Collection<SampleMetadata> sampleMetadata,
ExperimentId experimentId, ProjectId projectId) {
ExperimentId experimentId, ProjectId projectId) throws RegistrationException{
throw new UnsupportedOperationException("Not implemented yet");
}

public static class RegistrationException extends RuntimeException {
public RegistrationException(String message) {}
}

}

0 comments on commit 8bba670

Please sign in to comment.