本文整理汇总了Java中org.apache.chemistry.opencmis.client.api.Session.getAcl方法的典型用法代码示例。如果您正苦于以下问题:Java Session.getAcl方法的具体用法?Java Session.getAcl怎么用?Java Session.getAcl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.chemistry.opencmis.client.api.Session
的用法示例。
在下文中一共展示了Session.getAcl方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testRemoveAllPermissions_WEBSERVICE_10
import org.apache.chemistry.opencmis.client.api.Session; //导入方法依赖的package包/类
/**
* 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();
}
}
}
示例2: testRemoveAllPermissions_ATOMPUB_10
import org.apache.chemistry.opencmis.client.api.Session; //导入方法依赖的package包/类
@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();
}
}
}
示例3: testRemoveAllPermissions_ATOMPUB_11
import org.apache.chemistry.opencmis.client.api.Session; //导入方法依赖的package包/类
@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();
}
}
}
示例4: testRemoveAllPermissions_BROWSER_11
import org.apache.chemistry.opencmis.client.api.Session; //导入方法依赖的package包/类
@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();
}
}
}