|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.turbine.services.BaseInitable org.apache.turbine.services.BaseService org.apache.turbine.services.TurbineBaseService org.apache.jetspeed.services.security.turbine.TurbineRoleManagement
Default Jetspeed-Turbine Role Management implementation
Field Summary | |
protected static java.lang.String |
CACHING_ENABLE
|
protected boolean |
cachingEnable
|
protected static java.lang.String |
CASCADE_DELETE
|
protected boolean |
cascadeDelete
|
protected static boolean |
DEFAULT_CASCADE_DELETE
|
protected JetspeedRunDataService |
runDataService
|
Fields inherited from class org.apache.turbine.services.BaseService |
configuration, name, properties, serviceBroker |
Fields inherited from class org.apache.turbine.services.BaseInitable |
initableBroker, isInitialized |
Fields inherited from interface org.apache.jetspeed.services.security.RoleManagement |
DEFAULT_ROLE_NAME, SERVICE_NAME |
Constructor Summary | |
TurbineRoleManagement()
|
Method Summary | |
protected void |
addDefaultRolePSML(Role role)
|
void |
addRole(Role role)
Adds a Role into permanent storage. |
Role |
getRole(java.lang.String rolename)
Retrieves a single Role for a given rolename principal. |
java.util.Iterator |
getRoles()
Retrieves all Role s. |
java.util.Iterator |
getRoles(java.lang.String username)
Retrieves all Role s for a given username principal. |
protected JetspeedRunData |
getRunData()
|
void |
grantRole(java.lang.String username,
java.lang.String rolename)
Grants a role to a user. |
void |
grantRole(java.lang.String username,
java.lang.String rolename,
java.lang.String groupname)
|
boolean |
hasRole(java.lang.String username,
java.lang.String rolename)
Checks for the relationship of user has a role. |
boolean |
hasRole(java.lang.String username,
java.lang.String rolename,
java.lang.String groupname)
|
void |
init(javax.servlet.ServletConfig conf)
This is the early initialization method called by the Turbine Service framework |
void |
removeRole(java.lang.String rolename)
Removes a Role from the permanent store. |
void |
revokeRole(java.lang.String username,
java.lang.String rolename)
Revokes a role from a user. |
void |
revokeRole(java.lang.String username,
java.lang.String rolename,
java.lang.String groupname)
|
protected boolean |
roleExists(java.lang.String roleName)
Check whether a specified role exists. |
void |
saveRole(Role role)
Saves a Role into permanent storage. |
Methods inherited from class org.apache.turbine.services.TurbineBaseService |
init, init, init, shutdown |
Methods inherited from class org.apache.turbine.services.BaseService |
getConfiguration, getName, getProperties, getServiceBroker, setName, setServiceBroker |
Methods inherited from class org.apache.turbine.services.BaseInitable |
getInit, getInitableBroker, setInit, setInitableBroker |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.turbine.services.Service |
getConfiguration, getName, getProperties, setName, setServiceBroker |
Methods inherited from interface org.apache.turbine.services.Initable |
getInit, init, init, setInitableBroker, shutdown |
Field Detail |
protected JetspeedRunDataService runDataService
protected static final java.lang.String CASCADE_DELETE
protected static final boolean DEFAULT_CASCADE_DELETE
protected boolean cascadeDelete
protected static final java.lang.String CACHING_ENABLE
protected boolean cachingEnable
Constructor Detail |
public TurbineRoleManagement()
Method Detail |
public 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.
getRoles
in interface RoleManagement
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 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.
getRoles
in interface RoleManagement
RoleException
- when the security provider has a general failure.
InsufficientPrivilegeException
- when the requestor is denied due to insufficient privilege
JetspeedSecurityException
public void addRole(Role role) throws JetspeedSecurityException
Role
into permanent storage.
The security service may optionally check the current user context
to determine if the requestor has permission to perform this action.
addRole
in interface RoleManagement
RoleException
- when the security provider has a general failure.
InsufficientPrivilegeException
- when the requestor is denied due to insufficient privilege
JetspeedSecurityException
protected void addDefaultRolePSML(Role role) throws RoleException
RoleException
public void saveRole(Role role) throws JetspeedSecurityException
Role
into permanent storage.
The security service can throw a NotUniqueEntityException
when the public
credentials fail to meet the security provider-specific unique constraints.
The security service may optionally check the current user context
to determine if the requestor has permission to perform this action.
saveRole
in interface RoleManagement
RoleException
- when the security provider has a general failure.
InsufficientPrivilegeException
- when the requestor is denied due to insufficient privilege
JetspeedSecurityException
public 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.
removeRole
in interface RoleManagement
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 void grantRole(java.lang.String username, java.lang.String rolename) throws JetspeedSecurityException
grantRole
in interface RoleManagement
RoleException
- when the security provider has a general failure retrieving users.
InsufficientPrivilegeException
- when the requestor is denied due to insufficient privilege
JetspeedSecurityException
public void grantRole(java.lang.String username, java.lang.String rolename, java.lang.String groupname) throws JetspeedSecurityException
grantRole
in interface RoleManagement
JetspeedSecurityException
public void revokeRole(java.lang.String username, java.lang.String rolename) throws JetspeedSecurityException
revokeRole
in interface RoleManagement
RoleException
- when the security provider has a general failure retrieving users.
InsufficientPrivilegeException
- when the requestor is denied due to insufficient privilege
JetspeedSecurityException
public void revokeRole(java.lang.String username, java.lang.String rolename, java.lang.String groupname) throws JetspeedSecurityException
revokeRole
in interface RoleManagement
JetspeedSecurityException
public boolean hasRole(java.lang.String username, java.lang.String rolename) throws JetspeedSecurityException
hasRole
in interface RoleManagement
RoleException
- when the security provider has a general failure retrieving users.
InsufficientPrivilegeException
- when the requestor is denied due to insufficient privilege
JetspeedSecurityException
public boolean hasRole(java.lang.String username, java.lang.String rolename, java.lang.String groupname) throws JetspeedSecurityException
hasRole
in interface RoleManagement
JetspeedSecurityException
public 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.
getRole
in interface RoleManagement
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
protected JetspeedRunData getRunData()
protected boolean roleExists(java.lang.String roleName) throws RoleException
roleName
- the name of the role to check for existence.
RoleException
- if there was a general db access errorpublic void init(javax.servlet.ServletConfig conf) throws org.apache.turbine.services.InitializationException
Service
framework
conf
- The ServletConfig
throws
- a InitializationException
if the service
fails to initialize
org.apache.turbine.services.InitializationException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |