|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Handles the user administration with a database.
Method Summary | |
boolean |
acceptUser(int id)
Returns if a user exists in the database. |
boolean |
acceptUser(int id,
java.lang.String sid)
Returns if a user exists in the database. |
boolean |
acceptUser(java.lang.String nick)
Returns if a user exists in the database. |
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. |
boolean |
addUser(User user)
Adds a user to the database. |
boolean |
deleteUser(int id)
Deletes an existing user from the database. |
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. |
User |
editUser(User user)
Edits an existing user from the database. |
User |
editUser(User user,
java.lang.String passwd)
Edits an existing user password from the database. |
User |
getUser(int id)
Gets a user from the database. |
User |
getUser(int id,
java.lang.String sid)
Gets a user from the database. |
User |
getUser(java.lang.String nick)
Gets a user from the database. |
User |
getUser(java.lang.String nick,
java.lang.String passwd)
Gets a user from the database. |
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. |
Method Detail |
public boolean addUser(User user)
user
- The user to add.public boolean acceptUser(User user)
user
- The user to check with database.public 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 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 boolean acceptUser(int id)
id
- The userid to check with database.public 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 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 boolean deleteUser(int id)
id
- The userid to delete.java.lang.Exception
- if user exists, but cannot be delted from database.public 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 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 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 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 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 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 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 |