Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.webservices.server
Class AddressBookServiceImpl

java.lang.Object
  extended by com.jivesoftware.forum.webservices.server.AddressBookServiceImpl
All Implemented Interfaces:
AddressBookService

public class AddressBookServiceImpl
extends java.lang.Object
implements AddressBookService


Constructor Summary
AddressBookServiceImpl()
           
 
Method Summary
 void addUser(long userId, java.lang.String usernameToAdd)
          Adds the specified username to the users addressbook.
 void addUsers(long userId, long[] userIdsToAdd)
          Adds a list of users to an addressbook.
 User[] getRoster(long userID)
          Retrieves the private message addressbook for the specified user.
 void removeUser(long userId, java.lang.String usernameToRemove)
          Removes a username from the addressbook of a specified user.
 void removeUsers(long userId, long[] userIdsToRemove)
          Removes the list of specified userIds from a users addressbook.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AddressBookServiceImpl

public AddressBookServiceImpl()
Method Detail

getRoster

public User[] getRoster(long userID)
                 throws UserNotFoundException
Retrieves the private message addressbook for the specified user.

Specified by:
getRoster in interface AddressBookService
Parameters:
userID - of the user's addressbook to retrieve
Returns:
users in contained in the addressbook
Throws:
UserNotFoundException - if the user specified does not exist

addUser

public void addUser(long userId,
                    java.lang.String usernameToAdd)
             throws UserNotFoundException
Adds the specified username to the users addressbook.

Specified by:
addUser in interface AddressBookService
Parameters:
userId - associated with the addressbook to manipulate
usernameToAdd - username of the user to add to this addressbook
Throws:
UserNotFoundException - if either the user associated with the userId or the usernameToAdd does not exist

addUsers

public void addUsers(long userId,
                     long[] userIdsToAdd)
              throws UserNotFoundException
Adds a list of users to an addressbook. If the array of userIds contains an invalid userId, the UserNotFoundException is caught and ignored. The UserNotFoundException will be thrown if the userId is not valid.

Specified by:
addUsers in interface AddressBookService
Parameters:
userId - associated with the addressbook to manipulate
userIdsToAdd - list of userIds to add to the addressbook
Throws:
UserNotFoundException - if the user related to userId is not found.

removeUser

public void removeUser(long userId,
                       java.lang.String usernameToRemove)
                throws UserNotFoundException
Removes a username from the addressbook of a specified user.

Specified by:
removeUser in interface AddressBookService
Parameters:
userId - of the associated addressbook to operate on
usernameToRemove - username to remove from the addressbook
Throws:
UserNotFoundException - if the userId or username is not a valid user.

removeUsers

public void removeUsers(long userId,
                        long[] userIdsToRemove)
                 throws UserNotFoundException
Removes the list of specified userIds from a users addressbook. Note, that an invalid userId in the remove list is caught and skipped. However, specifying an invalid userId is thrown and not caught.

Specified by:
removeUsers in interface AddressBookService
Parameters:
userId - of the associated addressbook to operate on
userIdsToRemove - list of userIds to remove from the addressbook
Throws:
UserNotFoundException - if the userId specified is not a valid userId.

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.