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