|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--org.exolab.jms.service.Service
|
+--org.exolab.jms.authentication.UserManager
The user manager is responsible for creating and managing users.
| Constructor Summary | |
UserManager(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(Configuration config,
DatabaseService database)
UserManager.config - the configurationdatabase - the database service| Method Detail |
public boolean createUser(User user)
user - the user to createtrue if the user is created otherwise
falsepublic boolean updateUser(User user)
user - the user to updatetrue if password is updated otherwise
falsepublic boolean deleteUser(User user)
user - the userobject containing the usernametrue if the is removed otherwise falsepublic User getUser(User user)
user - the user containing the usernamenull 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 passwordtrue if the name and password are valid, otherwise
false
protected void doStart()
throws ServiceException
doStart in class ServiceServiceException - if the service fails to startprotected void doStop()
doStop in class Serviceorg.exolab.jms.service.ServiceServiceException - if the service fails to stop
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: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||