|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.opensmus.MUSDBConnection
public class MUSDBConnection
Field Summary | |
---|---|
boolean |
m_enabled
|
Fields inherited from interface net.sf.opensmus.ServerUserDatabase |
---|
AUTHENTICATION_NONE, AUTHENTICATION_OPTIONAL, AUTHENTICATION_REQUIRED |
Constructor Summary | |
---|---|
MUSDBConnection(MUSServer srv,
boolean enableFlag)
|
Method Summary | |
---|---|
void |
addBannedEntry(java.lang.String inentry,
int secsToBan)
|
boolean |
canGetAttribute(java.lang.String attname,
ServerUser user)
|
boolean |
canSetAttribute(java.lang.String attname,
ServerUser user)
|
int |
checkLogin(MUSUser oneUser,
java.lang.String username,
java.lang.String password)
Checks if a user/pass combination is valid and sets the userlevel |
void |
checkPoint()
|
boolean |
createApplication(java.lang.String applicationnamein,
java.lang.String description)
|
int |
createApplicationData(int applicationid)
|
boolean |
createDBPlayer(int userid,
int appid)
|
void |
createDefaultDB()
|
boolean |
createUser(java.lang.String usernamein,
java.lang.String password,
java.lang.String userlevel)
Creates a user record in the user database |
boolean |
declareAttribute(java.lang.String attributenamein)
|
boolean |
deleteAttribute(int attid)
|
boolean |
deleteDBApplication(int appid)
|
boolean |
deleteDBApplicationData(int appdataid)
|
boolean |
deleteDBPlayer(int playerid)
|
boolean |
deleteDBUser(int userid)
Deletes the user with the specified user id from the database. |
void |
deliver(ServerUser user,
MUSMovie mov,
java.lang.String[] args,
MUSMessage msg,
MUSMessage reply)
|
void |
ensureDBPresence()
|
LPropList |
getApplicationDataAsL(int appid)
|
LList |
getApplicationDataListFromApplicationID(int appid)
|
MUSAttribute |
getAttribute(int ownerid,
java.lang.String attributenamein)
|
int |
getAttribute(java.lang.String attributenamein)
|
boolean |
getAttributeExists(int ownerid,
int attrid)
|
LValue |
getAttributeNames(int ownerid)
|
int |
getDBApplication(java.lang.String appnamein)
|
int |
getDBPlayer(int userid,
int appid)
|
int |
getDBUser(java.lang.String usernamein)
Returns the integer id for the user in the database. |
int |
getDBUserLevel(int userid)
Retrieves the user access level |
java.lang.String |
getDBUserPassword(int userid)
Retrieves the user password |
LList |
getMatchedApplicationDataList(LPropList plist)
|
LValue |
handleAttributeMessage(int ownerid,
MUSMessage reply,
java.lang.String attrcommand,
LPropList msgattributes,
ServerUser user)
|
boolean |
isBanned(java.lang.String inentry)
|
boolean |
isEnabled()
Checks if the user database is enabled. |
void |
killDBConnection()
|
void |
processDBConfigCommands()
|
void |
purgeBannedTable()
|
boolean |
removeAttribute(int ownerid,
MUSAttribute attin)
|
void |
removeBannedEntry(java.lang.String inentry)
|
LList |
searchApplicationDataForNumber(int appid,
int attrid,
LList appdataidlist,
LValue argsearch1)
|
LList |
searchApplicationDataForRange(int appid,
int attrid,
LList appdataidlist,
LValue argsearch1,
LValue argsearch2)
|
LList |
searchApplicationDataForText(int appid,
int attrid,
LList appdataidlist,
LValue argsearch1)
|
void |
setAttribute(int ownerid,
MUSAttribute attin)
|
void |
setDBObjectAttributes(int objectid,
LList attrlist,
LList vallist)
|
LValue |
srvcmd_getApplicationCount()
|
LValue |
srvcmd_getApplicationNames()
|
LValue |
srvcmd_getAttributeCount()
|
LValue |
srvcmd_getAttributeNames()
|
LValue |
srvcmd_getBanned()
|
LValue |
srvcmd_getUserCount()
|
LValue |
srvcmd_getUserNames()
|
void |
updateUserLastLoginTime(int userid)
Updates the last login time for this user in the database to the current time. |
void |
validateAttributesList(LValue attributes,
LList intattrlist,
ServerUser user,
int accessmode)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public boolean m_enabled
Constructor Detail |
---|
public MUSDBConnection(MUSServer srv, boolean enableFlag)
Method Detail |
---|
public boolean isEnabled()
ServerUserDatabase
isEnabled
in interface ServerUserDatabase
public void killDBConnection()
public void processDBConfigCommands()
public boolean createUser(java.lang.String usernamein, java.lang.String password, java.lang.String userlevel)
ServerUserDatabase
createUser
in interface ServerUserDatabase
usernamein
- Username string, will be converted to uppercase for storagepassword
- Password stringuserlevel
- User access level as a string. Usual values are between 20 and 100.
public boolean createApplication(java.lang.String applicationnamein, java.lang.String description)
public boolean createDBPlayer(int userid, int appid)
public void checkPoint()
public boolean isBanned(java.lang.String inentry)
public void purgeBannedTable()
public void addBannedEntry(java.lang.String inentry, int secsToBan)
public void removeBannedEntry(java.lang.String inentry)
public int createApplicationData(int applicationid)
public boolean declareAttribute(java.lang.String attributenamein)
public void ensureDBPresence() throws java.sql.SQLException
java.sql.SQLException
public void createDefaultDB() throws java.sql.SQLException
java.sql.SQLException
public LValue srvcmd_getUserCount()
public LValue srvcmd_getUserNames()
public LValue srvcmd_getApplicationCount()
public LValue srvcmd_getApplicationNames()
public LValue srvcmd_getAttributeCount()
public LValue srvcmd_getAttributeNames()
public LValue srvcmd_getBanned()
public void updateUserLastLoginTime(int userid)
ServerUserDatabase
updateUserLastLoginTime
in interface ServerUserDatabase
userid
- User id integer retrieved by the getDBUser method.public int getDBUser(java.lang.String usernamein) throws DBException, UserNotFoundException
ServerUserDatabase
getDBUser
in interface ServerUserDatabase
usernamein
- Username string
DBException
UserNotFoundException
public boolean deleteDBUser(int userid)
ServerUserDatabase
deleteDBUser
in interface ServerUserDatabase
userid
- User id integer retrieved by the getDBUser method.
public int getAttribute(java.lang.String attributenamein) throws DBException
DBException
public boolean deleteAttribute(int attid)
public boolean removeAttribute(int ownerid, MUSAttribute attin) throws AttributeNotFoundException
AttributeNotFoundException
public LValue getAttributeNames(int ownerid)
public MUSAttribute getAttribute(int ownerid, java.lang.String attributenamein) throws DBException, AttributeNotFoundException
DBException
AttributeNotFoundException
public boolean getAttributeExists(int ownerid, int attrid) throws DBException
DBException
public void setAttribute(int ownerid, MUSAttribute attin) throws DBException
DBException
public void setDBObjectAttributes(int objectid, LList attrlist, LList vallist)
public int getDBUserLevel(int userid) throws DBException
ServerUserDatabase
getDBUserLevel
in interface ServerUserDatabase
userid
- User id integer retrieved by the getDBUser method.
DBException
public java.lang.String getDBUserPassword(int userid) throws DBException
ServerUserDatabase
getDBUserPassword
in interface ServerUserDatabase
userid
- User id integer retrieved by the getDBUser method.
DBException
public int checkLogin(MUSUser oneUser, java.lang.String username, java.lang.String password)
ServerUserDatabase
checkLogin
in interface ServerUserDatabase
oneUser
- The user object that will have the userlevel set
public int getDBApplication(java.lang.String appnamein) throws DBException
DBException
public boolean deleteDBApplication(int appid)
public boolean deleteDBApplicationData(int appdataid)
public boolean deleteDBPlayer(int playerid)
public int getDBPlayer(int userid, int appid) throws DBException, PlayerNotFoundException
DBException
PlayerNotFoundException
public LList getApplicationDataListFromApplicationID(int appid)
public LPropList getApplicationDataAsL(int appid)
public LList searchApplicationDataForText(int appid, int attrid, LList appdataidlist, LValue argsearch1)
public LList searchApplicationDataForNumber(int appid, int attrid, LList appdataidlist, LValue argsearch1)
public LList searchApplicationDataForRange(int appid, int attrid, LList appdataidlist, LValue argsearch1, LValue argsearch2)
public void deliver(ServerUser user, MUSMovie mov, java.lang.String[] args, MUSMessage msg, MUSMessage reply)
public LValue handleAttributeMessage(int ownerid, MUSMessage reply, java.lang.String attrcommand, LPropList msgattributes, ServerUser user) throws DBException, MUSErrorCode
DBException
MUSErrorCode
public LList getMatchedApplicationDataList(LPropList plist) throws MUSErrorCode
MUSErrorCode
public void validateAttributesList(LValue attributes, LList intattrlist, ServerUser user, int accessmode) throws MUSErrorCode
MUSErrorCode
public boolean canSetAttribute(java.lang.String attname, ServerUser user)
public boolean canGetAttribute(java.lang.String attname, ServerUser user)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |