edu.vt.middleware.password
Class PasswordData

java.lang.Object
  extended by edu.vt.middleware.password.PasswordData

public class PasswordData
extends Object

Contains password related information used by rules to perform password validation.

Version:
$Revision: 1643 $ $Date: 2010-10-07 13:14:08 -0400 (Thu, 07 Oct 2010) $
Author:
Middleware Services

Constructor Summary
PasswordData()
          Default constructor.
PasswordData(Password p)
          Creates a new password data.
 
Method Summary
 Password getPassword()
          Returns the password.
 List<String> getPasswordHistory()
          Returns the password history.
 Map<String,String> getPasswordSources()
          Returns the password sources.
 String getUsername()
          Returns the username.
static PasswordData newInstance(Password p, String u, List<String> h, Map<String,String> s)
          Convenience method for creating a password data with all of it's properties.
 void setPassword(Password p)
          Sets the password.
 void setPasswordHistory(List<String> l)
          Sets the password history.
 void setPasswordSources(Map<String,String> m)
          Sets the password sources.
 void setUsername(String s)
          Sets the username.
 String toString()
          Returns a string representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PasswordData

public PasswordData()
Default constructor.


PasswordData

public PasswordData(Password p)
Creates a new password data.

Parameters:
p - password
Method Detail

setPassword

public void setPassword(Password p)
Sets the password.

Parameters:
p - password

getPassword

public Password getPassword()
Returns the password.

Returns:
password

setUsername

public void setUsername(String s)
Sets the username.

Parameters:
s - username

getUsername

public String getUsername()
Returns the username.

Returns:
username

getPasswordHistory

public List<String> getPasswordHistory()
Returns the password history.

Returns:
password history

setPasswordHistory

public void setPasswordHistory(List<String> l)
Sets the password history.

Parameters:
l - password history

getPasswordSources

public Map<String,String> getPasswordSources()
Returns the password sources.

Returns:
password sources

setPasswordSources

public void setPasswordSources(Map<String,String> m)
Sets the password sources.

Parameters:
m - password sources

newInstance

public static PasswordData newInstance(Password p,
                                       String u,
                                       List<String> h,
                                       Map<String,String> s)
Convenience method for creating a password data with all of it's properties. Properties are ignored if they are null or if collections are empty.

Parameters:
p - password
u - username
h - history
s - sources
Returns:
password data

toString

public String toString()
Returns a string representation of this object.

Overrides:
toString in class Object
Returns:
string representation


Copyright © 2003-2011 Virginia Tech. All Rights Reserved.