Adds an access control entry to this policy consisting of the specified
principal 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 {@link 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.
@param principal a
Principal.
@param privileges an array of
Privileges.
@return
true if this policy was modify;
falseotherwise.
@throws AccessControlException if the specified principal or any of theprivileges does not existor if some other access control related exception occurs.
@throws RepositoryException if another error occurs.