|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.core.security.authorization.UnmodifiableAccessControlList
public class UnmodifiableAccessControlList
An implementation of the AccessControlList interface that only
allows for reading. The write methods
(addAccessControlEntry
and removeAccessControlEntry)
throw an AccessControlException.
| Constructor Summary | |
|---|---|
UnmodifiableAccessControlList(AccessControlList acl)
Construct a new UnmodifiableAccessControlList |
|
UnmodifiableAccessControlList(java.util.List accessControlEntries)
Construct a new UnmodifiableAccessControlList |
|
| Method Summary | |
|---|---|
boolean |
addAccessControlEntry(java.security.Principal principal,
Privilege[] privileges)
Adds an access control entry to this policy consisting of the specified principal and the specified privileges. |
AccessControlEntry[] |
getAccessControlEntries()
Returns all access control entries present with this policy. |
void |
removeAccessControlEntry(AccessControlEntry ace)
Removes the specified AccessControlEntry from this policy. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UnmodifiableAccessControlList(AccessControlList acl)
throws javax.jcr.RepositoryException
UnmodifiableAccessControlList
acl -
javax.jcr.RepositoryExceptionpublic UnmodifiableAccessControlList(java.util.List accessControlEntries)
UnmodifiableAccessControlList
accessControlEntries - | Method Detail |
|---|
public AccessControlEntry[] getAccessControlEntries()
throws javax.jcr.RepositoryException
AccessControlListAccessControlEntry
if that AccessControlEntry has been assigned through this
API.
A RepositoryException is thrown if an error occurs.
getAccessControlEntries in interface AccessControlListjavax.jcr.RepositoryException - if an error occurs.AccessControlList.getAccessControlEntries()
public boolean addAccessControlEntry(java.security.Principal principal,
Privilege[] privileges)
throws AccessControlException,
javax.jcr.RepositoryException
AccessControlListprincipal and the specified privileges.
This method returns true if this policy was modified,
false otherwise.
How the entries are grouped within the list is an implementation detail.
An implementation may e.g. combine the specified privileges with those
added by a previous call to addAccessControlEntry for the
same Principal. However, a call to
addAccessControlEntry for a given Principal can
never remove a Privilege added by a previous call.
The modification does not take effect until this policy has been
set to a node by calling AccessControlManager.setPolicy(String, AccessControlPolicy)
and save is performed.
An AccessControlException is thrown if the specified principal
or any of the privileges does not exist or if some other access control
related exception occurs.
A RepositoryException is thrown if another error occurs.
addAccessControlEntry in interface AccessControlListprincipal - a Principal.privileges - an array of Privileges.
true if this policy was modify; false
otherwise.
AccessControlException - if the specified principal or any of the
privileges does not existor if some other
access control related exception occurs.
javax.jcr.RepositoryException - if another error occurs.AccessControlList.addAccessControlEntry(Principal, Privilege[])
public void removeAccessControlEntry(AccessControlEntry ace)
throws AccessControlException,
javax.jcr.RepositoryException
AccessControlListAccessControlEntry from this policy.
Only exactly those entries obtained through
getAccessControlEntries can be removed. This method does
not take effect until this policy has been re-set to a node by calling
AccessControlManager.setPolicy(String, AccessControlPolicy)
and save is performed.
An AccessControlException is thrown if the specified entry
is not present on this policy.
A RepositoryException is thrown if another error occurs.
- Specified by:
removeAccessControlEntry in interface AccessControlList
- Parameters:
ace - the access control entry to be removed.
- Throws:
AccessControlException - if the specified entry is not
present on the specified node.
javax.jcr.RepositoryException - if another error occurs.- See Also:
AccessControlList.removeAccessControlEntry(AccessControlEntry)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||