CarpDeploymentService class

A DeploymentService that talks to the CARP Web Services (CAWS).

A Deployment Service allows deploying study protocols to participants and retrieving SmartphoneDeployment's for participating primary devices as defined in the protocol.

Inheritance

Constructors

CarpDeploymentService()
Singleton default instance of the CarpDeploymentService. Before this instance can be used, it must be configured using the configure method.
factory

Properties

app CarpApp
The CARP app associated with the CARP Web Service.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, String>
The headers for any authenticated HTTP REST call to a CarpBaseService.
no setterinherited
isConfigured bool
Has this service been configured?
no setterinherited
rpcEndpointName String
The endpoint name for this service at CARP.
no setteroverride
rpcEndpointUri String
The URL for this service's endpoint at CARP.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
study ↔ SmartphoneStudy?
The study associated with this service, if available. Can be set directly or as part of the configure methods.
getter/setter pairinherited

Methods

configure(CarpApp app, [SmartphoneStudy? study]) → void
Configure the this instance of a Carp Service.
inherited
configureFrom(CarpBaseService service) → void
Configure from another service which has already been configured.
inherited
createStudyDeployment(StudyProtocol protocol, [List<ParticipantInvitation> invitations = const [], String? id, Map<String, DeviceRegistration>? connectedDevicePreregistrations]) Future<StudyDeploymentStatus>
Instantiate a study deployment for a given protocol with participants defined in invitations.
override
deployment([String? studyDeploymentId, String? primaryDeviceRoleName]) DeploymentReference
Gets a DeploymentReference for a studyDeploymentId and primaryDeviceRoleName. studyDeploymentId and primaryDeviceRoleName can be omitted if already specified as part of this service's study.
deviceDeployed(String studyDeploymentId, String primaryDeviceRoleName, DateTime deviceDeploymentLastUpdatedOn) Future<StudyDeploymentStatus>
Indicate to stakeholders in the study deployment with studyDeploymentId that the device with primaryDeviceRoleName was deployed successfully, using the device deployment with timestamp deviceDeploymentLastUpdatedOn, i.e., that the study deployment was loaded on the device and that the necessary runtime is available to run it.
override
getDeviceDeploymentFor(String studyDeploymentId, String primaryDeviceRoleName) Future<SmartphoneDeployment>
Get the deployment configuration for the primary device with primaryDeviceRoleName in the study deployment with studyDeploymentId.
override
getPrimaryDeviceRoleName([String? deviceRoleName]) String
Resolve the primary device role name.
inherited
getStudyDeploymentId([String? studyDeploymentId]) String
Resolve study deployment ID.
inherited
getStudyDeploymentStatus(String studyDeploymentId) Future<StudyDeploymentStatus>
Get the status for a study deployment with the given studyDeploymentId.
override
getStudyDeploymentStatusList(List<String> studyDeploymentIds) Future<List<StudyDeploymentStatus>>
Get the status for a set of deployments with the specified studyDeploymentIds. If studyDeploymentIds is empty, an empty list is returned.
override
getStudyId([String? studyId]) String
Resolve study ID.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerDevice(String studyDeploymentId, String deviceRoleName, DeviceRegistration registration) Future<StudyDeploymentStatus>
Register the device with the specified deviceRoleName for the study deployment with studyDeploymentId. Thr registration contains a matching configuration for the device with deviceRoleName.
override
removeStudyDeployments(Set<String> studyDeploymentIds) Future<Set<String>>
Remove study deployments with the given studyDeploymentIds. This also removes all data related to the study deployments managed by ParticipationService.
override
stop(String studyDeploymentId) Future<StudyDeploymentStatus>
Stop the study deployment with the specified studyDeploymentId. No further changes to this deployment will be allowed and no more data will be collected.
override
toString() String
A string representation of this object.
inherited
unregisterDevice(String studyDeploymentId, String deviceRoleName) Future<StudyDeploymentStatus>
Unregister the device with the specified deviceRoleName for the study deployment with studyDeploymentId.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited