public class

LoginAction

extends ActionAdapter
java.lang.Object
   ↳ javax.swing.AbstractAction
     ↳ org.mbari.awt.event.ActionAdapter
       ↳ vars.shared.ui.dialogs.LoginAction

Class Overview

Displays a login dialog and registers the resulting UserAccount in the GlobalLookup

Summary

[Expand]
Inherited Constants
From interface javax.swing.Action
[Expand]
Inherited Fields
From class javax.swing.AbstractAction
Public Constructors
LoginAction(MiscDAOFactory miscDAOFactory, MiscFactory miscFactory)
Constructs ...
Public Methods
void doAction()

JDialog getDialog()
boolean login(String userName, String password, UserAccountDAO userAccountDAO)
Validates the users credentials.
[Expand]
Inherited Methods
From class org.mbari.awt.event.ActionAdapter
From class javax.swing.AbstractAction
From class java.lang.Object
From interface java.awt.event.ActionListener
From interface javax.swing.Action
From interface org.mbari.awt.event.IAction

Public Constructors

public LoginAction (MiscDAOFactory miscDAOFactory, MiscFactory miscFactory)

Constructs ...

Public Methods

public void doAction ()

public JDialog getDialog ()

public boolean login (String userName, String password, UserAccountDAO userAccountDAO)

Validates the users credentials. Sets the resulting useraccount in a Dispatcher. To verify what account was set you can do the following:

  UserAccount ua = (UserAccount) Dispatcher.getDispatcher(UserAccount.class).getValueObject();
 

Parameters
userName The name of the User.
password The password for the User.