Package services.gui
Class ResultStreamer
- java.lang.Object
-
- services.gui.ResultStreamer
-
@Singleton public class ResultStreamer extends java.lang.ObjectService class around ComponentResults and StudyResults. It's used by controllers or other services.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classResultStreamer.ResultType
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description akka.stream.javadsl.Source<akka.util.ByteString,?>streamComponentResultData(play.mvc.Http.Request request)akka.stream.javadsl.Source<akka.util.ByteString,?>streamComponentResults(Component component)Uses a Akka Source to stream ComponentResults (including their result data) that belong to the given Component from the database.akka.stream.javadsl.Source<akka.util.ByteString,?>streamResults(play.mvc.Http.Request request, ResultStreamer.ResultType resultType)akka.stream.javadsl.Source<akka.util.ByteString,?>streamResults(play.mvc.Http.Request request, ResultStreamer.ResultType resultType, java.util.Map<java.lang.String,java.lang.Object> wrapObject)akka.stream.javadsl.Source<akka.util.ByteString,?>streamStudyResultsByBatch(java.lang.String workerType, Batch batch)Uses a Akka Source to stream StudyResults (including their result data) that belong to the given Batch and worker type from the database.akka.stream.javadsl.Source<akka.util.ByteString,?>streamStudyResultsByGroup(GroupResult groupResult)Uses a Akka Source to stream StudyResults (including their result data) that belong to the given GroupResult from the database.akka.stream.javadsl.Source<akka.util.ByteString,?>streamStudyResultsByStudy(Study study)Uses a Akka Source to stream StudyResults (including their result data) that belong to the given Study from the database.akka.stream.javadsl.Source<akka.util.ByteString,?>streamStudyResultsByWorker(User signedinUser, Worker worker)Uses a Akka Source to stream StudyResults (including their result data) that belong to the given Worker from the database.java.nio.file.PathwriteResultMetadata(play.mvc.Http.Request request, java.util.Map<java.lang.String,java.lang.Object> wrapObject)Returns a file with metadata
-
-
-
Method Detail
-
streamStudyResultsByStudy
public akka.stream.javadsl.Source<akka.util.ByteString,?> streamStudyResultsByStudy(Study study)
Uses a Akka Source to stream StudyResults (including their result data) that belong to the given Study from the database.
-
streamStudyResultsByBatch
public akka.stream.javadsl.Source<akka.util.ByteString,?> streamStudyResultsByBatch(java.lang.String workerType, Batch batch)Uses a Akka Source to stream StudyResults (including their result data) that belong to the given Batch and worker type from the database. If the worker type is empty it returns all results of this Batch.
-
streamStudyResultsByGroup
public akka.stream.javadsl.Source<akka.util.ByteString,?> streamStudyResultsByGroup(GroupResult groupResult)
Uses a Akka Source to stream StudyResults (including their result data) that belong to the given GroupResult from the database.
-
streamStudyResultsByWorker
public akka.stream.javadsl.Source<akka.util.ByteString,?> streamStudyResultsByWorker(User signedinUser, Worker worker)
Uses a Akka Source to stream StudyResults (including their result data) that belong to the given Worker from the database.
-
streamComponentResults
public akka.stream.javadsl.Source<akka.util.ByteString,?> streamComponentResults(Component component)
Uses a Akka Source to stream ComponentResults (including their result data) that belong to the given Component from the database.
-
streamComponentResultData
public akka.stream.javadsl.Source<akka.util.ByteString,?> streamComponentResultData(play.mvc.Http.Request request) throws BadRequestException, ForbiddenException, NotFoundException
-
streamResults
public akka.stream.javadsl.Source<akka.util.ByteString,?> streamResults(play.mvc.Http.Request request, ResultStreamer.ResultType resultType) throws BadRequestException- Throws:
BadRequestException
-
streamResults
public akka.stream.javadsl.Source<akka.util.ByteString,?> streamResults(play.mvc.Http.Request request, ResultStreamer.ResultType resultType, java.util.Map<java.lang.String,java.lang.Object> wrapObject) throws BadRequestException- Throws:
BadRequestException
-
writeResultMetadata
public java.nio.file.Path writeResultMetadata(play.mvc.Http.Request request, java.util.Map<java.lang.String,java.lang.Object> wrapObject) throws ForbiddenException, NotFoundException, java.io.IOException, BadRequestExceptionReturns a file with metadata- Throws:
ForbiddenExceptionNotFoundExceptionjava.io.IOExceptionBadRequestException
-
-