|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.core.security.authorization.PrivilegeRegistry
public final class PrivilegeRegistry
The PrivilegeRegistry defines the set of Privileges
known to the repository.
| Field Summary | |
|---|---|
static int |
ADD_CHILD_NODES
|
static int |
ALL
|
static int |
MODIFY_AC
|
static int |
MODIFY_PROPERTIES
|
static int |
NO_PRIVILEGE
|
static int |
READ
|
static int |
READ_AC
|
static int |
REMOVE_CHILD_NODES
|
static int |
REMOVE_NODE
|
static int |
WRITE
|
| Constructor Summary | |
|---|---|
PrivilegeRegistry(NameResolver resolver)
Create a new PrivilegeRegistry instance. |
|
| Method Summary | |
|---|---|
static int |
getBits(Privilege[] privileges)
|
Privilege |
getPrivilege(java.lang.String privilegeName)
Returns the privilege with the specified privilegeName. |
Privilege[] |
getPrivileges(int bits)
Returns an array of registered Privileges. |
Privilege[] |
getRegisteredPrivileges()
Returns all registered privileges. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int NO_PRIVILEGE
public static final int READ
public static final int MODIFY_PROPERTIES
public static final int ADD_CHILD_NODES
public static final int REMOVE_CHILD_NODES
public static final int REMOVE_NODE
public static final int READ_AC
public static final int MODIFY_AC
public static final int WRITE
public static final int ALL
| Constructor Detail |
|---|
public PrivilegeRegistry(NameResolver resolver)
PrivilegeRegistry instance.
resolver - NameResolver used to calculate the JCR name of the
privileges.| Method Detail |
|---|
public Privilege[] getRegisteredPrivileges()
public Privilege getPrivilege(java.lang.String privilegeName)
throws AccessControlException,
javax.jcr.RepositoryException
privilegeName.
privilegeName -
privilegeName.
AccessControlException - If no privilege with the given name exists.
javax.jcr.RepositoryException - If another error occurs.public Privilege[] getPrivileges(int bits)
Privileges. If the specified
bits represent a registered privilege the returned array
contains a single element. Otherwise the returned array contains the
individual registered privileges that are combined in the givent
bits. If bits is 0 or
does not match to any registered privilege an empty array will be returned.
bits -
Privileges that are presented by the given it
or an empty array if bits is lower than READ or
cannot be resolved to registered Privileges.
public static int getBits(Privilege[] privileges)
throws AccessControlException
privileges -
AccessControlException - If the specified array is null
or if it contains an unregistered privilege.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||