org.springframework.richclient.security
Class LoginDetails

java.lang.Object
  extended by org.springframework.richclient.security.LoginDetails
All Implemented Interfaces:
PropertyConstraintProvider

public class LoginDetails
extends Object
implements PropertyConstraintProvider

This class provides a bean suitable for use in a login form, providing properties for storing the user name and password.

This bean provides basic constraints for the username and password properties. Each is required to be at least 2 characters long. If you need more specific constraints, then you should implement a subtype and override the initRules method.

Author:
Larry Streepy, Ben Alex

Field Summary
static String PROPERTY_PASSWORD
           
static String PROPERTY_USERNAME
           
 
Constructor Summary
LoginDetails()
          Constructor.
 
Method Summary
 String getPassword()
           
 PropertyConstraint getPropertyConstraint(String propertyName)
          Return the property constraints.
 String getUsername()
           
protected  void initRules()
          Initialize the field constraints for our properties.
 void setPassword(String password)
           
 void setUsername(String username)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_USERNAME

public static final String PROPERTY_USERNAME
See Also:
Constant Field Values

PROPERTY_PASSWORD

public static final String PROPERTY_PASSWORD
See Also:
Constant Field Values
Constructor Detail

LoginDetails

public LoginDetails()
Constructor. Pre-load our username field with the data currently stored in the security context, if any.

Method Detail

initRules

protected void initRules()
Initialize the field constraints for our properties. Minimal constraints are enforced here. If you need more control, you should override this in a subtype.


getUsername

public String getUsername()

setUsername

public void setUsername(String username)

getPassword

public String getPassword()

setPassword

public void setPassword(String password)

getPropertyConstraint

public PropertyConstraint getPropertyConstraint(String propertyName)
Return the property constraints.

Specified by:
getPropertyConstraint in interface PropertyConstraintProvider
See Also:
PropertyConstraintProvider.getPropertyConstraint(java.lang.String)


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