com.ecyrd.jspwiki.auth.user
Interface UserProfile

All Known Implementing Classes:
DefaultUserProfile

public interface UserProfile

Class for representing wiki user information, such as the login name, full name, wiki name, and e-mail address.

Since:
2.3
Version:
$Revision: 1.4 $ $Date: 2005/10/19 04:11:53 $
Author:
Andrew Jaquith

Method Summary
 boolean equals(Object o)
           
 Date getCreated()
          Returns the creation date.
 String getEmail()
          Returns the user's e-mail address.
 String getFullname()
          Returns the user's full name.
 Date getLastModified()
          Returns the last-modified date.
 String getLoginName()
          Returns the user's login name.
 String getPassword()
          Returns the user password for use with custom authentication.
 String getWikiName()
          Returns the user's wiki name.
 boolean isNew()
          Returns true if the profile has never been saved before.
 void setCreated(Date date)
          Sets the created date.
 void setEmail(String email)
          Sets the user's e-mail address.
 void setFullname(String arg)
          Sets the user's full name.
 void setLastModified(Date date)
          Sets the last-modified date
 void setLoginName(String name)
          Sets the name by which the user logs in.
 void setPassword(String arg)
          Sets the user's password for use with custom authentication.
 void setWikiName(String name)
          Sets the user's wiki name.
 String toString()
          Returns a string representation of this user profile.
 

Method Detail

equals

boolean equals(Object o)
Overrides:
equals in class Object

getCreated

Date getCreated()
Returns the creation date.

Returns:
the creation date

getEmail

String getEmail()
Returns the user's e-mail address.

Returns:
the e-mail address

getFullname

String getFullname()
Returns the user's full name.

Returns:
the full name

getLastModified

Date getLastModified()
Returns the last-modified date.

Returns:
the date and time of last modification

getLoginName

String getLoginName()
Returns the user's login name.

Returns:
the login name

getPassword

String getPassword()
Returns the user password for use with custom authentication. Note that the password field is not meaningful for container authentication; the user's private credentials are generally stored elsewhere. While it depends on the UserDatabaseimplementation, in most cases the value returned by this method will be a password hash, not the password itself.

Returns:
the password

getWikiName

String getWikiName()
Returns the user's wiki name.

Returns:
the wiki name.

isNew

boolean isNew()
Returns true if the profile has never been saved before. Implementing classes might check the last modified date, for example, to determine this.


setCreated

void setCreated(Date date)
Sets the created date.

Parameters:
date - the creation date

setEmail

void setEmail(String email)
Sets the user's e-mail address.

Parameters:
email - the e-mail address

setFullname

void setFullname(String arg)
Sets the user's full name. For example, "Janne Jalkanen."

Parameters:
arg - the full name

setLastModified

void setLastModified(Date date)
Sets the last-modified date

Parameters:
date - the last-modified date

setLoginName

void setLoginName(String name)
Sets the name by which the user logs in. The login name is used as the username for custom authentication (see AuthenticationManager.login(WikiSession, String, String), UserDatabaseLoginModule). The login name is typically a short name ("jannej"). In contrast, the wiki name is typically of type FirstnameLastName ("JanneJalkanen").

Parameters:
name - the login name

setPassword

void setPassword(String arg)
Sets the user's password for use with custom authentication. It is not the responsibility of implementing classes to hash the password; that responsibility is borne by the UserDatabase implementation during save operations (see UserDatabase.save(UserProfile)). Note that the password field is not meaningful for container authentication; the user's private credentials are generally stored elsewhere.

Parameters:
arg - the password

setWikiName

void setWikiName(String name)
Sets the user's wiki name. This is typically of type FirstnameLastName ("JanneJalkanen").

Parameters:
name - the wiki name

toString

String toString()
Returns a string representation of this user profile.

Overrides:
toString in class Object
Returns:
the string