|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exolab.jms.service.Service
org.exolab.jms.authentication.UserManager
public class UserManager
The user manager is responsible for creating and managing users.
Constructor Summary | |
---|---|
UserManager(org.exolab.jms.config.Configuration config,
DatabaseService database)
Construct a new UserManager . |
Method Summary | |
---|---|
protected void |
addToUserCache(User user)
Add the specified entry to the user cache. |
boolean |
createUser(User user)
Create a new user. |
boolean |
deleteUser(User user)
Delete an user. |
protected void |
doStart()
Start the service. |
protected void |
doStop()
Stop the service. |
User |
getUser(User user)
Return a user. |
protected void |
init()
Initialise user manager. |
protected void |
registerConfiguredUsers()
Registers users specified in the configuration. |
protected void |
removeFromUserCache(User user)
Remove the specified user from the cache. |
boolean |
updateUser(User user)
Update an user. |
java.util.Iterator |
userNames()
Return a list of user names currently supported by the user manager. |
boolean |
validateUser(java.lang.String username,
java.lang.String password)
Determines if a user's name and password are valid. |
Methods inherited from class org.exolab.jms.service.Service |
---|
getName, isStarted, restart, start, stop, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public UserManager(org.exolab.jms.config.Configuration config, DatabaseService database)
UserManager
.
config
- the configurationdatabase
- the database serviceMethod Detail |
---|
public boolean createUser(User user)
user
- the user to create
true
if the user is created otherwise
false
public boolean updateUser(User user)
user
- the user to update
true
if password is updated otherwise
false
public boolean deleteUser(User user)
user
- the userobject containing the username
true
if the is removed otherwise false
public User getUser(User user)
user
- the user containing the username
null
if none exists.public java.util.Iterator userNames()
public boolean validateUser(java.lang.String username, java.lang.String password)
username
- the user's namepassword
- the user's password
true
if the name and password are valid, otherwise
false
protected void doStart() throws ServiceException
doStart
in class Service
ServiceException
- if the service fails to startprotected void doStop()
doStop
in class Service
protected void init() throws ServiceException
ServiceException
- if the user manager cannot be initialisedprotected void addToUserCache(User user)
user
- the user to addprotected void removeFromUserCache(User user)
user
- the user to removeprotected void registerConfiguredUsers()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |