@Test void deleteFilesBySpace() throws Exception { FileEntry firstFile = addFile(TEST_FILE_LOCATION); FileEntry secondFile = addFile(SECOND_FILE_TEST_LOCATION); FileEntry fileInOtherSpace = addFile(TEST_FILE_LOCATION, "otherspace", namespace); fileStorage.deleteFilesBySpace(spaceId); assertFileExists(false, firstFile); assertFileExists(false, secondFile); assertFileExists(true, fileInOtherSpace); }
@Override public void deleteFilesBySpace(String space) { removeBlobsByFilter(blob -> filterBySpace(blob, space)); }
ObjectStoreFileStorage implements FileStorage { @Override public void deleteFilesBySpace(String space) { removeBlobsByFilter(blob -> filterBySpace(blob, space)); } }
ObjectStoreFileStorage implements FileStorage { @Override public void deleteFilesBySpace(String space) { removeBlobsByFilter(blob -> filterBySpace(blob, space)); } ObjectStoreFileStorage(BlobStore blobStore, String container); }
ObjectStoreFileStorage implements FileStorage { @Override public void deleteFilesBySpace(String space) { removeBlobsByFilter(blob -> filterBySpace(blob, space)); } 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 deleteFilesBySpace(String space) { removeBlobsByFilter(blob -> filterBySpace(blob, space)); } 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);  }