|
||||||||||
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.core.modules.AbstractModule org.jboss.portal.core.impl.user.UserModuleImpl
Field Summary | |
protected HibernateProvider |
hibernateProvider
. |
protected org.hibernate.SessionFactory |
sessionFactory
. |
Fields inherited from class org.jboss.portal.core.modules.AbstractModule |
JNDIName |
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 | |
UserModuleImpl()
|
Method Summary | |
User |
createUser(java.lang.String name,
java.lang.String password,
java.lang.String realEmail)
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 org.hibernate.Session |
getCurrentSession()
Can be subclasses to provide testing in a non JTA environement. |
HibernateProvider |
getHibernateProvider()
|
PreferencesGroup |
getPreferencesGroup(User user)
Return the preferences group for the specified user. |
int |
getUserCount()
Returns the number of users. |
void |
removeUser(java.lang.Object id)
Remove a user. |
void |
setHibernateProvider(HibernateProvider hibernateProvider)
|
protected void |
startService()
|
void |
stopService()
|
Methods inherited from class org.jboss.portal.core.modules.AbstractModule |
getJNDIName, setJNDIName |
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 HibernateProvider hibernateProvider
protected org.hibernate.SessionFactory sessionFactory
Constructor Detail |
public UserModuleImpl()
Method Detail |
protected void startService() throws java.lang.Exception
startService
in class AbstractModule
java.lang.Exception
public void stopService() throws java.lang.Exception
stopService
in class AbstractModule
java.lang.Exception
public HibernateProvider getHibernateProvider()
public void setHibernateProvider(HibernateProvider hibernateProvider)
public User findUserByUserName(java.lang.String userName) throws ModuleException
UserModule
findUserByUserName
in interface UserModule
userName
- the user name
ModuleException
public User findUserById(java.lang.String id) throws java.lang.IllegalArgumentException, ModuleException, NoSuchUserException
UserModule
findUserById
in interface UserModule
id
- the user id
java.lang.IllegalArgumentException
- if the id is null or not in the good format
ModuleException
NoSuchUserException
public User findUserById(java.lang.Object id) throws java.lang.IllegalArgumentException, ModuleException, NoSuchUserException
UserModule
findUserById
in interface UserModule
id
- the user id
java.lang.IllegalArgumentException
- if the id is null
ModuleException
NoSuchUserException
public User createUser(java.lang.String name, java.lang.String password, java.lang.String realEmail) throws ModuleException
UserModule
createUser
in interface UserModule
name
- the user name
ModuleException
public void removeUser(java.lang.Object id) throws ModuleException
UserModule
removeUser
in interface UserModule
id
- the user id
ModuleException
public java.util.Set findUsers(int offset, int limit) throws ModuleException
UserModule
findUsers
in interface UserModule
offset
- the offset of the first result to retrievelimit
- the maximum number of users to retrieve
ModuleException
public java.util.Set findUsersFilteredByUserName(java.lang.String filter, int offset, int limit) throws ModuleException
UserModule
findUsersFilteredByUserName
in interface 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
ModuleException
public int getUserCount() throws ModuleException
UserModule
getUserCount
in interface UserModule
ModuleException
public PreferencesGroup getPreferencesGroup(User user)
UserModule
getPreferencesGroup
in interface UserModule
protected org.hibernate.Session getCurrentSession()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |