|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectServiceMBeanSupport
org.jboss.portal.jems.as.system.AbstractJBossService
org.jboss.portal.identity.service.IdentityModuleService
org.jboss.portal.identity.service.RoleModuleService
org.jboss.portal.identity.db.HibernateRoleModuleImpl
public class HibernateRoleModuleImpl
Field Summary | |
---|---|
protected SessionFactory |
sessionFactory
. |
protected java.lang.String |
sessionFactoryJNDIName
. |
Fields inherited from class org.jboss.portal.identity.service.IdentityModuleService |
---|
moduleType |
Constructor Summary | |
---|---|
HibernateRoleModuleImpl()
|
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)
|
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 Session |
getCurrentSession()
Can be subclasses to provide testing in a non JTA environement. |
java.util.Set |
getRoles(User user)
|
int |
getRolesCount()
Returns the number of roles. |
java.lang.String |
getSessionFactoryJNDIName()
|
void |
removeRole(java.lang.Object id)
Remove a role. |
void |
setRoles(User user,
java.util.Set roles)
|
void |
setSessionFactoryJNDIName(java.lang.String sessionFactoryJNDIName)
|
protected void |
startService()
|
protected void |
stopService()
|
Methods inherited from class org.jboss.portal.identity.service.IdentityModuleService |
---|
getConnectionJNDIName, getIdentityConfiguration, getIdentityContext, getIdentityEventBroadcaster, getInitOptions, getJNDIName, getModuleType, setConnectionJNDIName, setIdentityContext, setInitOptions, setJNDIName, setModuleType |
Methods inherited from class org.jboss.portal.jems.as.system.AbstractJBossService |
---|
create, destroy, getState, getStateString, start, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected SessionFactory sessionFactory
protected java.lang.String sessionFactoryJNDIName
Constructor Detail |
---|
public HibernateRoleModuleImpl()
Method Detail |
---|
protected void startService() throws java.lang.Exception
startService
in class IdentityModuleService
java.lang.Exception
protected void stopService() throws java.lang.Exception
stopService
in class IdentityModuleService
java.lang.Exception
public java.lang.String getSessionFactoryJNDIName()
public void setSessionFactoryJNDIName(java.lang.String sessionFactoryJNDIName)
public Role findRoleByName(java.lang.String name) throws IdentityException
RoleModule
name
- the role name
IdentityException
public java.util.Set findRolesByNames(java.lang.String[] names) throws IdentityException
RoleModule
names
- the role names
IdentityException
public Role findRoleById(java.lang.String id) throws java.lang.IllegalArgumentException, IdentityException
RoleModule
id
- the role id
java.lang.IllegalArgumentException
IdentityException
public Role findRoleById(java.lang.Object id) throws IdentityException
RoleModule
id
- the role id
IdentityException
public Role createRole(java.lang.String name, java.lang.String displayName) throws IdentityException
RoleModule
name
- the role namedisplayName
- the role display name
IdentityException
public void removeRole(java.lang.Object id) throws IdentityException
RoleModule
id
- the role id
IdentityException
public int getRolesCount() throws IdentityException
RoleModule
IdentityException
public java.util.Set findRoles() throws IdentityException
RoleModule
IdentityException
public java.util.Set findRoleMembers(java.lang.String roleName, int offset, int limit, java.lang.String userNameFilter) throws IdentityException
IdentityException
public void setRoles(User user, java.util.Set roles) throws IdentityException
IdentityException
public java.util.Set getRoles(User user) throws IdentityException
IdentityException
protected Session getCurrentSession()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |