Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.webservices.server
Class ProfileServiceImpl

java.lang.Object
  extended by com.jivesoftware.forum.webservices.server.ProfileServiceImpl
All Implemented Interfaces:
ProfileService

public class ProfileServiceImpl
extends java.lang.Object
implements ProfileService


Constructor Summary
ProfileServiceImpl()
           
 
Method Summary
 User createUser(java.lang.String username, java.lang.String password, java.lang.String email)
          Create a new user.
 void deleteUser(long userID)
          Delete the user with the specified id.
 void deleteUserProperty(java.lang.String name, long userID)
          Delete an extended property from a user.
 User getUser(long id)
          Returns a user by its id.
 User getUserByEmailAddress(java.lang.String emailAddress)
          Returns a user object corresponding to the email address given.
 User getUserByUsername(java.lang.String username)
          Returns a user by its username.
 int getUserCount()
          Returns the number of users in the system.
 Property[] getUserProperties(long userID)
          Return all extended properties for the user with the specified id.
 User[] getUsers()
          Returns the IDs of the first 1000 users.
 User[] getUsersBounded(int startIndex, int numResults)
          Returns the IDs of users begining at startIndex and until the number results equals numResults.
 User[] getUsersByEmailAddress(java.lang.String emailAddress)
          Returns an array user objects corresponding to the email address given.
 void setUserProperty(java.lang.String name, java.lang.String value, long userID)
          Set an extended property for a user.
 void updateUser(User user)
          Used to update user information in the system.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProfileServiceImpl

public ProfileServiceImpl()
Method Detail

getUserCount

public int getUserCount()
Description copied from interface: ProfileService
Returns the number of users in the system.

Specified by:
getUserCount in interface ProfileService
Returns:
The number of users in the system.

getUsersBounded

public User[] getUsersBounded(int startIndex,
                              int numResults)
Description copied from interface: ProfileService
Returns the IDs of users begining at startIndex and until the number results equals numResults.

Specified by:
getUsersBounded in interface ProfileService
Parameters:
startIndex - The startIndex to grab results from.
numResults - The total number of results to be returned.
Returns:
An array of User IDs.

getUsers

public User[] getUsers()
Description copied from interface: ProfileService
Returns the IDs of the first 1000 users.

Specified by:
getUsers in interface ProfileService
Returns:
An array of user IDs.

getUser

public User getUser(long id)
             throws UserNotFoundException
Description copied from interface: ProfileService
Returns a user by its id.

Specified by:
getUser in interface ProfileService
Parameters:
id - The id of the user.
Returns:
The user with the matching id.
Throws:
UserNotFoundException

getUserByUsername

public User getUserByUsername(java.lang.String username)
                       throws UserNotFoundException
Description copied from interface: ProfileService
Returns a user by its username.

Specified by:
getUserByUsername in interface ProfileService
Parameters:
username - The username of the user.
Returns:
The user maching the username.
Throws:
UserNotFoundException

updateUser

public void updateUser(User user)
                throws UserNotFoundException
Description copied from interface: ProfileService
Used to update user information in the system.

Specified by:
updateUser in interface ProfileService
Parameters:
user - User information to update.
Throws:
UserNotFoundException

createUser

public User createUser(java.lang.String username,
                       java.lang.String password,
                       java.lang.String email)
                throws UserAlreadyExistsException
Description copied from interface: ProfileService
Create a new user.

Specified by:
createUser in interface ProfileService
Parameters:
username - The name of user.
password - The password for the user.
email - The email address of the user.
Returns:
The newly created user.
Throws:
UserAlreadyExistsException

deleteUser

public void deleteUser(long userID)
                throws UserNotFoundException
Description copied from interface: ProfileService
Delete the user with the specified id.

Specified by:
deleteUser in interface ProfileService
Parameters:
userID - The id of the user to delete.
Throws:
UserNotFoundException

getUserProperties

public Property[] getUserProperties(long userID)
                             throws UserNotFoundException
Description copied from interface: ProfileService
Return all extended properties for the user with the specified id.

Specified by:
getUserProperties in interface ProfileService
Parameters:
userID - The user's id.
Returns:
All the user's extended properties.
Throws:
UserNotFoundException

setUserProperty

public void setUserProperty(java.lang.String name,
                            java.lang.String value,
                            long userID)
                     throws UserNotFoundException
Description copied from interface: ProfileService
Set an extended property for a user.

Specified by:
setUserProperty in interface ProfileService
Parameters:
name - The name of the extended property.
value - The value of the extended property.
userID - The user to set an extended property for.
Throws:
UserNotFoundException

deleteUserProperty

public void deleteUserProperty(java.lang.String name,
                               long userID)
                        throws UserNotFoundException
Description copied from interface: ProfileService
Delete an extended property from a user.

Specified by:
deleteUserProperty in interface ProfileService
Parameters:
name - Name of the extended property to delete.
userID - The id of the user to delete the extended property from.
Throws:
UserNotFoundException - Thrown if the specified user didn't exist.

getUserByEmailAddress

public User getUserByEmailAddress(java.lang.String emailAddress)
                           throws UserNotFoundException
Description copied from interface: ProfileService
Returns a user object corresponding to the email address given. If multiple users are found, returns the first instance.

Specified by:
getUserByEmailAddress in interface ProfileService
Parameters:
emailAddress - The email address of the user.
Returns:
The User with the matching email address.
Throws:
UserNotFoundException

getUsersByEmailAddress

public User[] getUsersByEmailAddress(java.lang.String emailAddress)
Description copied from interface: ProfileService
Returns an array user objects corresponding to the email address given. There is not a uniqueness guarantee for an email address.

Specified by:
getUsersByEmailAddress in interface ProfileService
Parameters:
emailAddress - The email address of the user.
Returns:
The User with the matching email address.

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.