|
|||||||||
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.UserModuleService
org.jboss.portal.identity.db.HibernateUserModuleImpl
public class HibernateUserModuleImpl
Field Summary | |
---|---|
protected SessionFactory |
sessionFactory
. |
protected java.lang.String |
sessionFactoryJNDIName
. |
Fields inherited from class org.jboss.portal.identity.service.IdentityModuleService |
---|
moduleType |
Constructor Summary | |
---|---|
HibernateUserModuleImpl()
|
Method Summary | |
---|---|
User |
createUser(java.lang.String userName,
java.lang.String password)
Creates a new user with the specified name. |
User |
findUserById(java.lang.Object id)
Retrieve a user by its id. |
User |
findUserById(java.lang.String id)
Retrieve a user by its id. |
User |
findUserByUserName(java.lang.String userName)
Retrieve a user by its name. |
java.util.Set |
findUsers(int offset,
int limit)
Get a range of users. |
java.util.Set |
findUsersFilteredByUserName(java.lang.String filter,
int offset,
int limit)
Get a range of users. |
protected Session |
getCurrentSession()
Can be subclasses to provide testing in a non JTA environement. |
java.lang.String |
getSessionFactoryJNDIName()
|
int |
getUserCount()
Returns the number of users. |
void |
removeUser(java.lang.Object id)
Remove a user. |
void |
setSessionFactoryJNDIName(java.lang.String sessionFactoryJNDIName)
|
protected void |
startService()
|
protected void |
stopService()
|
Methods inherited from class org.jboss.portal.identity.service.UserModuleService |
---|
fireUserCreatedEvent, fireUserDestroyedEvent |
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 HibernateUserModuleImpl()
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 User findUserByUserName(java.lang.String userName) throws IdentityException
UserModule
userName
- the user name
IdentityException
public User findUserById(java.lang.String id) throws java.lang.IllegalArgumentException, IdentityException, NoSuchUserException
UserModule
id
- the user id
java.lang.IllegalArgumentException
- if the id is null or not in the good format
IdentityException
NoSuchUserException
public User findUserById(java.lang.Object id) throws java.lang.IllegalArgumentException, IdentityException, NoSuchUserException
UserModule
id
- the user id
java.lang.IllegalArgumentException
- if the id is null
IdentityException
NoSuchUserException
public User createUser(java.lang.String userName, java.lang.String password) throws IdentityException
UserModule
IdentityException
public void removeUser(java.lang.Object id) throws IdentityException
UserModule
id
- the user id
IdentityException
public java.util.Set findUsers(int offset, int limit) throws IdentityException
UserModule
offset
- the offset of the first result to retrievelimit
- the maximum number of users to retrieve
IdentityException
public java.util.Set findUsersFilteredByUserName(java.lang.String filter, int offset, int limit) throws IdentityException
UserModule
filter
- a string filter applied to the user name.offset
- the offset of the frist result to retrievelimit
- the maximum number of users to retrieve
IdentityException
public int getUserCount() throws IdentityException
UserModule
IdentityException
protected Session getCurrentSession() throws java.lang.IllegalStateException
java.lang.IllegalStateException
- if no session factory is present
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |