use of com.odysseusinc.arachne.portal.model.StudyDataSourceComment in project ArachneCentralAPI by OHDSI.
the class BaseStudyServiceImpl method processDataSourceInvitation.
@Override
public void processDataSourceInvitation(IUser user, Long id, Boolean accepted, String comment) {
StudyDataSourceLink studyDataSourceLink = studyDataSourceLinkRepository.findByIdAndOwnerId(id, user.getId());
if (studyDataSourceLink != null) {
DataSourceStatus status = TRUE.equals(accepted) ? APPROVED : DECLINED;
studyDataSourceLink.setStatus(status);
if (DECLINED == status) {
if (!StringUtils.isEmpty(comment)) {
dataSourceCommentRepository.save(new StudyDataSourceComment(studyDataSourceLink.getId(), user.getId(), comment));
}
}
}
}
Aggregations