@Test public void testDeleteNoneVersion() throws Exception { DeletionSelector noneVersionSelector = DeletionSelector.deleteAll(ORG_ID, MP_ID); assertTrue(repo.delete(noneVersionSelector)); assertFalse(sampleElemDir.exists()); File file = new File(PathSupport.concat(new String[] { tmpRoot.toString(), ORG_ID, MP_ID })); assertFalse(file.exists()); }
@Override public boolean delete(DeletionSelector sel) throws AssetStoreException { File dir = getDeletionSelectorDir(sel); try { FileUtils.deleteDirectory(dir); FileSupport.deleteHierarchyIfEmpty(file(path(getRootDirectory(), sel.getOrganizationId())), dir.getParentFile()); return true; } catch (IOException e) { logger.error("Error deleting directory from archive {}", dir); throw new AssetStoreException(e); } }
AbstractFileSystemAssetStore implements AssetStore { @Override public boolean delete(DeletionSelector sel) throws AssetStoreException { File dir = getDeletionSelectorDir(sel); try { FileUtils.deleteDirectory(dir); FileSupport.deleteHierarchyIfEmpty(file(path(getRootDirectory(), sel.getOrganizationId())), dir.getParentFile()); return true; } catch (IOException e) { logger.error("Error deleting directory from archive {}", dir); throw new AssetStoreException(e); } } }
AbstractFileSystemAssetStore implements AssetStore { @Override public boolean delete(DeletionSelector sel) throws AssetStoreException { File dir = getDeletionSelectorDir(sel); try { FileUtils.deleteDirectory(dir); FileSupport.deleteHierarchyIfEmpty(file(path(getRootDirectory(), sel.getOrganizationId())), dir.getParentFile()); return true; } catch (IOException e) { logger.error("Error deleting directory from archive {}", dir); throw new AssetStoreException(e); } }  }
AbstractFileSystemAssetStore implements AssetStore { @Override public boolean delete(DeletionSelector sel) throws AssetStoreException { File dir = getDeletionSelectorDir(sel); try { FileUtils.deleteDirectory(dir); FileSupport.deleteHierarchyIfEmpty(file(path(getRootDirectory(), sel.getOrganizationId())), dir.getParentFile()); return true; } catch (IOException e) { logger.error("Error deleting directory from archive {}", dir); throw new AssetStoreException(e); } }  @Override void put(StoragePath storagePath, Source source); @Override boolean copy(final StoragePath from, final StoragePath to); @Override Opt<InputStream> get(final StoragePath path); @Override boolean contains(StoragePath path); @Override boolean delete(DeletionSelector sel); @Override Option<Long> getUsedSpace(); @Override Option<Long> getUsableSpace(); @Override Option<Long> getTotalSpace(); @Override String getStoreType(); }
AbstractFileSystemAssetStore implements AssetStore { @Override public boolean delete(DeletionSelector sel) throws AssetStoreException { File dir = getDeletionSelectorDir(sel); try { FileUtils.deleteDirectory(dir); FileSupport.deleteHierarchyIfEmpty(file(path(getRootDirectory(), sel.getOrganizationId())), dir.getParentFile()); return true; } catch (IOException e) { logger.error("Error deleting directory from archive {}", dir); throw new AssetStoreException(e); } }  @Override void put(StoragePath storagePath, Source source); @Override boolean copy(final StoragePath from, final StoragePath to); @Override Opt<InputStream> get(final StoragePath path); @Override boolean contains(StoragePath path); @Override boolean delete(DeletionSelector sel); @Override Option<Long> getUsedSpace(); @Override Option<Long> getUsableSpace(); @Override Option<Long> getTotalSpace(); @Override String getStoreType();  }