Java Code Examples for org.apache.chemistry.opencmis.client.api.Folder#delete()
The following examples show how to use
org.apache.chemistry.opencmis.client.api.Folder#delete() .
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: TestRemovePermissions.java From alfresco-remote-api with GNU Lesser General Public License v3.0 | 4 votes |
/** * cmisws?wsdl is not available using jetty in automated test suite should * be runned using an external alfresco server * */ // @Test public void testRemoveAllPermissions_WEBSERVICE_10() { Folder testFolder = null; try { Session session = getWEBSERVICE_10_Session(); if (session == null) { fail("WEBSERVICE 1.0 session cannot be null"); } testFolder = createFolder(session, "testRemoveAllPermissions_WEBSERVICE_10"); List<Ace> acl = create2TestACLs(session); // adding new ACE testFolder.addAcl(acl, AclPropagation.PROPAGATE); Acl allacl = session.getAcl(session.createObjectId(testFolder.getId()), false); int oldSize = allacl.getAces().size(); // Removing ALL ACEs Acl newAcl = testFolder.removeAcl(allacl.getAces(), AclPropagation.PROPAGATE); int newsize = newAcl.getAces().size(); System.out.println("Old ace size -->" + oldSize); System.out.println("New ace size --> " + newsize); assertTrue(newsize == oldSize - acl.size()); } catch (Exception ex) { fail(ex.getMessage()); } finally { if (testFolder != null) { testFolder.delete(); } } }
Example 2
Source File: TestRemovePermissions.java From alfresco-remote-api with GNU Lesser General Public License v3.0 | 4 votes |
@Test public void testRemoveAllPermissions_ATOMPUB_10() { Folder testFolder = null; try { Session session = getATOMPUB_10_Session(); if (session == null) { fail("ATOMPUB 1.0 session cannot be null"); } testFolder = createFolder(session, "testRemoveAllPermissions_ATOMPUB_10"); List<Ace> acl = create2TestACLs(session); // adding new ACE testFolder.addAcl(acl, AclPropagation.PROPAGATE); Acl allacl = session.getAcl(session.createObjectId(testFolder.getId()), false); int oldSize = allacl.getAces().size(); // Removing ALL ACEs Acl newAcl = testFolder.removeAcl(allacl.getAces(), AclPropagation.PROPAGATE); int newsize = newAcl.getAces().size(); System.out.println("Old ace size -->" + oldSize); System.out.println("New ace size --> " + newsize); assertTrue(newsize == oldSize - acl.size()); } catch (Exception ex) { fail(ex.getMessage()); } finally { if (testFolder != null) { testFolder.delete(); } } }
Example 3
Source File: TestRemovePermissions.java From alfresco-remote-api with GNU Lesser General Public License v3.0 | 4 votes |
@Test public void testRemoveAllPermissions_ATOMPUB_11() { Folder testFolder = null; try { Session session = getATOMPUB_11_Session(); if (session == null) { fail("ATOMPUB 1.1 session cannot be null"); } testFolder = createFolder(session, "testRemoveAllPermissions_ATOMPUB_11"); List<Ace> acl = create2TestACLs(session); // adding new ACE testFolder.addAcl(acl, AclPropagation.PROPAGATE); Acl allacl = session.getAcl(session.createObjectId(testFolder.getId()), false); int oldSize = allacl.getAces().size(); // Removing ALL ACEs Acl newAcl = testFolder.removeAcl(allacl.getAces(), AclPropagation.PROPAGATE); int newsize = newAcl.getAces().size(); System.out.println("Old ace size -->" + oldSize); System.out.println("New ace size --> " + newsize); assertTrue(newsize == oldSize - acl.size()); } catch (Exception ex) { fail(ex.getMessage()); } finally { if (testFolder != null) { testFolder.delete(); } } }
Example 4
Source File: TestRemovePermissions.java From alfresco-remote-api with GNU Lesser General Public License v3.0 | 4 votes |
@Test public void testRemoveAllPermissions_BROWSER_11() { Folder testFolder = null; try { Session session = getBROWSER_11_Session(); if (session == null) { fail("ATOMPUB 1.1 session cannot be null"); } testFolder = createFolder(session, "testRemoveAllPermissions_BROWSER_11"); List<Ace> acl = create2TestACLs(session); // adding new ACE testFolder.addAcl(acl, AclPropagation.PROPAGATE); Acl allacl = session.getAcl(session.createObjectId(testFolder.getId()), false); int oldSize = allacl.getAces().size(); // Removing ALL ACEs Acl newAcl = testFolder.removeAcl(allacl.getAces(), AclPropagation.PROPAGATE); int newsize = newAcl.getAces().size(); System.out.println("Old ace size -->" + oldSize); System.out.println("New ace size --> " + newsize); assertTrue(newsize == oldSize - acl.size()); } catch (Exception ex) { fail(ex.getMessage()); } finally { if (testFolder != null) { testFolder.delete(); } } }