/** * Get the ACL readers for a given list of ACLs * * @param acls the ACLs * @return the readers for the ACLs */ public List<AclReaders> getAclReaders(List<Acl> acls) throws AuthenticationException, IOException, JSONException { if(throwException) { throw new ConnectException("THROWING EXCEPTION, better be ready!"); } List<AclReaders> allAclReaders = new ArrayList(); for(Acl acl : acls) { AclReaders aclReaders = aclReadersMap.get(acl.getId()); allAclReaders.add(aclReaders); } return allAclReaders; }
long aclChangeSetId = aclJSON.getLong("aclChangeSetId"); long aclId = aclJSON.getLong("id"); Acl acl = new Acl(aclChangeSetId, aclId); acls.add(acl);
for (Acl acl : acls) Long aclId = acl.getId(); aclIdsJSON.put(aclId); aclIds.add(aclId);