org.apache.jetspeed.portlet
Interface User


public interface User

The User interface is an abstract view on the user-specific data. Apart from a set of pre-defined, fixed set of attributes, the interface gives access to user data as well.

Since:
4.1

Method Summary
 java.lang.Object getAttribute(java.lang.String name)
          Returns the value of the attribute for the specified name, or null if no such attribute exists.
 java.util.Enumeration getAttributeNames()
          Returns an enumeration of all available attribute names.
 java.lang.String getFamilyName()
          Returns the user's family name (aka last name).
 java.lang.String getFullName()
          Returns the user's full name, or null if the full name is not available.
 java.lang.String getGivenName()
          Returns the user's given name (aka first name), or null if the given name is not available.
 java.lang.String getID()
          Returns the internal unique user id.
 long getLastLoginTime()
          Returns the point of time that this user was last logged in, or null if this information is not available.
 java.lang.String getNickName()
          Returns the user's nickname, or null if the nickname is not available.
 java.lang.String getUserID()
          Returns the user id, or null if the user id is not available.
 boolean isModifiable()
          Returns the status if it is possible to change the user's data.
 void setAttribute(java.lang.String name, java.lang.Object value)
          Sets the value of the attribute.
 void setFamilyName(java.lang.String familyName)
          Sets the user's family name (aka last name).
 void setGivenName(java.lang.String givenName)
          Sets the user's given name (aka first name).
 void setNickName(java.lang.String nickName)
          Sets the user's nickname.
 void setUserID(java.lang.String userID)
          Sets the user's id.
 

Method Detail

getID

java.lang.String getID()
Returns the internal unique user id.

Returns:
the internal unique user id.

getUserID

java.lang.String getUserID()
Returns the user id, or null if the user id is not available.

Returns:
the user id

getGivenName

java.lang.String getGivenName()
Returns the user's given name (aka first name), or null if the given name is not available.

Returns:
the given name (aka first name)

getFamilyName

java.lang.String getFamilyName()
Returns the user's family name (aka last name).

Returns:
the user's family name (aka last name)

getFullName

java.lang.String getFullName()
Returns the user's full name, or null if the full name is not available.

The full name contains given name, family name, and possibly a title or suffix. Therefore, the full name may be different from the concatenation of given and family name.

Returns:
the full name

getNickName

java.lang.String getNickName()
Returns the user's nickname, or null if the nickname is not available.

Returns:
the user's nickname.

getLastLoginTime

long getLastLoginTime()
Returns the point of time that this user was last logged in, or null if this information is not available. The time is returned in number of milliseconds since January 1, 1970 GMT.

Returns:
the last login time.

getAttribute

java.lang.Object getAttribute(java.lang.String name)
Returns the value of the attribute for the specified name, or null if no such attribute exists.

Parameters:
name - the attribute name.
Returns:
the attribute value.

getAttributeNames

java.util.Enumeration getAttributeNames()
Returns an enumeration of all available attribute names.

Returns:
an enumeration of attribute names.

setUserID

void setUserID(java.lang.String userID)
Sets the user's id.

Parameters:
userID - the user's id

setGivenName

void setGivenName(java.lang.String givenName)
Sets the user's given name (aka first name).

Parameters:
givenName - the user's given name (aka first name).

setFamilyName

void setFamilyName(java.lang.String familyName)
Sets the user's family name (aka last name).

Parameters:
familyName - the user's family name (aka last name).

setNickName

void setNickName(java.lang.String nickName)
Sets the user's nickname.

Parameters:
nickName - the user's nickname.

setAttribute

void setAttribute(java.lang.String name,
                  java.lang.Object value)
Sets the value of the attribute.

Parameters:
name - the attribute name.
value - the attribute value.

isModifiable

boolean isModifiable()
Returns the status if it is possible to change the user's data.

Returns:
true if the user's data can be changed, and false if they cannot be changed.