org.mega.gasp.platform
Interface DBManager

All Known Implementing Classes:
DBManagerImpl

public interface DBManager

DBManager contains all the methods requiring an acces to the GASP DB.

Author:
PELLERIN Romain (pellerin@cnam.fr) - MEGA Project

Method Summary
 int generateActorID()
          Generate a DB persistant Actor ID.
 Actor getActorIfAuthentificationOK(int aID, java.lang.String username, java.lang.String password)
          Verify if the login authentification of an Actor is valid then return the authentified actor or null.
 boolean isDBConnectionOK()
          Verify if the connection to the GASP DB is ok.
 int registerNewActor(java.lang.String uid, int appID, java.lang.String username, java.lang.String password)
          Register a new actor for the double (uid,appID) if the user have the appropriate rights.
 void saveLastUsedPseudo(int actorID, java.lang.String pseudoName)
          Saves in the DB the last used pseudo.
 

Method Detail

generateActorID

public int generateActorID()
Generate a DB persistant Actor ID.

Returns:
the actor ID

isDBConnectionOK

public boolean isDBConnectionOK()
Verify if the connection to the GASP DB is ok.

Returns:
boolean

getActorIfAuthentificationOK

public Actor getActorIfAuthentificationOK(int aID,
                                          java.lang.String username,
                                          java.lang.String password)
Verify if the login authentification of an Actor is valid then return the authentified actor or null.

Parameters:
aID - the actor ID
username -
password -
Returns:
the Actor instance object

registerNewActor

public int registerNewActor(java.lang.String uid,
                            int appID,
                            java.lang.String username,
                            java.lang.String password)
Register a new actor for the double (uid,appID) if the user have the appropriate rights.

Parameters:
uid -
appID -
username -
password -
Returns:
the Actor ID

saveLastUsedPseudo

public void saveLastUsedPseudo(int actorID,
                               java.lang.String pseudoName)
Saves in the DB the last used pseudo.

Parameters:
actorID -
pseudoName -