|
||||||||||
| 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 |
NO_PRIVILEGE
No privileges |
static String |
REP_PRIVILEGE_MANAGEMENT
Jackrabbit specific privilege for privilege management. |
static org.apache.jackrabbit.spi.Name |
REP_PRIVILEGE_MANAGEMENT_NAME
|
static String |
REP_WRITE
Jackrabbit specific write privilege that combines Privilege.JCR_WRITE
and Privilege.JCR_NODE_TYPE_MANAGEMENT. |
static org.apache.jackrabbit.spi.Name |
REP_WRITE_NAME
|
| Constructor Summary | |
|---|---|
PrivilegeRegistry(org.apache.jackrabbit.spi.commons.conversion.NameResolver resolver)
Deprecated. Use PrivilegeManager instead. |
|
PrivilegeRegistry(NamespaceRegistry namespaceRegistry,
FileSystem fs)
Create a new PrivilegeRegistry instance. |
|
| Method Summary | |
|---|---|
static int |
calculatePermissions(int privs,
int parentPrivs,
boolean isAllow,
boolean protectsPolicy)
Deprecated. Use calculatePermissions(PrivilegeBits, PrivilegeBits, boolean, boolean) instead. |
static int |
calculatePermissions(PrivilegeBits privs,
PrivilegeBits parentPrivs,
boolean isAllow,
boolean protectsPolicy)
Build the permissions granted by evaluating the given privileges. |
void |
externalRegisteredPrivileges(Collection<org.apache.jackrabbit.spi.PrivilegeDefinition> definitions)
Called when one or more privilege definitions have been externally registered. |
static int |
getBits(Privilege[] privileges)
Deprecated. Use PrivilegeManagerImpl.getBits(javax.jcr.security.Privilege...) instead. |
Privilege |
getPrivilege(String privilegeName)
Deprecated. Use PrivilegeManager.getPrivilege(String) instead. |
Privilege[] |
getPrivileges(int bits)
Deprecated. Use PrivilegeManagerImpl.getPrivileges(PrivilegeBits) instead. |
Privilege[] |
getRegisteredPrivileges()
Deprecated. Use PrivilegeManager.getRegisteredPrivileges() instead. |
void |
setEventChannel(PrivilegeEventChannel eventChannel)
Set a clustering event channel to inform about changes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String REP_WRITE
Privilege.JCR_WRITE
and Privilege.JCR_NODE_TYPE_MANAGEMENT.
public static final org.apache.jackrabbit.spi.Name REP_WRITE_NAME
public static final String REP_PRIVILEGE_MANAGEMENT
public static final org.apache.jackrabbit.spi.Name REP_PRIVILEGE_MANAGEMENT_NAME
public static final int NO_PRIVILEGE
| Constructor Detail |
|---|
public PrivilegeRegistry(NamespaceRegistry namespaceRegistry,
FileSystem fs)
throws RepositoryException
PrivilegeRegistry instance.
namespaceRegistry - fs -
RepositoryExceptionpublic PrivilegeRegistry(org.apache.jackrabbit.spi.commons.conversion.NameResolver resolver)
PrivilegeManager instead.
PrivilegeRegistry instance defining only
built-in privileges.
resolver - JackrabbitWorkspace.getPrivilegeManager()| Method Detail |
|---|
public void externalRegisteredPrivileges(Collection<org.apache.jackrabbit.spi.PrivilegeDefinition> definitions)
throws RepositoryException
PrivilegeEventListener
externalRegisteredPrivileges in interface PrivilegeEventListenerdefinitions - privilege definitions
RepositoryException - if an error occursPrivilegeEventListener.externalRegisteredPrivileges(java.util.Collection)public void setEventChannel(PrivilegeEventChannel eventChannel)
eventChannel - event channelpublic Privilege[] getRegisteredPrivileges()
PrivilegeManager.getRegisteredPrivileges() instead.
UnsupportedOperationException.
public Privilege getPrivilege(String privilegeName)
throws AccessControlException,
RepositoryException
PrivilegeManager.getPrivilege(String) instead.
PrivilegeManager from the specified resolver
and calls PrivilegeManagerImpl.getRegisteredPrivileges().
privilegeName - Name of the privilege.
privilegeName.
AccessControlException - If no privilege with the given name exists.
RepositoryException - If another error occurs.public Privilege[] getPrivileges(int bits)
PrivilegeManagerImpl.getPrivileges(PrivilegeBits) instead.
PrivilegeManager from the specified resolver
and calls PrivilegeManagerImpl.getPrivileges(PrivilegeBits).
bits - Privilege bits as obtained from getBits(Privilege[]).
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.getBits(Privilege[])
public static int getBits(Privilege[] privileges)
throws AccessControlException
PrivilegeManagerImpl.getBits(javax.jcr.security.Privilege...) instead.
UnsupportedOperationException if the workaround fails.
privileges - An array of privileges.
AccessControlException - If the specified array is null
or if it contains an unregistered privilege.getPrivileges(int)
public static int calculatePermissions(PrivilegeBits privs,
PrivilegeBits parentPrivs,
boolean isAllow,
boolean protectsPolicy)
privs - The privileges granted on the Node itself (for properties
the ACL of the direct ancestor).parentPrivs - The privileges granted on the parent of the Node. Not
relevant for properties since it only is used to determine permissions
on a Node (add_child_nodes, remove_child_nodes).isAllow - true if the privileges are granted; false
otherwise.protectsPolicy - If true the affected item itself
defines access control related information.
public static int calculatePermissions(int privs,
int parentPrivs,
boolean isAllow,
boolean protectsPolicy)
calculatePermissions(PrivilegeBits, PrivilegeBits, boolean, boolean) instead.
privs - The privileges granted on the Node itself (for properties
the ACL of the direct ancestor).parentPrivs - The privileges granted on the parent of the Node. Not
relevant for properties since it only is used to determine permissions
on a Node (add_child_nodes, remove_child_nodes).isAllow - true if the privileges are granted; false
otherwise.protectsPolicy - If true the affected item itself
defines access control related information.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||