Clearspace API (1.10.16) Core Javadocs

com.jivesoftware.spi.user
Interface User

All Known Implementing Classes:
UserTemplate

public interface User

The interface User is used to identify a user and provide authentication. Classes implementing the interface must support the following methods

The setter methods can throw unsupported exception and will only be called when the UserProvider implementation return true from the supportUpdate() method.

See Also:
UserProvider

Method Summary
 boolean authenticate(char[] password)
          Authenticate the user with the given password
 java.lang.String getEmail()
          User's email address
 java.lang.String getID()
          Returns the unique identifier for this user.
 char[] getPassword()
          return user's password
 java.lang.String getPasswordHash()
          return user's password hash
 java.lang.String getUsername()
          returns the username
 void setEmail(java.lang.String email)
          Set user's email address
 void setId(java.lang.String id)
          Sets the user's unique id.
 void setPassword(char[] password)
          Set the password
 void setPasswordHash(java.lang.String hash)
          Set the password hash
 void setUsername(java.lang.String username)
          Sets the username.
 

Method Detail

authenticate

boolean authenticate(char[] password)
Authenticate the user with the given password

Parameters:
password - password
Returns:
true if the password matches

getID

java.lang.String getID()
Returns the unique identifier for this user.

Returns:
id

setId

void setId(java.lang.String id)
           throws java.lang.UnsupportedOperationException
Sets the user's unique id.

Parameters:
id - user's id
Throws:
java.lang.UnsupportedOperationException - if the operation is not implemented by the provider

getUsername

java.lang.String getUsername()
returns the username

Returns:
username username

setUsername

void setUsername(java.lang.String username)
                 throws java.lang.UnsupportedOperationException
Sets the username.

Parameters:
username - username
Throws:
java.lang.UnsupportedOperationException - if the operation is not implemented by the provider

getEmail

java.lang.String getEmail()
User's email address

Returns:
email email address

setEmail

void setEmail(java.lang.String email)
              throws java.lang.UnsupportedOperationException
Set user's email address

Parameters:
email - email address
Throws:
java.lang.UnsupportedOperationException - the operation is not implemented

getPassword

char[] getPassword()
                   throws java.lang.UnsupportedOperationException
return user's password

Returns:
password passwords
Throws:
java.lang.UnsupportedOperationException - the operation is not implemented

setPassword

void setPassword(char[] password)
                 throws java.lang.UnsupportedOperationException
Set the password

Parameters:
password - new password
Throws:
java.lang.UnsupportedOperationException - the operation is not implemented

getPasswordHash

java.lang.String getPasswordHash()
                                 throws java.lang.UnsupportedOperationException
return user's password hash

Returns:
hash password hash
Throws:
java.lang.UnsupportedOperationException - the operation is not implemented

setPasswordHash

void setPasswordHash(java.lang.String hash)
                     throws java.lang.UnsupportedOperationException
Set the password hash

Parameters:
hash - password hash
Throws:
java.lang.UnsupportedOperationException - the operation is not implemented

Clearspace Project Page

Copyright © 1999-2007 Jive Software.