@Test public void testPurgeTreeRoot() throws Exception { String pid = "uuid:tree1-child2"; String parentPid = "uuid:tree1"; boolean hierarchy = false; PurgeFedoraObject purge = new PurgeFedoraObject(support.getRemoteStorage()); purge.purge(pid, hierarchy, "junit"); List<String> pids = Arrays.asList( "uuid:tree1", "uuid:tree1-child1", "uuid:tree1-child1-child1", "uuid:tree1-child1-child1-child1", "uuid:tree1-child1-child1-child2", "uuid:tree1-child2", "uuid:tree1-child2-child1", "uuid:tree1-child2-child1-child1" ); List<String> removed = Arrays.asList(pid); ArrayList<String> shouldRemain = new ArrayList<String>(pids); shouldRemain.removeAll(removed); List<Item> found = support.getRemoteStorage().getSearch().find(pids, false); FedoraTestSupport.assertItem(found, shouldRemain); FedoraTestSupport.assertNoItem(found, removed); List<Item> children = support.getRemoteStorage().getSearch().findChildren(parentPid); FedoraTestSupport.assertNoItem(children, pid); }
public void purge(String pid, boolean hierarchy, String message) throws PurgeException { purge(Collections.singletonList(pid), hierarchy, message); }
PurgeFedoraObject { public void purge(String pid, boolean hierarchy, String message) throws PurgeException { purge(Collections.singletonList(pid), hierarchy, message); } }
PurgeFedoraObject { public void purge(String pid, boolean hierarchy, String message) throws PurgeException { purge(Collections.singletonList(pid), hierarchy, message); } PurgeFedoraObject(RemoteStorage storage); }
PurgeFedoraObject { public void purge(String pid, boolean hierarchy, String message) throws PurgeException { purge(Collections.singletonList(pid), hierarchy, message); } PurgeFedoraObject(RemoteStorage storage); void delete(String pid, boolean hierarchy, String message); void delete(List<String> pids, boolean hierarchy, String message); void purge(String pid, boolean hierarchy, String message); void purge(List<String> pids, boolean hierarchy, String message); void restore(String pid, String message); void restore(List<String> pids, String message); }
PurgeFedoraObject { public void purge(String pid, boolean hierarchy, String message) throws PurgeException { purge(Collections.singletonList(pid), hierarchy, message); } PurgeFedoraObject(RemoteStorage storage); void delete(String pid, boolean hierarchy, String message); void delete(List<String> pids, boolean hierarchy, String message); void purge(String pid, boolean hierarchy, String message); void purge(List<String> pids, boolean hierarchy, String message); void restore(String pid, String message); void restore(List<String> pids, String message);  }