|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jackrabbit.core.security.authorization.PrivilegeRegistry
public final class PrivilegeRegistry
The PrivilegeRegistry
defines the set of Privilege
s
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(String privilegeName)
Returns the privilege with the specified privilegeName . |
Privilege[] |
getPrivileges(int bits)
Returns an array of registered Privilege s. |
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(String privilegeName) throws AccessControlException, RepositoryException
privilegeName
.
privilegeName
-
privilegeName
.
AccessControlException
- If no privilege with the given name exists.
RepositoryException
- If another error occurs.public Privilege[] getPrivileges(int bits)
Privilege
s. 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
-
Privilege
s that are presented by the given it
or an empty array if bits
is lower than READ
or
cannot be resolved to registered Privilege
s.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 |