|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.janicke.hj.tools.servlet.AbstractUserAdministration
Handles the user administration with a database.
Constructor Summary | |
AbstractUserAdministration()
|
Method Summary | |
abstract boolean |
acceptUser(int id)
Returns if a user exists in the database. |
abstract boolean |
acceptUser(int id,
java.lang.String sid)
Returns if a user exists in the database. |
abstract boolean |
acceptUser(java.lang.String nick)
Returns if a user exists in the database. |
abstract boolean |
acceptUser(java.lang.String nick,
java.lang.String passwd)
Returns if a user exists in the database. |
boolean |
acceptUser(User user)
Returns if a user exists in the database. |
abstract boolean |
addUser(User user)
Adds a user to the database. |
abstract boolean |
deleteUser(int id)
Deletes an existing user from the database. |
abstract boolean |
deleteUser(java.lang.String nick,
java.lang.String passwd)
Deletes an existing user from the database. |
boolean |
deleteUser(User user)
Deletes an existing user from the database. |
abstract User |
editUser(User user)
Edits an existing user from the database. |
abstract User |
editUser(User user,
java.lang.String passwd)
Edits an existing user password from the database. |
static java.lang.String |
getRandomSecureId(int n)
Generates a SecureIdentity String with n chars. |
abstract User |
getUser(int id)
Gets a user from the database. |
abstract User |
getUser(int id,
java.lang.String sid)
Gets a user from the database. |
abstract User |
getUser(java.lang.String nick)
Gets a user from the database. |
abstract User |
getUser(java.lang.String nick,
java.lang.String passwd)
Gets a user from the database. |
abstract User |
loginUser(java.lang.String nick,
java.lang.String passwd)
Tries to login a new user. |
User |
loginUser(User user)
Tries to login a new user. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AbstractUserAdministration()
Method Detail |
public static java.lang.String getRandomSecureId(int n)
n
- Length of the generated String.public abstract boolean addUser(User user)
user
- The user to add.public boolean acceptUser(User user)
user
- The user to check with database.public abstract boolean acceptUser(int id, java.lang.String sid)
id
- The userid to check with database.sid
- The secureIdentity of the user to check with database.public abstract boolean acceptUser(java.lang.String nick, java.lang.String passwd)
nick
- The nick of the user to check with database.passwd
- The password of the user to check with database.public abstract boolean acceptUser(int id)
id
- The userid to check with database.public abstract boolean acceptUser(java.lang.String nick)
nick
- The nick of the user to check with database.public boolean deleteUser(User user) throws java.lang.Exception
user
- The user to delete.java.lang.Exception
- if user exists, but cannot be delted from database.public abstract boolean deleteUser(java.lang.String nick, java.lang.String passwd) throws java.lang.Exception
nick
- The nickname of the user to delete.passwd
- The password of the user to delete.java.lang.Exception
- if user exists, but cannot be delted from database.public abstract boolean deleteUser(int id) throws java.lang.Exception
id
- The userid to delete.java.lang.Exception
- if user exists, but cannot be delted from database.public abstract User editUser(User user) throws java.lang.Exception
user
- The user to edit.java.sql.SQLException
- if database cannot be reached or problems with the SQL statements.java.lang.Exception
- if user does not exists.public abstract User editUser(User user, java.lang.String passwd) throws java.lang.Exception
user
- The user to edit.passwd
- The new password.java.sql.SQLException
- if database cannot be reached or problems with the SQL statements.java.lang.Exception
- if user does not exists.public User loginUser(User user) throws java.lang.Exception
user
- The user who wants to loginjava.lang.Exception
- if user exists but secureIdentity could not be set.public abstract User loginUser(java.lang.String nick, java.lang.String passwd) throws java.lang.Exception
nick
- The nickname of the user who wants to loginpasswd
- The password of the user who wants to loginjava.lang.Exception
- if user exists but secureIdentity could not be set.public abstract User getUser(int id) throws java.sql.SQLException
id
- The id of the user to get.java.sql.SQLException
- if there is no conection to the database or problems with the SQL statements.public abstract User getUser(java.lang.String nick) throws java.sql.SQLException
nick
- The nickname of the user to get.java.sql.SQLException
- if there is no conection to the database or problems with the SQL statements.public abstract User getUser(int id, java.lang.String sid) throws java.sql.SQLException
id
- The id of the user to get.sid
- The secureIdentity of the user to get,java.sql.SQLException
- if there is no conection to the database or problems with the SQL statements.public abstract User getUser(java.lang.String nick, java.lang.String passwd) throws java.sql.SQLException
nick
- The nickname of the user to get.passwd
- The password of the user to get.java.sql.SQLException
- if there is no conection to the database or problems with the SQL statements.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |