SPT Core API

com.sptci.echo2.login
Class AbstractListener

java.lang.Object
  extended by com.sptci.echo2.login.AbstractListener
All Implemented Interfaces:
Serializable, EventListener, ActionListener
Direct Known Subclasses:
CancelListener, LoginListener, UserNameListener

public abstract class AbstractListener
extends Object
implements ActionListener

An abstract super-class for all action listeners for the LoginPane component. Contains error checking methods and other utility methods for concrete sub-classes.

© Copyright 2008 Sans Pareil Technologies, Inc.

Version:
$Id: AbstractListener.java 4553 2008-12-24 10:34:16Z rakesh $
Author:
Rakesh Vidyadharan 2008-04-12
See Also:
Serialized Form

Constructor Summary
AbstractListener()
           
 
Method Summary
protected  boolean checkPassword(LoginPane view)
          Check the LoginPane.password field to ensure that a value has been input into the field.
protected  boolean checkText(String text)
          Check the specified string to ensure that it is not null and not empty.
protected  boolean checkUserName(LoginPane view)
          Check the LoginPane.userName field to ensure that a value has been input into the field.
protected  boolean checkView(LoginPane view)
          Check the LoginPane components to ensure that appropriate values have been entered.
protected  LoginPane getLoginPane(ActionEvent event)
          Return the LoginPane component from which the action was triggered.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface nextapp.echo2.app.event.ActionListener
actionPerformed
 

Constructor Detail

AbstractListener

public AbstractListener()
Method Detail

getLoginPane

protected LoginPane getLoginPane(ActionEvent event)
Return the LoginPane component from which the action was triggered.

Parameters:
event - The action that was triggerd.
Returns:
The view from which the action was triggered.
See Also:
Application.getParentView(nextapp.echo2.app.Component)

checkView

protected boolean checkView(LoginPane view)
Check the LoginPane components to ensure that appropriate values have been entered. The default implementation ensures that non-empty values have been entered into the LoginPane.userName and LoginPane.password fields.

Parameters:
view - The login pane instance that is to be checked.
Returns:
Returns true if the tests succeed.
See Also:
checkUserName(com.sptci.echo2.login.LoginPane), checkPassword(com.sptci.echo2.login.LoginPane)

checkUserName

protected boolean checkUserName(LoginPane view)
Check the LoginPane.userName field to ensure that a value has been input into the field.

Parameters:
view - The login pane instance that is to be checked.
Returns:
Returns true if the value of the field is not null or empty.
See Also:
checkText(java.lang.String)

checkPassword

protected boolean checkPassword(LoginPane view)
Check the LoginPane.password field to ensure that a value has been input into the field.

Parameters:
view - The login pane instance that is to be checked.
Returns:
Returns true if the value of the field is not null or empty.
See Also:
checkText(java.lang.String)

checkText

protected boolean checkText(String text)
Check the specified string to ensure that it is not null and not empty. Strings that are composed entirely of spaces are also treated as empty.

Parameters:
text - The text that is to be checked.
Returns:
Return true if the string specified is not null or empty.

SPT Core API