org.springframework.richclient.security
Class LoginForm

java.lang.Object
  extended by org.springframework.richclient.application.support.ApplicationServicesAccessor
      extended by org.springframework.richclient.factory.AbstractControlFactory
          extended by org.springframework.richclient.form.AbstractForm
              extended by org.springframework.richclient.security.LoginForm
All Implemented Interfaces:
CommitListener, ControlFactory, Form

public class LoginForm
extends AbstractForm

This class provides a simple form for capturing a username and password from the user. It also generates an Authentication token from the entered values.

Author:
Larry Streepy
See Also:
getAuthentication()

Field Summary
 
Fields inherited from class org.springframework.richclient.application.support.ApplicationServicesAccessor
logger
 
Constructor Summary
LoginForm()
          Constructor.
 
Method Summary
protected  JComponent createFormControl()
          Construct the form with the username and password fields.
protected  LoginDetails createLoginDetails()
          Create the form object to hold our login information.
 org.acegisecurity.Authentication getAuthentication()
          Get an Authentication token that contains the current username and password.
 boolean requestFocusInWindow()
           
 void setPassword(String password)
          Set the password in the form.
 void setUserName(String userName)
          Set the user name in the form.
 
Methods inherited from class org.springframework.richclient.form.AbstractForm
addChildForm, addFormObjectChangeListener, addFormValueChangeListener, addGuarded, addGuarded, addValidationListener, addValidationResultsReporter, attachFormErrorGuard, attachFormGuard, commit, constructSecurityControllerId, createCommitButton, createControl, createNewFormObjectButton, createNewObject, detachFormGuard, getBindingFactory, getChildForm, getCommitCommand, getCommitCommandFaceDescriptorId, getCommitSecurityControllerId, getDefaultButton, getEditableFormObject, getEditingFormObjectIndex, getFormModel, getFormObject, getId, getNewFormObjectCommand, getNewFormObjectCommandId, getNewFormObjectSecurityControllerId, getParent, getRevertCommand, getRevertCommandFaceDescriptorId, getValidationResultsReporters, getValue, getValueModel, handleEnabledChange, hasErrors, init, isDirty, isEditingNewFormObject, isEnabled, newSingleLineResultsReporter, postCommit, preCommit, removeChildForm, removeFormObjectChangeListener, removeFormValueChangeListener, removeGuarded, removeValidationListener, removeValidationResultsReporter, reset, revert, setClearFormOnCommit, setDefaultButton, setEditableFormObjects, setEditingFormObjectIndexHolder, setEditingFormObjectIndexSilently, setEditingNewFormObject, setEnabled, setFormModel, setFormModelDefaultEnabledState, setFormObject, setId
 
Methods inherited from class org.springframework.richclient.factory.AbstractControlFactory
createControlIfNecessary, getControl, isControlCreated, isSingleton, setSingleton
 
Methods inherited from class org.springframework.richclient.application.support.ApplicationServicesAccessor
getActiveWindow, getApplication, getApplicationContext, getApplicationName, getApplicationServices, getCommandConfigurer, getComponentFactory, getConversionService, getIconSource, getImageSource, getMessage, getMessage, getMessage, getMessage, getMessages, getMessageSource, getObjectConfigurer, getService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.springframework.richclient.factory.ControlFactory
getControl
 

Constructor Detail

LoginForm

public LoginForm()
Constructor.

Method Detail

setUserName

public void setUserName(String userName)
Set the user name in the form.

Parameters:
userName - to install

setPassword

public void setPassword(String password)
Set the password in the form.

Parameters:
password - to install

getAuthentication

public org.acegisecurity.Authentication getAuthentication()
Get an Authentication token that contains the current username and password.

Returns:
authentication token

createLoginDetails

protected LoginDetails createLoginDetails()
Create the form object to hold our login information.

Returns:
constructed form object

createFormControl

protected JComponent createFormControl()
Construct the form with the username and password fields.

Specified by:
createFormControl in class AbstractForm

requestFocusInWindow

public boolean requestFocusInWindow()


Copyright © 2004-2008 The Spring Framework. All Rights Reserved.