|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.mx.util.JBossNotificationBroadcasterSupport org.jboss.system.ServiceMBeanSupport org.jboss.portal.common.system.AbstractJBossService org.jboss.portal.identity.db.RoleModuleImpl
Field Summary | |
protected JNDI.Binding |
jndiBinding
. |
protected java.lang.String |
jndiName
. |
protected org.hibernate.SessionFactory |
sessionFactory
. |
protected java.lang.String |
sessionFactoryJNDIName
. |
Fields inherited from class org.jboss.system.ServiceMBeanSupport |
server, SERVICE_CONTROLLER_SIG, serviceName |
Fields inherited from interface org.jboss.system.ServiceMBean |
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED |
Constructor Summary | |
RoleModuleImpl()
|
Method Summary | |
Role |
createRole(java.lang.String name,
java.lang.String displayName)
Create a new role with the specified name. |
Role |
findRoleById(java.lang.Object id)
Retrieves a role by its id. |
Role |
findRoleById(java.lang.String id)
Retrieves a role by its id. |
Role |
findRoleByName(java.lang.String name)
Retrieves a role by its name |
java.util.Set |
findRoleMembers(java.lang.String roleName,
int offset,
int limit,
java.lang.String userNameFilter)
Returns role members based on rolename |
java.util.Set |
findRoles()
Get all the roles |
java.util.Set |
findRolesByNames(java.lang.String[] names)
Retrieve a collection of role from the role names. |
protected org.hibernate.Session |
getCurrentSession()
Can be subclasses to provide testing in a non JTA environement. |
java.lang.String |
getJNDIName()
|
java.util.Set |
getRoles(User user)
Return the set of role objects that a given user has. |
int |
getRolesCount()
Returns the number of roles. |
org.hibernate.SessionFactory |
getSessionFactory()
|
java.lang.String |
getSessionFactoryJNDIName()
|
void |
removeRole(java.lang.Object id)
Remove a role. |
void |
setJNDIName(java.lang.String jndiName)
|
void |
setRoles(User user,
java.util.Set roles)
Assign a set of role objects to a given user. |
void |
setSessionFactoryJNDIName(java.lang.String sessionFactoryJNDIName)
|
protected void |
startService()
|
protected void |
stopService()
|
Methods inherited from class org.jboss.portal.common.system.AbstractJBossService |
create, destroy, getState, getStateString, start, stop |
Methods inherited from class org.jboss.system.ServiceMBeanSupport |
createService, destroyService, getDeploymentInfo, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister |
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport |
addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, removeNotificationListener, removeNotificationListener, sendNotification |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.String sessionFactoryJNDIName
protected org.hibernate.SessionFactory sessionFactory
protected java.lang.String jndiName
protected JNDI.Binding jndiBinding
Constructor Detail |
public RoleModuleImpl()
Method Detail |
public java.lang.String getSessionFactoryJNDIName()
public void setSessionFactoryJNDIName(java.lang.String sessionFactoryJNDIName)
public org.hibernate.SessionFactory getSessionFactory()
public java.lang.String getJNDIName()
public void setJNDIName(java.lang.String jndiName)
protected void startService() throws java.lang.Exception
java.lang.Exception
protected void stopService() throws java.lang.Exception
java.lang.Exception
public Role findRoleByName(java.lang.String name) throws IdentityException
RoleModule
findRoleByName
in interface RoleModule
name
- the role name
IdentityException
public java.util.Set findRolesByNames(java.lang.String[] names) throws IdentityException
RoleModule
findRolesByNames
in interface RoleModule
names
- the role names
IdentityException
public Role findRoleById(java.lang.String id) throws java.lang.IllegalArgumentException, IdentityException
RoleModule
findRoleById
in interface RoleModule
id
- the role id
java.lang.IllegalArgumentException
IdentityException
public Role findRoleById(java.lang.Object id) throws IdentityException
RoleModule
findRoleById
in interface RoleModule
id
- the role id
IdentityException
public Role createRole(java.lang.String name, java.lang.String displayName) throws IdentityException
RoleModule
createRole
in interface RoleModule
name
- the role namedisplayName
- the role display name
IdentityException
public void removeRole(java.lang.Object id) throws IdentityException
RoleModule
removeRole
in interface RoleModule
id
- the role id
IdentityException
public int getRolesCount() throws IdentityException
RoleModule
getRolesCount
in interface RoleModule
IdentityException
public java.util.Set findRoles() throws IdentityException
RoleModule
findRoles
in interface RoleModule
IdentityException
public java.util.Set findRoleMembers(java.lang.String roleName, int offset, int limit, java.lang.String userNameFilter) throws IdentityException
RoleModule
findRoleMembers
in interface RoleModule
roleName
- offset
- limit
-
IdentityException
public void setRoles(User user, java.util.Set roles) throws IdentityException
RoleModule
setRoles
in interface RoleModule
user
- the userroles
- the user roles
IdentityException
public java.util.Set getRoles(User user) throws IdentityException
RoleModule
getRoles
in interface RoleModule
user
- the user
IdentityException
protected org.hibernate.Session getCurrentSession()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |