@Test void deleteFile() throws Exception { FileEntry fileThatWillBeDeleted = addFile(TEST_FILE_LOCATION); FileEntry fileThatStays = addFile(SECOND_FILE_TEST_LOCATION); fileStorage.deleteFile(fileThatWillBeDeleted.getId(), fileThatWillBeDeleted.getSpace()); assertFileExists(false, fileThatWillBeDeleted); assertFileExists(true, fileThatStays); }
@Override public void deleteFile(String id, String space) { blobStore.removeBlob(container, id); }
ObjectStoreFileStorage implements FileStorage { @Override public void deleteFile(String id, String space) { blobStore.removeBlob(container, id); } }
ObjectStoreFileStorage implements FileStorage { @Override public void deleteFile(String id, String space) { blobStore.removeBlob(container, id); } ObjectStoreFileStorage(BlobStore blobStore, String container); }
ObjectStoreFileStorage implements FileStorage { @Override public void deleteFile(String id, String space) { blobStore.removeBlob(container, id); } ObjectStoreFileStorage(BlobStore blobStore, String container); @Override void addFile(FileEntry fileEntry, File file); @Override List<FileEntry> getFileEntriesWithoutContent(List<FileEntry> fileEntries); @Override void deleteFile(String id, String space); @Override void deleteFilesBySpace(String space); @Override void deleteFilesBySpaceAndNamespace(String space, String namespace); @Override int deleteFilesModifiedBefore(Date modificationTime); @Override T processFileContent(String space, String id, FileContentProcessor<T> fileContentProcessor); }
ObjectStoreFileStorage implements FileStorage { @Override public void deleteFile(String id, String space) { blobStore.removeBlob(container, id); } ObjectStoreFileStorage(BlobStore blobStore, String container); @Override void addFile(FileEntry fileEntry, File file); @Override List<FileEntry> getFileEntriesWithoutContent(List<FileEntry> fileEntries); @Override void deleteFile(String id, String space); @Override void deleteFilesBySpace(String space); @Override void deleteFilesBySpaceAndNamespace(String space, String namespace); @Override int deleteFilesModifiedBefore(Date modificationTime); @Override T processFileContent(String space, String id, FileContentProcessor<T> fileContentProcessor);  }