airline
Class TextConnection

java.lang.Object
  extended by airline.Connection
      extended by airline.TextConnection

public class TextConnection
extends Connection

Console-based front end for the airline system.

Author:
Michael Goldwasser

Constructor Summary
TextConnection(AirlineSystem system)
          Instantiates a new text-based connection to the given AirlineSystem.
 
Method Summary
 AdministratorSession.AdminMenuChoice getAdminMainMenuChoice()
          This dialog is responsible for offering the main administrator menu and returning the user's choice.
 AdministratorSession.NewFlightDetails getNewFlightInfo()
          This dialog is responsible for gathering information from an administrator while adding a new flight to the system.
 User loginDialog()
          This dialog manages the login process.
 
Methods inherited from class airline.Connection
connect
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextConnection

public TextConnection(AirlineSystem system)
Instantiates a new text-based connection to the given AirlineSystem.

Parameters:
system - The AirlineSystem associated with this connection
Method Detail

getAdminMainMenuChoice

public AdministratorSession.AdminMenuChoice getAdminMainMenuChoice()
Description copied from class: Connection
This dialog is responsible for offering the main administrator menu and returning the user's choice.

Specified by:
getAdminMainMenuChoice in class Connection
Returns:
The selected choice.

getNewFlightInfo

public AdministratorSession.NewFlightDetails getNewFlightInfo()
Description copied from class: Connection
This dialog is responsible for gathering information from an administrator while adding a new flight to the system.

Specified by:
getNewFlightInfo in class Connection
Returns:
Details about the new flight.

loginDialog

public User loginDialog()
Description copied from class: Connection
This dialog manages the login process. It is responsible for returning a reference to an authenticated User, or to return null to signify that the application should exit.

Specified by:
loginDialog in class Connection
Returns:
reference to the authenticated User (or null if none).