Interface PrivilegeManager
- 
@ProviderType public interface PrivilegeManagerPrivilegeManageris a jackrabbit specific extensions to JCR access control management that allows to retrieve privileges known by this JCR implementation and to register new custom privileges according to implementation specific rules.- See Also:
 AccessControlManager.privilegeFromName(String)
 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull javax.jcr.security.PrivilegegetPrivilege(@NotNull java.lang.String privilegeName)Returns the privilege with the specifiedprivilegeName.@NotNull javax.jcr.security.Privilege[]getRegisteredPrivileges()Returns all registered privileges.@NotNull javax.jcr.security.PrivilegeregisterPrivilege(@NotNull java.lang.String privilegeName, boolean isAbstract, @Nullable java.lang.String[] declaredAggregateNames)Creates and registers a new custom privilege with the specified characteristics and returns the new privilege. 
 - 
 
- 
- 
Method Detail
- 
getRegisteredPrivileges
@NotNull @NotNull javax.jcr.security.Privilege[] getRegisteredPrivileges() throws javax.jcr.RepositoryExceptionReturns all registered privileges.- Returns:
 - all registered privileges.
 - Throws:
 javax.jcr.RepositoryException- If an error occurs.
 
- 
getPrivilege
@NotNull @NotNull javax.jcr.security.Privilege getPrivilege(@NotNull @NotNull java.lang.String privilegeName) throws javax.jcr.security.AccessControlException, javax.jcr.RepositoryExceptionReturns the privilege with the specifiedprivilegeName.- Parameters:
 privilegeName- Name of the principal.- Returns:
 - the privilege with the specified 
privilegeName. - Throws:
 javax.jcr.security.AccessControlException- If no privilege with the given name exists.javax.jcr.RepositoryException- If another error occurs.
 
- 
registerPrivilege
@NotNull @NotNull javax.jcr.security.Privilege registerPrivilege(@NotNull @NotNull java.lang.String privilegeName, boolean isAbstract, @Nullable @Nullable java.lang.String[] declaredAggregateNames) throws javax.jcr.AccessDeniedException, javax.jcr.NamespaceException, javax.jcr.RepositoryExceptionCreates and registers a new custom privilege with the specified characteristics and returns the new privilege.If the registration succeeds, the changes are immediately effective; there is no need to call
save.- Parameters:
 privilegeName- The name of the new custom privilege.isAbstract- Boolean flag indicating if the privilege is abstract.declaredAggregateNames- An array of privilege names referring to registered privileges being aggregated by this new custom privilege. In case of a non aggregate privilege an empty array should be passed.- Returns:
 - the new privilege.
 - Throws:
 javax.jcr.AccessDeniedException- If the session this manager has been created for is not allowed to register new privileges.javax.jcr.NamespaceException- If any of the specified JCR names is illegal.javax.jcr.RepositoryException- If the privilege could not be registered due to any implementation specific constraint violations or if persisting the custom privilege fails.
 
 - 
 
 -