org.codehaus.plexus.redback.users
Interface User


public interface User

The User Object.

Author:
Jason van Zyl, Joakim Erdfelt

Field Summary
static java.lang.String ROLE
          The Plexus ROLE for this interface.
 
Method Summary
 void addPreviousEncodedPassword(java.lang.String encodedPassword)
          Add encoded password to previously passwords in encoded format.
 java.util.Date getAccountCreationDate()
          Get the Creation Date for this account.
 int getCountFailedLoginAttempts()
          Get Count of Failed Login Attempts.
 java.lang.String getEmail()
          Gets the email address for this user.
 java.lang.String getEncodedPassword()
          Gets the Encoded Password.
 java.lang.String getFullName()
          Gets the Full Name for this user.
 java.util.Date getLastLoginDate()
          Get the Last Successful Login Date for this account.
 java.util.Date getLastPasswordChange()
          Gets the Date of the Last Password Change.
 java.lang.String getPassword()
          Gets the Raw (unencoded) Password.
 java.util.List getPreviousEncodedPasswords()
          Gets the list of previous password (in encoded format).
 java.lang.Object getPrincipal()
          This is the object used to track the user within the provider.
 java.lang.String getUsername()
          Gets the User Name for this user.
 boolean isLocked()
          Determines if this user account is locked from use or not.
 boolean isPasswordChangeRequired()
          Determines if this user account must change their password on next login.
 boolean isPermanent()
          Gets the flag indicating if this user is a permanent user or not.
 boolean isValidated()
          Gets the flag indicating if this user has been validated (or not)
 void setCountFailedLoginAttempts(int count)
          Set the count of failed login attempts.
 void setEmail(java.lang.String address)
          Sets the email address for this user.
 void setEncodedPassword(java.lang.String encodedPassword)
          Sets the Encoded Password.
 void setFullName(java.lang.String name)
          Sets the Full Name for this user.
 void setLastLoginDate(java.util.Date date)
          Sets the Last Successful Login Date for this account.
 void setLastPasswordChange(java.util.Date passwordChangeDate)
          Sets the Last Password Change Date.
 void setLocked(boolean locked)
          Sets the locked state of this account.
 void setPassword(java.lang.String rawPassword)
          Sets the raw (unencoded) password for this user.
 void setPasswordChangeRequired(boolean changeRequired)
          Sets the flag to indicate if this user must change their password on next login.
 void setPermanent(boolean permanent)
          Sets the permanent flag for this user.
 void setPreviousEncodedPasswords(java.util.List encodedPasswordList)
          Sets the list of previous passwords (in encoded format)
 void setUsername(java.lang.String name)
          Sets the User Name for this user.
 void setValidated(boolean valid)
          Sets the flag indicating if this user has been validated (or not)
 

Field Detail

ROLE

static final java.lang.String ROLE
The Plexus ROLE for this interface.

Method Detail

getPrincipal

java.lang.Object getPrincipal()
This is the object used to track the user within the provider.

Returns:
the principal for this user.

getUsername

java.lang.String getUsername()
Gets the User Name for this user. This field is required, and should never be empty.

Returns:
the user name.

setUsername

void setUsername(java.lang.String name)
Sets the User Name for this user. This field is required, and should never be empty.

Parameters:
name - the user name.

getFullName

java.lang.String getFullName()
Gets the Full Name for this user. This field is required, and should never be empty.

Returns:
the full name.

setFullName

void setFullName(java.lang.String name)
Sets the Full Name for this user. This field is required, and should never be empty.

Parameters:
name - the full name.

getEmail

java.lang.String getEmail()
Gets the email address for this user. This field is required, and should never be empty.

Returns:
the email address.

setEmail

void setEmail(java.lang.String address)
Sets the email address for this user. This field is required, and should never be empty.

Parameters:
address - the email address.

getPassword

java.lang.String getPassword()
Gets the Raw (unencoded) Password. Used only on password change requests.

Notes for User Providers

  1. Providers need to look for a value in here to indicate if the user is intending to change their password.
  2. The providers of this interface need to use this field, encode the password, place it's value into the encodedPassword field, and clear out the raw unencoded password field.
  3. This field should never be stored on disk.

Returns:
the raw encoded password.

setPassword

void setPassword(java.lang.String rawPassword)
Sets the raw (unencoded) password for this user.

Parameters:
rawPassword - the raw unencoded password for this user.
See Also:
getPassword()

getEncodedPassword

java.lang.String getEncodedPassword()
Gets the Encoded Password.

Returns:
the encoded password.

setEncodedPassword

void setEncodedPassword(java.lang.String encodedPassword)
Sets the Encoded Password. This field is populated by the UserManager process.

Parameters:
encodedPassword -

getLastPasswordChange

java.util.Date getLastPasswordChange()
Gets the Date of the Last Password Change. Used by password management policies to enforce password expiration rules.

Returns:
the date of the last password change.

setLastPasswordChange

void setLastPasswordChange(java.util.Date passwordChangeDate)
Sets the Last Password Change Date. This field is populated by the UserManager process.

Parameters:
passwordChangeDate - the date that the last password change occured.

getPreviousEncodedPasswords

java.util.List getPreviousEncodedPasswords()
Gets the list of previous password (in encoded format). Used by password management policies to enforce password reuse rules.

Returns:
the list of String objects. Represents previous passwords (in encoded format).

setPreviousEncodedPasswords

void setPreviousEncodedPasswords(java.util.List encodedPasswordList)
Sets the list of previous passwords (in encoded format)

Parameters:
encodedPasswordList - (list of String objects.) the previously passwords in encoded format.

addPreviousEncodedPassword

void addPreviousEncodedPassword(java.lang.String encodedPassword)
Add encoded password to previously passwords in encoded format.

Parameters:
encodedPassword - the encoded password to add.

isPermanent

boolean isPermanent()
Gets the flag indicating if this user is a permanent user or not. Usually Root / Admin / Guest users are flagged as such.


setPermanent

void setPermanent(boolean permanent)
Sets the permanent flag for this user. Users such as Root / Admin / Guest are typically flagged as permanent.

Parameters:
permanent - true if permanent.

isLocked

boolean isLocked()
Determines if this user account is locked from use or not. This state is set from an administrative point of view, or due to excessive failed login attempts.

Returns:
true if account is locked.

setLocked

void setLocked(boolean locked)
Sets the locked state of this account.

Parameters:
locked - true if account is to be locked.

isPasswordChangeRequired

boolean isPasswordChangeRequired()
Determines if this user account must change their password on next login.

Returns:
true if user must change password on next login.

setPasswordChangeRequired

void setPasswordChangeRequired(boolean changeRequired)
Sets the flag to indicate if this user must change their password on next login.

Parameters:
changeRequired - true if user must change password on next login.

isValidated

boolean isValidated()
Gets the flag indicating if this user has been validated (or not)

Returns:
true if validated.

setValidated

void setValidated(boolean valid)
Sets the flag indicating if this user has been validated (or not)

Parameters:
valid - true if validated.

getCountFailedLoginAttempts

int getCountFailedLoginAttempts()
Get Count of Failed Login Attempts.

Returns:
the count of failed login attempts.

setCountFailedLoginAttempts

void setCountFailedLoginAttempts(int count)
Set the count of failed login attempts.

Parameters:
count - the count of failed login attempts.

getAccountCreationDate

java.util.Date getAccountCreationDate()
Get the Creation Date for this account.

Returns:
the date of creation for this account.

getLastLoginDate

java.util.Date getLastLoginDate()
Get the Last Successful Login Date for this account.

Returns:
the date of the last successful login

setLastLoginDate

void setLastLoginDate(java.util.Date date)
Sets the Last Successful Login Date for this account.



Copyright © 2006-2008 Codehaus. All Rights Reserved.