Acl acl = new Acl();
AccessControlEntry[] entries = accessList.getAccessControlEntries();
for (AccessControlEntry entry : entries) {
Policy policy = new Policy();
policy.setPrincipal(entry.getPrincipal().getName());
Privilege[] privileges = entry.getPrivileges();
for (Privilege privilege : privileges) {
policy.add(JcrPermission.forName(privilege.getName()));
}
acl.addPolicy(policy);
}
return acl;
}