|
Holger's Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.antelmann.sql.JDBCRowStore<T>
com.antelmann.sql.UserImplStore<T>
public class UserImplStore<T extends UserImpl>
provides a user store implementation that implements UserLoginStore, so that the database can be queried based on that interface.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.antelmann.db.DBClassStore |
|---|
DBClassStore.DBMethod |
| Field Summary |
|---|
| Fields inherited from class com.antelmann.sql.JDBCRowStore |
|---|
database, ensureTransactionsOnFetch, helper, mapper |
| Constructor Summary | |
|---|---|
UserImplStore(Database<Connection> db,
UserImplMapper<T> mapper,
Class<T> userType)
|
|
| 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()
|
UserImplMapper<T> |
getMapper()
|
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)
|
AbstractUserLoginStore |
unwrap()
returns the embedded instance that this wrapper encloses |
| Methods inherited from class com.antelmann.sql.JDBCRowStore |
|---|
add, checkTransaction, containsID, deleteEntries, deleteEntry, fetch, fetchStubs, generateNewID, getColumnNames, getColumnsForTopic, getColumnSize, getDatabase, getDisplayColumn, getDisplayNameForColumn, getEntry, getEntryClass, getIDColumn, getMappingForTopic, getSQLTypeforColumn, getStub, getTableName, getTableQuery, insert, insertAsNew, isFastDelete, isIgnoreInvalidProperties, remove, setFastDelete, setIgnoreInvalidProperties, size, trimIdString, update |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UserImplStore(Database<Connection> db,
UserImplMapper<T> mapper,
Class<T> userType)
| Method Detail |
|---|
public UserImplMapper<T> getMapper()
getMapper in class JDBCRowStore<T extends UserImpl>public void addLoginListener(LoginListener listener)
addLoginListener in interface UserLoginStorepublic User getCurrentUser()
UserLoginStore
getCurrentUser in interface UserLoginStore
public User[] getActiveUsers()
throws DatabaseException
UserLoginStore
getActiveUsers in interface UserLoginStoreDatabaseExceptionpublic LoginListener[] getLoginListeners()
getLoginListeners in interface UserLoginStore
public Iterable<String> getUserNames()
throws DatabaseException
UserLoginStore
getUserNames in interface UserLoginStoreDatabaseException
public User getUserForName(String name)
throws DatabaseException
UserLoginStore
getUserForName in interface UserLoginStoreDatabaseExceptionpublic void loginCanceled(String location)
UserLoginStore
loginCanceled in interface UserLoginStore
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 database
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 boolean logoutUser(User user)
throws DatabaseException
UserLoginStore
logoutUser in interface UserLoginStoreDatabaseExceptionpublic void removeLoginListener(LoginListener listener)
removeLoginListener in interface UserLoginStorepublic AbstractUserLoginStore unwrap()
Wrapped
unwrap in interface Wrapped<AbstractUserLoginStore>
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||