CarpBaseService class abstract
An abstract base service class for all CARP Services:
ParticipationService
DeploymentService
ProtocolService
- CarpService
The (current) assumption is that each Flutter app (using this library) will only connect to one CARP web services backend. Therefore a all all CARP services are singletons and can be used like:
await CarpAuthService().configure(authProperties);
var user = await CarpAuthService().authenticateWithUsernamePassword(
username: username,
password: password,
);
final app = CarpApp(
name: 'CAWS DEV',
uri: Uri(
scheme: 'https',
host: 'dev.carp.dk',
));
CarpParticipationService().configure(app);
where authProperties
, username
, and password
are parameters for setting up
authentication, and app
is configuring the participation service to use the
right CAWS instance.
Constructors
Properties
- app → CarpApp
-
The CARP app associated with the CARP Web Service.
no setter
- 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 setter
- isConfigured → bool
-
Has this service been configured?
no setter
- rpcEndpointName → String
-
The endpoint name for this service at CARP.
no setter
- rpcEndpointUri → String
-
The URL for this service's endpoint at CARP.
no setter
- 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 pair
Methods
-
configure(
CarpApp app, [SmartphoneStudy? study]) → void - Configure the this instance of a Carp Service.
-
configureFrom(
CarpBaseService service) → void -
Configure from another
service
which has already been configured. -
getStudyDeploymentId(
String? studyDeploymentId) → String - Resolve study deployment ID.
-
getStudyId(
String? studyId) → String - Resolve study ID.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited