/** @see javax.jcr.security.AccessControlManager#getPrivileges(String) */
 public Privilege[] getPrivileges(String absPath)
     throws PathNotFoundException, RepositoryException {
   checkInitialized();
   checkValidNodePath(absPath);
   Set<Privilege> privs = compiledPermissions.getPrivilegeSet(getPath(absPath));
   return privs.toArray(new Privilege[privs.size()]);
 }
  /**
   * @see org.apache.jackrabbit.api.security.JackrabbitAccessControlManager#getPrivileges(String,
   *     Set)
   */
  public Privilege[] getPrivileges(String absPath, Set<Principal> principals)
      throws PathNotFoundException, RepositoryException {
    checkInitialized();
    checkValidNodePath(absPath);
    checkPermission(absPath, Permission.READ_AC);

    CompiledPermissions perms = acProvider.compilePermissions(principals);
    try {
      Set<Privilege> privs = perms.getPrivilegeSet(getPath(absPath));
      return privs.toArray(new Privilege[privs.size()]);
    } finally {
      perms.close();
    }
  }