Java Code Examples for org.apache.chemistry.opencmis.client.api.Folder#deleteTree()
The following examples show how to use
org.apache.chemistry.opencmis.client.api.Folder#deleteTree() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SampleClient.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
/** * Clean up test folder before executing test * * @param target * @param delFolderName */ private static void cleanup(Folder target, String delFolderName) { try { CmisObject object = session.getObjectByPath(target.getPath() + delFolderName); Folder delFolder = (Folder) object; delFolder.deleteTree(true, UnfileObject.DELETE, true); } catch (CmisObjectNotFoundException e) { System.err.println("No need to clean up."); } }
Example 2
Source File: PublicApiClient.java From alfresco-remote-api with GNU Lesser General Public License v3.0 | 5 votes |
public List<String> removeTree(String objectId, boolean allVersions, UnfileObject unfile, boolean continueOnFailure) { CmisObject o = getObject(objectId); if(o instanceof Folder) { Folder f = (Folder)o; List<String> res = f.deleteTree(allVersions, unfile, continueOnFailure); return res; } else { throw new IllegalArgumentException("Object does not exist or is not a folder"); } }