RecruitmentServiceLoggingProxy

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

A proxy for a recruitment 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 RecruitmentServiceLoggingProxy(service: RecruitmentService, eventBus: EventBus, log: (LoggedRequest<RecruitmentService, RecruitmentService.Event>) -> Unit = { })

Functions

Link copied to clipboard
open suspend override fun addParticipant(studyId: UUID, email: EmailAddress): Participant

Add a Participant to the study with the specified studyId, identified by the specified email address. In case the email was already added before, the same Participant is returned.

Link copied to clipboard
fun clear()
Link copied to clipboard
open suspend override fun getParticipant(studyId: UUID, participantId: UUID): Participant

Returns a participant of a study with the specified studyId, identified by participantId.

Link copied to clipboard
open suspend override fun getParticipantGroupStatusList(studyId: UUID): List<ParticipantGroupStatus>

Get the status of all deployed participant groups in the study with the specified studyId.

Link copied to clipboard
open suspend override fun getParticipants(studyId: UUID): List<Participant>

Get all Participants for the study with the specified studyId.

Link copied to clipboard
open suspend override fun inviteNewParticipantGroup(studyId: UUID, group: Set<AssignedParticipantRoles>): ParticipantGroupStatus

Create a new participant group of previously added participants and instantly send out invitations to participate in the study with the given studyId.

Link copied to clipboard
open suspend override fun stopParticipantGroup(studyId: UUID, groupId: UUID): ParticipantGroupStatus

Stop the study deployment in the study with the given studyId of the participant group with the specified groupId (equivalent to the studyDeploymentId). No further changes to this deployment will be allowed and no more data will be collected.

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

Properties

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