StudyServiceLoggingProxy

class StudyServiceLoggingProxy(service: StudyService, eventBus: EventBus, log: (LoggedRequest<StudyService, StudyService.Event>) -> Unit) : ApplicationServiceLoggingProxy<StudyService, StudyService.Event> , StudyService

A proxy for a study service which notifies of incoming requests and responses through log and keeps a history of requests and published events in loggedRequests.

Constructors

Link copied to clipboard
fun StudyServiceLoggingProxy(service: StudyService, eventBus: EventBus, log: (LoggedRequest<StudyService, StudyService.Event>) -> Unit = { })

Functions

Link copied to clipboard
fun clear()
Link copied to clipboard
open suspend override fun createStudy(ownerId: UUID, name: String, description: String?, invitation: StudyInvitation?): StudyStatus

Create a new study for the entity (e.g., person or group) with ownerId.

Link copied to clipboard
open suspend override fun getStudiesOverview(ownerId: UUID): List<StudyStatus>

Get status for all studies created by the entity (e.g. person or group) with the specified ownerId.

Link copied to clipboard
open suspend override fun getStudyDetails(studyId: UUID): StudyDetails

Gets detailed information about the study with the specified studyId, including which study protocol is set.

Link copied to clipboard
open suspend override fun getStudyStatus(studyId: UUID): StudyStatus

Get the status for a study with the given studyId.

Link copied to clipboard
open suspend override fun goLive(studyId: UUID): StudyStatus

Lock in the current study protocol so that the study may be deployed to participants.

Link copied to clipboard
open suspend override fun remove(studyId: UUID): Boolean

Remove the study with the specified studyId and all related data.

Link copied to clipboard
open suspend override fun removeProtocol(studyId: UUID): StudyStatus

Remove the currently set study protocol for the study with the specified studyId.

Link copied to clipboard
open suspend override fun setInternalDescription(studyId: UUID, name: String, description: String?): StudyStatus

Set study details which are visible only to the study owner.

Link copied to clipboard
open suspend override fun setInvitation(studyId: UUID, invitation: StudyInvitation): StudyStatus

Specify an invitation, shared with participants once they are invited to the study with the specified studyId.

Link copied to clipboard
open suspend override fun setProtocol(studyId: UUID, protocol: StudyProtocolSnapshot): StudyStatus

Specify the study protocol to use for the study with the specified studyId.

Link copied to clipboard
fun wasCalled(request: ApplicationServiceRequest<StudyService, *>): Boolean

Properties

Link copied to clipboard
val loggedRequests: List<LoggedRequest<StudyService, StudyService.Event>>