Search in sources :

Example 6 with StudyNoteForm

use of uk.ac.ebi.spot.goci.curation.model.StudyNoteForm in project goci by EBISPOT.

the class StudyNoteOperationsService method convertToStudyNoteForm.

public StudyNoteForm convertToStudyNoteForm(StudyNote note) {
    // #xintodo Should factory be use to create these instance?
    StudyNoteForm noteFrom = new StudyNoteForm(note.getId(), note.getTextNote(), noteSubjectService.findOne(note.getNoteSubject().getId()), note.getStatus(), curatorService.findOne(note.getCurator().getId()), note.getGenericId(), note.getCreatedAt(), note.getUpdatedAt());
    if (isSystemNote(note)) {
        noteFrom.setSystemNote(Boolean.TRUE);
        noteFrom.makeNotEditable();
    } else {
        noteFrom.setSystemNote(Boolean.FALSE);
        noteFrom.makeEditable();
    }
    return noteFrom;
}
Also used : StudyNoteForm(uk.ac.ebi.spot.goci.curation.model.StudyNoteForm) MultiStudyNoteForm(uk.ac.ebi.spot.goci.curation.model.MultiStudyNoteForm)

Aggregations

MultiStudyNoteForm (uk.ac.ebi.spot.goci.curation.model.MultiStudyNoteForm)6 StudyNoteForm (uk.ac.ebi.spot.goci.curation.model.StudyNoteForm)6 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)3 NoteSubject (uk.ac.ebi.spot.goci.model.NoteSubject)3 Study (uk.ac.ebi.spot.goci.model.Study)3 StudyNote (uk.ac.ebi.spot.goci.model.StudyNote)3 ArrayList (java.util.ArrayList)2 ErrorNotification (uk.ac.ebi.spot.goci.curation.model.errors.ErrorNotification)2 SecureUser (uk.ac.ebi.spot.goci.model.SecureUser)2