|
Holger's Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface UserLoginStore
defines the ability to manage a system that allows Users to log in/out
JUserLoginPanel| Method Summary | |
|---|---|
void |
addLoginListener(LoginListener listener)
|
User[] |
getActiveUsers()
returns a generated array of currently active users (never null). |
User |
getCurrentUser()
returns the current user (that is also among the active users) |
LoginListener[] |
getLoginListeners()
|
User |
getUserForName(String name)
returns the User associated with the given name or null if no such user exists |
Iterable<String> |
getUserNames()
returns a list of valid user names (never null) |
void |
loginCanceled(String location)
allows to notify the listeners of a canceled login |
User |
loginUser(String name,
char[] password,
String fromLocation)
returns the User that corresponds to the credentials provided; listeners are notified |
void |
loginUser(User user,
String fromLocation)
allows to login a user via API directly |
boolean |
logoutUser(User user)
logs the given user out of this store and notifies the listeners |
void |
removeLoginListener(LoginListener listener)
|
| Method Detail |
|---|
void addLoginListener(LoginListener listener)
void removeLoginListener(LoginListener listener)
LoginListener[] getLoginListeners()
User getCurrentUser()
User[] getActiveUsers()
throws DatabaseException
DatabaseException
Iterable<String> getUserNames()
throws DatabaseException
DatabaseException
User getUserForName(String name)
throws DatabaseException
DatabaseException
User loginUser(String name,
char[] password,
String fromLocation)
throws FailedLoginException,
DatabaseException
FailedLoginException - if the given credentials don't match any valid active user
or if the user is already logged in
DatabaseException - if there was a problem accessing the users in the database
void loginUser(User user,
String fromLocation)
throws FailedLoginException,
DatabaseException
FailedLoginException - if the given user is not a valid user for this store
or if the user is already logged in
DatabaseException - if there was a problem updating the active users in the databasevoid loginCanceled(String location)
boolean logoutUser(User user)
throws DatabaseException
DatabaseException
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||