CarpProtocolService class
A ProtocolService
that talks to the CARP Web Services.
In order to use this service and manage protocols the user must be authenticated as a researcher.
- Inheritance
-
- Object
- CarpBaseService
- CarpProtocolService
Constructors
- CarpProtocolService()
-
Returns the singleton default instance of the CarpProtocolService.
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
-
add(
StudyProtocol protocol, [String? versionTag]) → Future< void> -
Add the specified study
protocol
.override -
addVersion(
StudyProtocol protocol, [String? versionTag]) → Future< void> -
Add a new version for the specified study
protocol
, of which a previous version with the sameid
,ownerId
, andname
is already stored.override -
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 -
createCustomProtocol(
String ownerId, String name, String description, String customProtocol) → Future< StudyProtocol> -
Create a study protocol to be deployed to a single device which has its
own way of describing study protocols that deviates from the CARP core
study protocol model.
override
-
getAllForOwner(
String ownerId) → Future< List< StudyProtocol> > -
Find all
StudyProtocol
's owned by the owner withownerId
. In the CARP web service, theownerId
is the logged in user'saccountId
.override -
getBy(
String protocolId, [String? versionTag]) → Future< StudyProtocol> -
Return the
StudyProtocol
with the specifiedprotocolId
,override -
getStudyDeploymentId(
String? studyDeploymentId) → String -
Resolve study deployment ID.
inherited
-
getStudyId(
String? studyId) → String -
Resolve study ID.
inherited
-
getVersionHistoryFor(
String protocolId) → Future< List< ProtocolVersion> > -
Returns all stored versions for the protocol with the specified
protocolId
.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
updateParticipantDataConfiguration(
String protocolId, String versionTag, List< ExpectedParticipantData> expectedParticipantData) → Future<StudyProtocol> -
Replace the expected participant data for the study protocol with the
specified
protocolId
andversionTag
withexpectedParticipantData
.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited