All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface net.tabuleiro.nebulae.ServerUserDatabase

public abstract interface ServerUserDatabase
Interface used by Nebulae for user authentication, using the internal database system or an SQL source.
The database backend used for user authentication is configured in the Nebulae.cfg file. Use the getServerUserDatabase() method of the ServerObject interface to acquire this object.


Method Index

 o createUser(String, String, String)
Creates an user record in the user database
 o deleteDBUser(int)
Deletes the user with the specified user id from the database.
 o getDBUser(String)
Returns the integer id for the user in the database.
 o getDBUserLevel(int)
Retrieves the user access level
 o getDBUserPassword(int)
Retrieves the user password
 o isEnabled()
Checks if the user database is enabled.
 o updateUserLastLoginTime(int)
Updates the last login time for this user in the database to the current time.

Methods

 o createUser
 public abstract boolean createUser(java.lang.String usernamein,
                                    java.lang.String password,
                                    java.lang.String userlevel)
Creates an user record in the user database

Parameters:
usernamein - Username string, will be converted to uppercase for storage
password - Password string
userlevel - User access level as a string. Usual values are between 20 and 100.
If the string specified can not be converted the default user level will be set.
Returns:
true if the user account is created successfully, false if an error occurs
 o updateUserLastLoginTime
 public abstract void updateUserLastLoginTime(int userid)
Updates the last login time for this user in the database to the current time.

Parameters:
userid - User id integer retrieved by the getDBUser method.
 o getDBUser
 public abstract int getDBUser(java.lang.String usernamein) throws net.tabuleiro.nebulae.DBException, net.tabuleiro.nebulae.UserNotFoundException
Returns the integer id for the user in the database.
Other methods use the user id for speed.

Parameters:
usernamein - Username string
 o deleteDBUser
 public abstract boolean deleteDBUser(int userid)
Deletes the user with the specified user id from the database.

Parameters:
userid - User id integer retrieved by the getDBUser method.
Returns:
true if the user account is deleted successfully, false if an error occurs
 o getDBUserLevel
 public abstract int getDBUserLevel(int userid) throws net.tabuleiro.nebulae.DBException
Retrieves the user access level

Parameters:
userid - User id integer retrieved by the getDBUser method.
 o getDBUserPassword
 public abstract java.lang.String getDBUserPassword(int userid) throws net.tabuleiro.nebulae.DBException
Retrieves the user password

Parameters:
userid - User id integer retrieved by the getDBUser method.
 o isEnabled
 public abstract boolean isEnabled()
Checks if the user database is enabled.
Databases are enabled by default, but can be disabled by using the Nebulae.cfg file.


All Packages  Class Hierarchy  This Package  Previous  Next  Index