babase.ranker
Class Controller

java.lang.Object
  extended by babase.ranker.Controller

public class Controller
extends java.lang.Object

Controls communications amongst different components of the ranker.

Author:
tjb13

Field Summary
 Cage cage
           
 Chooser myChooser
           
 Database myDatabase
           
 GUI myGUI
           
 LoginManager myLoginManager
           
 
Constructor Summary
Controller()
          Default constructor which creates a new database and login manager
 
Method Summary
 Database getDatabase()
          Returns the Database currently being used.
 void loadChooser()
          Disposes of the Login Manager and loads the chooser using the login credentials provided to the login manager and a specified database.
 void loadChooser(javax.swing.JFrame f)
          Loads the chooser after disposing whatever frame was previously displayed to the user, either a login manager or a ranker GUI.
 void loadGui()
          Loads the GUI for the ranker utility
 void logout()
          Logs a given user out of the ranker utility and brings the user back to the login window.
 void reloadChooser()
          Loads the chooser in the case a given user would like to perform another ranking without logging out.
 void startLoginManager()
          Starts a new login manager so that the user can login
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myDatabase

public Database myDatabase

myLoginManager

public LoginManager myLoginManager

myChooser

public Chooser myChooser

myGUI

public GUI myGUI

cage

public Cage cage
Constructor Detail

Controller

public Controller()
Default constructor which creates a new database and login manager

Method Detail

startLoginManager

public void startLoginManager()
Starts a new login manager so that the user can login


loadChooser

public void loadChooser()
                 throws java.sql.SQLException
Disposes of the Login Manager and loads the chooser using the login credentials provided to the login manager and a specified database.

Throws:
java.sql.SQLException

reloadChooser

public void reloadChooser()
                   throws java.sql.SQLException
Loads the chooser in the case a given user would like to perform another ranking without logging out.

Throws:
java.sql.SQLException

loadChooser

public void loadChooser(javax.swing.JFrame f)
                 throws java.sql.SQLException
Loads the chooser after disposing whatever frame was previously displayed to the user, either a login manager or a ranker GUI.

Parameters:
f -
Throws:
java.sql.SQLException

getDatabase

public Database getDatabase()
Returns the Database currently being used.

Returns:
a Database

loadGui

public void loadGui()
             throws Utils.FileIOException,
                    java.sql.SQLException
Loads the GUI for the ranker utility

Throws:
Utils.FileIOException
java.sql.SQLException

logout

public void logout()
Logs a given user out of the ranker utility and brings the user back to the login window.