Search in sources :

Example 11 with Housekeeping

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

the class StudyOperationsService method assignStudyCurator.

/**
     * Assign curator to a study
     */
public void assignStudyCurator(Study study, Assignee assignee, SecureUser user) {
    Long curatorId = assignee.getCuratorId();
    Curator curator = curatorRepository.findOne(curatorId);
    // Set new curator on the study housekeeping
    Housekeeping housekeeping = study.getHousekeeping();
    housekeeping.setCurator(curator);
    housekeepingOperationsService.saveHousekeeping(study, housekeeping);
    // Add event
    recordStudyCuratorChange(study, user, curator);
}
Also used : Housekeeping(uk.ac.ebi.spot.goci.model.Housekeeping) Curator(uk.ac.ebi.spot.goci.model.Curator)

Aggregations

Housekeeping (uk.ac.ebi.spot.goci.model.Housekeeping)11 Study (uk.ac.ebi.spot.goci.model.Study)6 CurationStatus (uk.ac.ebi.spot.goci.model.CurationStatus)4 HousekeepingBuilder (uk.ac.ebi.spot.goci.builder.HousekeepingBuilder)3 StudyBuilder (uk.ac.ebi.spot.goci.builder.StudyBuilder)3 Curator (uk.ac.ebi.spot.goci.model.Curator)3 Date (java.util.Date)2 Before (org.junit.Before)2 Test (org.junit.Test)2 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)2 Association (uk.ac.ebi.spot.goci.model.Association)2 ArrayList (java.util.ArrayList)1 Assertions.assertThat (org.assertj.core.api.Assertions.assertThat)1 RunWith (org.junit.runner.RunWith)1 Matchers (org.mockito.Matchers)1 Mock (org.mockito.Mock)1 Mockito.times (org.mockito.Mockito.times)1 Mockito.verify (org.mockito.Mockito.verify)1 Mockito.verifyZeroInteractions (org.mockito.Mockito.verifyZeroInteractions)1 Mockito.when (org.mockito.Mockito.when)1