|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jetspeed.services.security.JetspeedRoleManagement
The RoleManagement
interface describes contract between
the portal and security provider required for Jetspeed Role Management.
This interface enables an application to be independent of the underlying
role management technology.
Field Summary | |
java.lang.String |
SERVICE_NAME
|
Constructor Summary | |
JetspeedRoleManagement()
|
Method Summary | |
static void |
addRole(Role role)
Adds a Role into permanent storage. |
static Role |
getRole(java.lang.String rolename)
Retrieves a single Role for a given rolename principal. |
static java.util.Iterator |
getRoles()
Retrieves all Role s. |
static java.util.Iterator |
getRoles(java.lang.String username)
Retrieves all Role s for a given username principal. |
protected static RoleManagement |
getService()
|
static void |
grantRole(java.lang.String username,
java.lang.String rolename)
Grants a role to a user. |
static void |
grantRole(java.lang.String username,
java.lang.String rolename,
java.lang.String groupname)
Grants a role to a user for a given group. |
static boolean |
hasRole(java.lang.String username,
java.lang.String rolename)
Checks for the relationship of user has a role. |
static boolean |
hasRole(java.lang.String username,
java.lang.String rolename,
java.lang.String groupname)
|
static void |
removeRole(java.lang.String rolename)
Removes a Role from the permanent store. |
static void |
revokeRole(java.lang.String username,
java.lang.String rolename)
Revokes a role from a user. |
static void |
revokeRole(java.lang.String username,
java.lang.String rolename,
java.lang.String groupname)
Revokes a role from a user for a specific group. |
static void |
saveRole(Role role)
Save a Role into permanent storage. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public java.lang.String SERVICE_NAME
Constructor Detail |
public JetspeedRoleManagement()
Method Detail |
protected static RoleManagement getService()
public static java.util.Iterator getRoles(java.lang.String username) throws JetspeedSecurityException
Role
s for a given username principal.
The security service may optionally check the current user context
to determine if the requestor has permission to perform this action.
username
- a user principal identity to be retrieved.
RoleException
- when the security provider has a general failure.
InsufficientPrivilegeException
- when the requestor is denied due to insufficient privilege
JetspeedSecurityException
public static java.util.Iterator getRoles() throws JetspeedSecurityException
Role
s.
The security service may optionally check the current user context
to determine if the requestor has permission to perform this action.
RoleException
- when the security provider has a general failure.
InsufficientPrivilegeException
- when the requestor is denied due to insufficient privilege
JetspeedSecurityException
public static void addRole(Role role) throws JetspeedSecurityException
Role
into permanent storage.
RoleException
- when the security provider has a general failure.
NotUniqueEntityException
- when the public credentials fail to meet
the security provider-specific unique constraints.
InsufficientPrivilegeException
- when the requestor is denied due to insufficient privilege
JetspeedSecurityException
public static void saveRole(Role role) throws JetspeedSecurityException
Role
into permanent storage.
RoleException
- when the security provider has a general failure.
InsufficientPrivilegeException
- when the requestor is denied due to insufficient privilege
JetspeedSecurityException
public static void removeRole(java.lang.String rolename) throws JetspeedSecurityException
Role
from the permanent store.
The security service may optionally check the current user context
to determine if the requestor has permission to perform this action.
rolename
- the principal identity of the role to be retrieved.
RoleException
- when the security provider has a general failure.
InsufficientPrivilegeException
- when the requestor is denied due to insufficient privilege
JetspeedSecurityException
public static void grantRole(java.lang.String username, java.lang.String rolename) throws JetspeedSecurityException
RoleException
- when the security provider has a general failure retrieving users.
InsufficientPrivilegeException
- when the requestor is denied due to insufficient privilege
JetspeedSecurityException
public static void grantRole(java.lang.String username, java.lang.String rolename, java.lang.String groupname) throws JetspeedSecurityException
RoleException
- when the security provider has a general failure retrieving users.
InsufficientPrivilegeException
- when the requestor is denied due to insufficient privilege
JetspeedSecurityException
public static void revokeRole(java.lang.String username, java.lang.String rolename) throws JetspeedSecurityException
RoleException
- when the security provider has a general failure retrieving users.
InsufficientPrivilegeException
- when the requestor is denied due to insufficient privilege
JetspeedSecurityException
public static void revokeRole(java.lang.String username, java.lang.String rolename, java.lang.String groupname) throws JetspeedSecurityException
RoleException
- when the security provider has a general failure retrieving users.
InsufficientPrivilegeException
- when the requestor is denied due to insufficient privilege
JetspeedSecurityException
public static boolean hasRole(java.lang.String username, java.lang.String rolename) throws JetspeedSecurityException
RoleException
- when the security provider has a general failure retrieving users.
InsufficientPrivilegeException
- when the requestor is denied due to insufficient privilege
JetspeedSecurityException
public static boolean hasRole(java.lang.String username, java.lang.String rolename, java.lang.String groupname) throws JetspeedSecurityException
JetspeedSecurityException
public static Role getRole(java.lang.String rolename) throws JetspeedSecurityException
Role
for a given rolename principal.
The security service may optionally check the current user context
to determine if the requestor has permission to perform this action.
rolename
- a role principal identity to be retrieved.
RoleException
- when the security provider has a general failure.
InsufficientPrivilegeException
- when the requestor is denied due to insufficient privilege
JetspeedSecurityException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |