@Test void deleteBySpaceTest() throws Exception { addTestFile(SPACE_1, NAMESPACE_1); addTestFile(SPACE_1, NAMESPACE_2); int deleteByWrongSpace = fileService.deleteBySpace(SPACE_2); assertEquals(0, deleteByWrongSpace); int correctDelete = fileService.deleteBySpace(SPACE_1); assertEquals(2, correctDelete); List<FileEntry> listFiles = fileService.listFiles(SPACE_1, null); assertEquals(0, listFiles.size()); }
@Override public int deleteBySpace(String space) throws FileStorageException { return deleteFileAttributesBySpace(space); }
DatabaseFileService extends FileService { @Override public int deleteBySpace(String space) throws FileStorageException { return deleteFileAttributesBySpace(space); } }
DatabaseFileService extends FileService { @Override public int deleteBySpace(String space) throws FileStorageException { return deleteFileAttributesBySpace(space); } DatabaseFileService(DataSourceWithDialect dataSourceWithDialect);  DatabaseFileService(String tableName, DataSourceWithDialect dataSourceWithDialect); protected  DatabaseFileService(DataSourceWithDialect dataSourceWithDialect, SqlFileQueryProvider sqlFileQueryProvider); }
DatabaseFileService extends FileService { @Override public int deleteBySpace(String space) throws FileStorageException { return deleteFileAttributesBySpace(space); } DatabaseFileService(DataSourceWithDialect dataSourceWithDialect);  DatabaseFileService(String tableName, DataSourceWithDialect dataSourceWithDialect); protected  DatabaseFileService(DataSourceWithDialect dataSourceWithDialect, SqlFileQueryProvider sqlFileQueryProvider); @Override T processFileContent(String space, String id, FileContentProcessor<T> fileContentProcessor); @Override int deleteBySpaceAndNamespace(String space, String namespace); @Override int deleteBySpace(String space); @Override int deleteModifiedBefore(Date modificationTime); @Override boolean deleteFile(String space, String id); @Override int deleteFilesEntriesWithoutContent(); }
DatabaseFileService extends FileService { @Override public int deleteBySpace(String space) throws FileStorageException { return deleteFileAttributesBySpace(space); } DatabaseFileService(DataSourceWithDialect dataSourceWithDialect);  DatabaseFileService(String tableName, DataSourceWithDialect dataSourceWithDialect); protected  DatabaseFileService(DataSourceWithDialect dataSourceWithDialect, SqlFileQueryProvider sqlFileQueryProvider); @Override T processFileContent(String space, String id, FileContentProcessor<T> fileContentProcessor); @Override int deleteBySpaceAndNamespace(String space, String namespace); @Override int deleteBySpace(String space); @Override int deleteModifiedBefore(Date modificationTime); @Override boolean deleteFile(String space, String id); @Override int deleteFilesEntriesWithoutContent();  }