|
Holger's Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.antelmann.db.AbstractUserLoginStore
public abstract class AbstractUserLoginStore
a base for easily implementing a UserLoginStore. The only methods left to be implemented are:
getUserForName(String)getUserNames()
| Constructor Summary | |
|---|---|
AbstractUserLoginStore()
|
|
| Method Summary | |
|---|---|
void |
addLoginListener(LoginListener listener)
|
User[] |
getActiveUsers()
returns a generated array of currently active users (never null). |
User |
getBackDoorUser()
|
User |
getCurrentUser()
returns the current user (that is also among the active users) |
LoginListener[] |
getLoginListeners()
|
Date |
getLoginTime(User user)
returns the time when the given user has logged in; returns null if the user is not an active user. |
boolean |
isActiveUser(User user)
|
ArrayList<User> |
listUsers(Filter<? super User> filter)
|
static ArrayList<User> |
listUsers(UserLoginStore uls,
Filter<? super User> filter)
it may be more efficient to achieve this via an embedded DBClassStore if applicable |
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 |
static void |
logoutAll(UserLoginStore uls)
|
boolean |
logoutUser(User user)
listeners are only informed if the user was actually logged in prior to this call |
void |
removeLoginListener(LoginListener listener)
|
void |
setBackDoorUser(User backDoorUser)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.antelmann.db.UserLoginStore |
|---|
getUserForName, getUserNames |
| Constructor Detail |
|---|
public AbstractUserLoginStore()
| Method Detail |
|---|
public User getBackDoorUser()
public void setBackDoorUser(User backDoorUser)
public void addLoginListener(LoginListener listener)
addLoginListener in interface UserLoginStorepublic void removeLoginListener(LoginListener listener)
removeLoginListener in interface UserLoginStorepublic LoginListener[] getLoginListeners()
getLoginListeners in interface UserLoginStorepublic User getCurrentUser()
UserLoginStore
getCurrentUser in interface UserLoginStorepublic User[] getActiveUsers()
UserLoginStore
getActiveUsers in interface UserLoginStorepublic boolean isActiveUser(User user)
public Date getLoginTime(User user)
public void loginUser(User user,
String fromLocation)
throws FailedLoginException,
DatabaseException
UserLoginStore
loginUser in interface UserLoginStoreFailedLoginException - 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 database
public User loginUser(String name,
char[] password,
String fromLocation)
throws FailedLoginException,
DatabaseException
UserLoginStore
loginUser in interface UserLoginStoreFailedLoginException - 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 databasepublic boolean logoutUser(User user)
logoutUser in interface UserLoginStorepublic void loginCanceled(String location)
UserLoginStore
loginCanceled in interface UserLoginStore
public ArrayList<User> listUsers(Filter<? super User> filter)
throws DatabaseException
DatabaseException
public static ArrayList<User> listUsers(UserLoginStore uls,
Filter<? super User> filter)
throws DatabaseException
DatabaseException
public static void logoutAll(UserLoginStore uls)
throws DatabaseException
DatabaseException
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||