public class JcrAccessControlList extends Object implements AccessControlList
{node} {mode:AccessControllable} +mode:acl {mode:Acl} +user-name {mode:permission} -permissions {String}
Constructor and Description |
---|
JcrAccessControlList(String path)
Creates new empty access control list.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addAccessControlEntry(Principal principal,
Privilege[] privileges) |
static JcrAccessControlList |
defaultAcl(AccessControlManagerImpl acm)
Creates default Access Control List.
|
boolean |
equals(Object other) |
AccessControlEntry[] |
getAccessControlEntries() |
Privilege[] |
getPrivileges(SecurityContext context)
Lists all privileges defined by this access list for the given user.
|
boolean |
hasEntry(String name) |
int |
hashCode() |
boolean |
hasPrivileges(SecurityContext sc,
Privilege[] privileges)
Tests privileges relatively to the given security context.
|
boolean |
isEmpty()
Checks entries of this access control list.
|
void |
removeAccessControlEntry(AccessControlEntry accessControlEntry) |
String |
toString() |
public JcrAccessControlList(String path)
path
- the path to which this access list is applied.public static JcrAccessControlList defaultAcl(AccessControlManagerImpl acm)
acm
- access control manager instancepublic boolean isEmpty()
public AccessControlEntry[] getAccessControlEntries()
getAccessControlEntries
in interface AccessControlList
public boolean addAccessControlEntry(Principal principal, Privilege[] privileges) throws AccessControlException, RepositoryException
addAccessControlEntry
in interface AccessControlList
AccessControlException
RepositoryException
public void removeAccessControlEntry(AccessControlEntry accessControlEntry) throws AccessControlException, RepositoryException
removeAccessControlEntry
in interface AccessControlList
AccessControlException
RepositoryException
public boolean hasPrivileges(SecurityContext sc, Privilege[] privileges)
sc
- security context carrying information about principalsprivileges
- privileges for testpublic Privilege[] getPrivileges(SecurityContext context)
context
- the security context of the user; never nullpublic boolean hasEntry(String name)
Copyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.