public interface PrivilegeManager
PrivilegeManager is 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.| Modifier and Type | Method and Description |
|---|---|
@NotNull Privilege |
getPrivilege(@NotNull java.lang.String privilegeName)
Returns the privilege with the specified
privilegeName. |
@NotNull Privilege[] |
getRegisteredPrivileges()
Returns all registered privileges.
|
@NotNull Privilege |
registerPrivilege(@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.
|
@NotNull @NotNull Privilege[] getRegisteredPrivileges() throws RepositoryException
RepositoryException - If an error occurs.@NotNull @NotNull Privilege getPrivilege(@NotNull @NotNull java.lang.String privilegeName) throws AccessControlException, RepositoryException
privilegeName.privilegeName - Name of the principal.privilegeName.AccessControlException - If no privilege with the given name exists.RepositoryException - If another error occurs.@NotNull @NotNull Privilege registerPrivilege(@NotNull @NotNull java.lang.String privilegeName, boolean isAbstract, @Nullable @Nullable java.lang.String[] declaredAggregateNames) throws AccessDeniedException, NamespaceException, RepositoryException
If the registration succeeds, the changes are immediately effective;
there is no need to call save.
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.AccessDeniedException - If the session this manager has been created
for is not allowed to register new privileges.NamespaceException - If any of the specified JCR names is illegal.RepositoryException - If the privilege could not be registered due
to any implementation specific constraint violations or if persisting the
custom privilege fails.Copyright © 2010 - 2023 Adobe. All Rights Reserved