addStudy method

  1. @override
void addStudy(
  1. SmartphoneStudy study
)
override

Adds study to the repository.

If study with the same study deployment id and device role name as study already exists in this repository, nothing happens. If a study needs to be updated, use the updateStudy method.

Implementation

@override
void addStudy(SmartphoneStudy study) {
  if (_repository.add(study)) {
    _studyStatusEventGroup.add(study.events);
    PersistenceService().saveStudy(study);
  }
}