@Test(expected = EmptyFileUploadRequestException.class) public void test_should_throw_exception_when_list_of_files_to_save_is_empty() { storageService.save(Collections.emptyList(), MODULE, TAG, TENANTID); }
public List<String> save(List<MultipartFile> filesToStore, String module, String tag, String tenantId) { validateFilesToUpload(filesToStore, module, tag, tenantId); log.info(UPLOAD_MESSAGE, module, tag, filesToStore.size()); List<Artifact> artifacts = mapFilesToArtifacts(filesToStore, module, tag, tenantId); return this.artifactRepository.save(artifacts); }
StorageService { public List<String> save(List<MultipartFile> filesToStore, String module, String tag, String tenantId) { validateFilesToUpload(filesToStore, module, tag, tenantId); log.info(UPLOAD_MESSAGE, module, tag, filesToStore.size()); List<Artifact> artifacts = mapFilesToArtifacts(filesToStore, module, tag, tenantId); return this.artifactRepository.save(artifacts); } }
StorageService { public List<String> save(List<MultipartFile> filesToStore, String module, String tag, String tenantId) { validateFilesToUpload(filesToStore, module, tag, tenantId); log.info(UPLOAD_MESSAGE, module, tag, filesToStore.size()); List<Artifact> artifacts = mapFilesToArtifacts(filesToStore, module, tag, tenantId); return this.artifactRepository.save(artifacts); } @Autowired  StorageService(ArtifactRepository artifactRepository, IdGeneratorService idGeneratorService); }
StorageService { public List<String> save(List<MultipartFile> filesToStore, String module, String tag, String tenantId) { validateFilesToUpload(filesToStore, module, tag, tenantId); log.info(UPLOAD_MESSAGE, module, tag, filesToStore.size()); List<Artifact> artifacts = mapFilesToArtifacts(filesToStore, module, tag, tenantId); return this.artifactRepository.save(artifacts); } @Autowired  StorageService(ArtifactRepository artifactRepository, IdGeneratorService idGeneratorService); List<String> save(List<MultipartFile> filesToStore, String module, String tag, String tenantId); Resource retrieve(String fileStoreId, String tenantId); List<FileInfo> retrieveByTag(String tag, String tenantId); Map<String, String> getUrls(String tenantId, List<String> fileStoreIds); }
StorageService { public List<String> save(List<MultipartFile> filesToStore, String module, String tag, String tenantId) { validateFilesToUpload(filesToStore, module, tag, tenantId); log.info(UPLOAD_MESSAGE, module, tag, filesToStore.size()); List<Artifact> artifacts = mapFilesToArtifacts(filesToStore, module, tag, tenantId); return this.artifactRepository.save(artifacts); } @Autowired  StorageService(ArtifactRepository artifactRepository, IdGeneratorService idGeneratorService); List<String> save(List<MultipartFile> filesToStore, String module, String tag, String tenantId); Resource retrieve(String fileStoreId, String tenantId); List<FileInfo> retrieveByTag(String tag, String tenantId); Map<String, String> getUrls(String tenantId, List<String> fileStoreIds);  }