AnsweredAssumed Answered

Problem with ACL in OpenCMIS

Question asked by jawwad on Jun 8, 2011
Latest reply on Jun 9, 2011 by jawwad
Hi,

      I am trying to add ACL to an existing document using OpenCMIS. I ve created ACEs and tried to apply them using addAcl() and apply Acl(). It doesnt give any error when I call these functions so I assume that the ACL is applied successfully. but when I try to get the ACL using getAcl() it returns a null pointer Exception. My code is:

   List<String> permissions = new ArrayList<String>();
      permissions.add("cmis:all");
      String principal = "admin";
      Ace ace = session.getObjectFactory().createAce(principal, permissions);
                existingBook.addAcl(addAce, AclPropagation.REPOSITORYDETERMINED);
                //Null pointer Exception on this statement
               List<Ace> aceList = existingBook.getAcl().getAces();

      Can anyone tell me why Acl is still null???? or what am I doing wrong :?:

       Any help will be appriciated. Thanks in advance

Outcomes