|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.mx.util.JBossNotificationBroadcasterSupport
org.jboss.system.ServiceMBeanSupport
org.jboss.portal.common.system.AbstractJBossService
org.jboss.portal.identity.db.UserModuleImpl
| 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 | |
UserModuleImpl()
|
|
| Method Summary | |
User |
createUser(java.lang.String userName,
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. |
java.lang.String |
getJNDIName()
|
org.hibernate.SessionFactory |
getSessionFactory()
|
java.lang.String |
getSessionFactoryJNDIName()
|
int |
getUserCount()
Returns the number of users. |
void |
removeUser(java.lang.Object id)
Remove a user. |
void |
setJNDIName(java.lang.String jndiName)
|
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 org.hibernate.SessionFactory sessionFactory
protected java.lang.String sessionFactoryJNDIName
protected java.lang.String jndiName
protected JNDI.Binding jndiBinding
| Constructor Detail |
public UserModuleImpl()
| Method Detail |
protected void startService()
throws java.lang.Exception
java.lang.Exception
protected void stopService()
throws java.lang.Exception
java.lang.Exceptionpublic org.hibernate.SessionFactory getSessionFactory()
public java.lang.String getSessionFactoryJNDIName()
public void setSessionFactoryJNDIName(java.lang.String sessionFactoryJNDIName)
public java.lang.String getJNDIName()
public void setJNDIName(java.lang.String jndiName)
public User findUserByUserName(java.lang.String userName) throws IdentityException
UserModule
findUserByUserName in interface UserModuleuserName - the user name
IdentityExceptionpublic User findUserById(java.lang.String id) throws java.lang.IllegalArgumentException, IdentityException, NoSuchUserException
UserModule
findUserById in interface UserModuleid - the user id
java.lang.IllegalArgumentException - if the id is null or not in the good format
IdentityException
NoSuchUserExceptionpublic User findUserById(java.lang.Object id) throws java.lang.IllegalArgumentException, IdentityException, NoSuchUserException
UserModule
findUserById in interface UserModuleid - the user id
java.lang.IllegalArgumentException - if the id is null
IdentityException
NoSuchUserExceptionpublic User createUser(java.lang.String userName, java.lang.String password, java.lang.String realEmail) throws IdentityException
UserModule
createUser in interface UserModuleuserName -
IdentityException
public void removeUser(java.lang.Object id)
throws IdentityException
UserModule
removeUser in interface UserModuleid - the user id
IdentityException
public java.util.Set findUsers(int offset,
int limit)
throws IdentityException
UserModule
findUsers in interface UserModuleoffset - 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
findUsersFilteredByUserName in interface UserModulefilter - 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
getUserCount in interface UserModuleIdentityException
protected org.hibernate.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 | |||||||||