Jive Forums API (5.5.20.2-oracle) Web Services Client Javadocs

com.jivesoftware.forum.webservices
Class User

java.lang.Object
  extended by com.jivesoftware.forum.webservices.User

public class User
extends java.lang.Object

Provides information about and services for users of the system. Users can be identified by a unique id or username. Users can also be organized into groups for easier management of permissions.


Constructor Summary
User()
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.util.Date getCreationDate()
          Returns the date that the user was created.
 java.lang.String getEmail()
          Returns the user's email address.
 long getID()
          Returns the user's id.
 java.util.Date getModificationDate()
          Returns the date that the user was last modified.
 java.lang.String getName()
          Returns the user's name.
 java.lang.String getPassword()
           
 java.lang.String getPasswordHash()
          Returns the user's password in hashed form.
 java.lang.String getUsername()
          Returns the user's username.
 int hashCode()
           
 boolean isEmailVisible()
          Returns true if the user has chosen to make her email visible to other users.
 boolean isNameVisible()
          Returns true if the user has chosen to make her name visible to other users.
 void setCreationDate(java.util.Date creationDate)
          Sets the creation date of the user.
 void setEmail(java.lang.String email)
          Sets the user's email address.
 void setEmailVisible(boolean visible)
          Sets whether a user's email is visible to other users.
 void setID(long id)
           
 void setModificationDate(java.util.Date modificationDate)
          Sets the date the user was last modified.
 void setName(java.lang.String name)
          Sets the user's name.
 void setNameVisible(boolean visible)
          Sets whether a user's name is visible to other users.
 void setPassword(java.lang.String password)
          Sets the users's password.
 void setPasswordHash(java.lang.String passwordHash)
          Sets the user's password in hashed form.
 void setUsername(java.lang.String username)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

User

public User()
Method Detail

getID

public long getID()
Returns the user's id. All ids must be unique in the system.

Returns:
the user's id.

setID

public void setID(long id)

getUsername

public java.lang.String getUsername()
Returns the user's username. All usernames must be unique in the system.

Returns:
the username of the user.

setUsername

public void setUsername(java.lang.String username)

getName

public java.lang.String getName()
Returns the user's name. The user's name does not have to be to be unique in the system. Some users may opt to not let others see their name for privacy reasons. In that case, the user can set nameVisible to false. In that case, a call to this method will return null.

Returns:
the name of the user.

setName

public void setName(java.lang.String name)
Sets the user's name. The user's name does not have to be to be unique in the system.

Parameters:
name - new name for the user.
Throws:
UnauthorizedException - if does not have administrator permissions.

isNameVisible

public boolean isNameVisible()
Returns true if the user has chosen to make her name visible to other users. If the name is not visible, calling getName() will throw an UnauthorizedException.

Returns:
true if the name is visible to other users.

setNameVisible

public void setNameVisible(boolean visible)
Sets whether a user's name is visible to other users. If the field is set to not be visible, calling getName() will throw an UnauthorizedException.

Parameters:
visible - boolean value to determin if the name should be visible.
Throws:
UnauthorizedException - if does not have administrator permissions.

setPassword

public void setPassword(java.lang.String password)
Sets the users's password. The password should be passed in as plain text. The way the password is stored is implementation dependent. However, it is recommended to at least hash passwords with an algorithm such as MD5.

Parameters:
password - new password for the user.
Throws:
UnauthorizedException - if does not have administrator permissions.

getPassword

public java.lang.String getPassword()

getPasswordHash

public java.lang.String getPasswordHash()
Returns the user's password in hashed form. This method is only intended for system administration functions and can be ignored by skin writers.

If your back-end user store does not support this operation, throw an UnsupportedOperationException.

Returns:
the hashed password.
Throws:
UnauthorizedException - if does not have administrator permissions.

setPasswordHash

public void setPasswordHash(java.lang.String passwordHash)
Sets the user's password in hashed form. This method is only intended for system administration functions and can be ignored by skin writers.

If your back-end user store does not support this operation, throw an UnsupportedOperationException.

Parameters:
passwordHash - the hashedPassword for the user.
Throws:
UnauthorizedException - if does not have administrator permissions.

getEmail

public java.lang.String getEmail()
Returns the user's email address. Email should be considered to be a required field of a user account since it is critical to many user operations performing. If the user sets emailVisible to false, this method will always return null.

If your back-end user store does not support this operation, always return null.

Returns:
the email address of the user.

setEmail

public void setEmail(java.lang.String email)
Sets the user's email address. Email should be considered to be a required field of a user account since it is critical to many user operations performing.

If your back-end user store does not support this operation, throw an UnsupportedOperationException.

Parameters:
email - new email address for the user.
Throws:
UnauthorizedException - if does not have administrator permissions.

isEmailVisible

public boolean isEmailVisible()
Returns true if the user has chosen to make her email visible to other users. If the email field is not visible, calling getEmail() will throw an UnauthorizedException.

Returns:
true if the name is visible to other users.

setEmailVisible

public void setEmailVisible(boolean visible)
Sets whether a user's email is visible to other users. If the field is set to not be visible, calling getEmail() will throw an UnauthorizedException.

Parameters:
visible - boolean value to determin if the name should be visible.
Throws:
UnauthorizedException - if does not have administrator permissions.

getCreationDate

public java.util.Date getCreationDate()
Returns the date that the user was created.

If your back-end user store does not support this operation, throw an UnsupportedOperationException.

Returns:
the date the user was created.

setCreationDate

public void setCreationDate(java.util.Date creationDate)
Sets the creation date of the user. In most cases, the creation date will default to when the user was entered into the system. However, the date needs to be set manually when importing data. In other words, skin authors should ignore this method since it only intended for system maintenance.

Parameters:
creationDate - the date the user was created.
Throws:
UnauthorizedException - if does not have administrator permissions.

getModificationDate

public java.util.Date getModificationDate()
Returns the date that the user was last modified.

Returns:
the date the user record was last modified.

setModificationDate

public void setModificationDate(java.util.Date modificationDate)
Sets the date the user was last modified. Skin authors should ignore this method since it only intended for system maintenance.

Parameters:
modificationDate - the date the user was modified.
Throws:
UnauthorizedException - if does not have administrator permissions.

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.