edu.jhu.tmaj.client.shared
Class LoginDialog

java.lang.Object
  extended by edu.jhu.tmaj.client.shared.LoginDialog
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

public final class LoginDialog
extends java.lang.Object
implements java.awt.event.ActionListener

A frame that displays a log-in prompt


Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
static void autoLogIn(java.lang.String username, java.lang.String digestedPassword)
          Used to automatically log someone into the GUI.
static void autoLoginWithoutChecking()
          Used to automatically log in for a text-based application.
static boolean doLogin(javax.swing.JFrame ownerFrame, boolean doNotBypass)
          Displays this dialog where a user enters a username and password and clicks the okay button to verify the entered values on the server.
static void logIntoGUIAsGuest()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

doLogin

public static boolean doLogin(javax.swing.JFrame ownerFrame,
                              boolean doNotBypass)
Displays this dialog where a user enters a username and password and clicks the okay button to verify the entered values on the server.

Parameters:
doNotBypass - true if the user will enter a username and password even if the config file has BYPASS_LOGIN set. Generally in development, the same user auto-logs on every time, but sometimes a developer wants to log in as another user, say to test out security for that user, and thus wants this feature supressed.

autoLoginWithoutChecking

public static void autoLoginWithoutChecking()
Used to automatically log in for a text-based application. This does not fully initialize the userBean in the CurrentUser class, but it does give the minimum, which is the username and password. This does not actually check with the server that the username/password is valid, so it's a little faster. Values from a config file are read.


autoLogIn

public static void autoLogIn(java.lang.String username,
                             java.lang.String digestedPassword)
Used to automatically log someone into the GUI. To use the GUI you would need a userBean fully initialized, as applications often check if a user has certain permission by loooking the the CurrentUser.UserBean on the client side. Also, you may also use this function to re-log someone end. For example, if they changed their permissions on in the database, this will get the latest info and put it in to the CurrentUser class.


logIntoGUIAsGuest

public static void logIntoGUIAsGuest()

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener