@Test public void testCreateFileUploadEvent() { when(studyRepository.findOne(STUDY_ID)).thenReturn(STUDY); studyFileService.createFileUploadEvent(STUDY_ID, SECURE_USER); verify(studyRepository, times(1)).findOne(STUDY_ID); verify(trackingOperationService, times(1)).update(STUDY, SECURE_USER, "STUDY_FILE_UPLOAD"); verify(studyRepository, times(1)).save(STUDY); }
public void createFileUploadEvent(Long studyId, SecureUser user) { Study study = studyRepository.findOne(studyId); trackingOperationService.update(study, user, "STUDY_FILE_UPLOAD"); studyRepository.save(study); getLog().info("Study ".concat(String.valueOf(study.getId())).concat(" updated")); }
StudyFileService { public void createFileUploadEvent(Long studyId, SecureUser user) { Study study = studyRepository.findOne(studyId); trackingOperationService.update(study, user, "STUDY_FILE_UPLOAD"); studyRepository.save(study); getLog().info("Study ".concat(String.valueOf(study.getId())).concat(" updated")); } }
StudyFileService { public void createFileUploadEvent(Long studyId, SecureUser user) { Study study = studyRepository.findOne(studyId); trackingOperationService.update(study, user, "STUDY_FILE_UPLOAD"); studyRepository.save(study); getLog().info("Study ".concat(String.valueOf(study.getId())).concat(" updated")); } @Autowired  StudyFileService(@Qualifier("studyTrackingOperationServiceImpl") TrackingOperationService trackingOperationService,
                            StudyRepository studyRepository); }
StudyFileService { public void createFileUploadEvent(Long studyId, SecureUser user) { Study study = studyRepository.findOne(studyId); trackingOperationService.update(study, user, "STUDY_FILE_UPLOAD"); studyRepository.save(study); getLog().info("Study ".concat(String.valueOf(study.getId())).concat(" updated")); } @Autowired  StudyFileService(@Qualifier("studyTrackingOperationServiceImpl") TrackingOperationService trackingOperationService,
                            StudyRepository studyRepository); synchronized void createStudyDir(Long studyId); List<StudyFileSummary> getStudyFiles(Long studyId); synchronized void upload(MultipartFile fileFromUpload, Long studyId); void createFileUploadEvent(Long studyId, SecureUser user); @Async void deleteFile(Long studyId, String fileName); File getFileFromFileName(Long studyId, String fileName); File getStudyDirRoot(); void setStudyDirRoot(File studyDirRoot); }
StudyFileService { public void createFileUploadEvent(Long studyId, SecureUser user) { Study study = studyRepository.findOne(studyId); trackingOperationService.update(study, user, "STUDY_FILE_UPLOAD"); studyRepository.save(study); getLog().info("Study ".concat(String.valueOf(study.getId())).concat(" updated")); } @Autowired  StudyFileService(@Qualifier("studyTrackingOperationServiceImpl") TrackingOperationService trackingOperationService,
                            StudyRepository studyRepository); synchronized void createStudyDir(Long studyId); List<StudyFileSummary> getStudyFiles(Long studyId); synchronized void upload(MultipartFile fileFromUpload, Long studyId); void createFileUploadEvent(Long studyId, SecureUser user); @Async void deleteFile(Long studyId, String fileName); File getFileFromFileName(Long studyId, String fileName); File getStudyDirRoot(); void setStudyDirRoot(File studyDirRoot);  }