use of uk.ac.ebi.spot.goci.curation.model.errors.NoteIsLockedError in project goci by EBISPOT.
the class StudyOperationsService method addStudyNote.
public ErrorNotification addStudyNote(Study study, StudyNote studyNote, SecureUser user) {
ErrorNotification notification = new ErrorNotification();
// xintodo need to refactor after removing curator table
Curator curator = curatorService.getCuratorIdByEmail(user.getEmail());
studyNote.setCurator(curator);
// user cannot touch system notes
if (studyNoteOperationsService.isSystemNote(studyNote)) {
notification.addError(new NoteIsLockedError());
}
if (!notification.hasErrors()) {
studyNoteService.saveStudyNote(studyNote);
}
return notification;
}
Aggregations