Clearspace API (1.10.14) Web Services Client Javadocs

com.jivesoftware.community.webservices
Interface PollService


public interface PollService


Method Summary
 void addAnonymousVote(long pollID, int index, java.lang.String uniqueID)
          Add a guest vote for an option in the poll.
 void addOption(long pollID, java.lang.String value)
          Add a new option to the poll.
 void addUserVote(long pollID, int index, long userID)
          Add a user vote for an option in the poll.
 void changeAnonymousVote(long pollID, int prevOptionIndex, int newOptionIndex, java.lang.String uniqueID)
          Change a guest vote.
 void changeUserVote(long pollID, int prevOptionIndex, int newOptionIndex, long userID)
          Change a user vote.
 Poll createPoll(int objectType, long objectID, long userID, java.lang.String name)
           
 void deleteOption(long pollID, int index)
          Remove an option from the poll.
 void deletePoll(long pollID)
          Deletes a poll.
 int getActivePollCount()
          Returns a count of all active polls in the system.
 int getActivePollCount(int objectType, long objectID)
          Returns a count of all active polls of a given type and object ID.
 Poll[] getActivePolls()
          Returns an iterable of active polls in the system.
 Poll[] getActivePolls(int objectType, long objectID)
          Returns an iterable of active polls associated with the object specified by the objectType and objectID.
 int getAnonymousVoteCount(long pollID)
          Returns a count of all guests user votes for all options in the poll.
 int getAnonymousVoteCount(long pollID, int index)
          Returns a count of all user votes for the specified option in the poll.
 int[] getAnonymousVoteIndices(long pollID, java.lang.String uniqueID)
          Returns a list of option indexes corresponding to the anonymous votes, or an empty array if the user has not voted.
 java.lang.String[] getAnonymousVotes(long pollID)
          Returns a list of uniqueID's for guests who have voted for the option at the given index.
 java.lang.String[] getAnonymousVotes(long pollID, int index)
          Returns an Iterator of uniqueID's for guests who have voted for the option at the given index.
 int getLivePollCount()
          Returns a count of all live polls in the system.
 int getLivePollCount(int objectType, long objectID)
          Returns a count of all live polls of a given type and object ID.
 Poll[] getLivePolls()
          Returns a List of live polls in the system.
 Poll[] getLivePolls(int objectType, long objectID)
          Returns an iterable of live polls associated with the object specified by the objectType and objectID.
 Poll getPoll(long pollID)
          Returns the Poll specified by the poll ID.
 int getPollCount()
          Returns a count of all polls, both active and inactive.
 int getPollCount(int objectType, long objectID)
          Returns an count of polls, both active and inactive, associated with the object specified by the objectType and objectID.
 Poll[] getPolls()
          Returns an iterable of all polls, both active and inactive.
 Poll[] getPolls(int objectType, long objectID)
          Returns an iterable of polls, both active and inactive, associated with the object specified by the objectType and objectID.
 int getUserVoteCount(long pollID)
          Returns a count of all user votes for all options in the poll.
 int getUserVoteCount(long pollID, int index)
          Returns a count of all user votes for the specified option in the poll.
 int[] getUserVoteIndices(long pollID, long userID)
          Returns a list of option indexes corresponding to the user votes, or an empty array if the user has not voted.
 User[] getUserVotes(long pollID)
          Returns a List of User objects for users who have voted for any options in the poll.
 User[] getUserVotes(long pollID, int index)
          Returns a list of User objects for users who have voted for the option at the given index.
 int getVoteCount(long pollID)
          Returns a count of all votes (both guest and user votes) for all options in the poll.
 int getVoteCount(long pollID, int index)
          Returns a count of all votes (both guest and user votes) for the specified option in the poll.
 boolean hasAnonymousVoted(long pollID, java.lang.String uniqueID)
          Returns true if the guest associated with the uniqueID has previously voted in the poll, false otherwise.
 boolean hasUserVoted(long pollID, long userID)
          Returns true if the user specified has previously voted in the poll, false otherwise.
 boolean isModeEnabled(long pollID, long mode)
          Returns true if the mode specified is enabled for the poll, false otherwise.
 void removeAnonymousVote(long pollID, int prevOptionIndex, java.lang.String uniqueID)
          Remove a guest vote.
 void removeUserVote(long pollID, int prevOptionIndex, long userID)
          Remove a user vote.
 void setDescription(long pollID, java.lang.String description)
          Sets the description of the poll.
 void setEndDate(long pollID, java.util.Date endDate)
          Sets the date the poll should end.
 void setExpirationDate(long pollID, java.util.Date expireDate)
          Sets the date the poll should expire.
 void setMode(long pollID, long mode, boolean enabled)
          Sets a mode to be enabled or disabled for the poll.
 void setName(long pollID, java.lang.String name)
          Sets the name of the poll.
 void setOption(long pollID, int index, java.lang.String value)
          Sets the text of the option at the specified index.
 void setOptionIndex(long pollID, int currentIndex, int newIndex)
          Moves the option's index.
 boolean setStartDate(long pollID, java.util.Date startDate)
          Sets the date voting for the poll should start.
 

Method Detail

createPoll

Poll createPoll(int objectType,
                long objectID,
                long userID,
                java.lang.String name)
                throws UserNotFoundException
Throws:
UserNotFoundException

getPoll

Poll getPoll(long pollID)
             throws UnauthorizedException,
                    com.jivesoftware.community.NotFoundException
Returns the Poll specified by the poll ID.

Parameters:
pollID - the id of the poll to return.
Returns:
the Poll specified by the pollID.
Throws:
UnauthorizedException - if no permissions to view the poll.
com.jivesoftware.community.NotFoundException - if the poll of the given ID was not found.

deletePoll

void deletePoll(long pollID)
                throws UnauthorizedException,
                       com.jivesoftware.community.PollException,
                       com.jivesoftware.community.NotFoundException
Deletes a poll.

Parameters:
pollID - the poll to delete
Throws:
UnauthorizedException - if no permissions to delete the poll.
com.jivesoftware.community.PollException - if the poll could not be deleted
com.jivesoftware.community.NotFoundException - if the poll is not found

getPollCount

int getPollCount()
Returns a count of all polls, both active and inactive.

Returns:
a count of all polls, both active and inactive.

getPolls

Poll[] getPolls()
Returns an iterable of all polls, both active and inactive. The ordering of the polls is from active to inactive polls and then from newest to oldest in each group.

Returns:
an iterable of all polls, both active and inactive.

getPollCount

int getPollCount(int objectType,
                 long objectID)
                 throws UnauthorizedException
Returns an count of polls, both active and inactive, associated with the object specified by the objectType and objectID.

Parameters:
objectType - the object type of the object the poll is associated with.
objectID - the objectID of the object the poll is associated with.
Returns:
an count of polls, both active and inactive, associated with the object specified by the objectType and objectID.
Throws:
UnauthorizedException - if no permissions to view polls for the specified objectType and objectID.

getPolls

Poll[] getPolls(int objectType,
                long objectID)
                throws UnauthorizedException
Returns an iterable of polls, both active and inactive, associated with the object specified by the objectType and objectID.

Parameters:
objectType - the object type of the object the poll is associated with.
objectID - the objectID of the object the poll is associated with.
Returns:
an iterable of Poll objects for polls, both active and inactive, associated with the object specified by the objectType and objectID.
Throws:
UnauthorizedException - if no permissions to view polls for the specified objectType and objectID.

getActivePolls

Poll[] getActivePolls()
Returns an iterable of active polls in the system. Active polls are defined as polls where the current date is between the poll's start and expire dates.

Returns:
an iterable of active polls in the system.

getActivePollCount

int getActivePollCount()
Returns a count of all active polls in the system. Active polls are defined as polls where the current date is between the poll's start and expire dates.

Returns:
a count of all active polls in the system.

getActivePolls

Poll[] getActivePolls(int objectType,
                      long objectID)
                      throws UnauthorizedException
Returns an iterable of active polls associated with the object specified by the objectType and objectID. Active polls are defined as polls where the current date is between the poll's start and expire dates.

Parameters:
objectType - the object type of the object the poll is associated with.
objectID - the objectID of the object the poll is associated with.
Returns:
an iterable of Poll objects for active polls associated with the object specified by the objectType and objectID.
Throws:
UnauthorizedException - if no permissions to view polls for the specified objectType and objectID.

getActivePollCount

int getActivePollCount(int objectType,
                       long objectID)
Returns a count of all active polls of a given type and object ID. Active polls are defined as polls where the current date is between the poll's start and expire dates.

Parameters:
objectType - the type of object we're looking at (defined in the JiveConstants class.
objectID - the ID of the object we're looking at.
Returns:
a count of all active polls for the given object.

getLivePolls

Poll[] getLivePolls()
Returns a List of live polls in the system. Live polls are defined as polls where the current date is between the poll's start and end dates.

Returns:
an iterable of live polls in the system.

getLivePollCount

int getLivePollCount()
Returns a count of all live polls in the system. Live polls are defined as polls where the current date is between the poll's start and end dates.

Returns:
a count of all live polls in the system.

getLivePolls

Poll[] getLivePolls(int objectType,
                    long objectID)
                    throws UnauthorizedException
Returns an iterable of live polls associated with the object specified by the objectType and objectID. Live polls are defined as polls where the current date is between the poll's start and end dates.

Parameters:
objectType - the object type of the object the poll is associated with.
objectID - the objectID of the object the poll is associated with.
Returns:
an iterable of Poll objects for live polls associated with the object specified by the objectType and objectID.
Throws:
UnauthorizedException - if no permissions to view polls for the specified objectType and objectID.

getLivePollCount

int getLivePollCount(int objectType,
                     long objectID)
                     throws UnauthorizedException
Returns a count of all live polls of a given type and object ID. Live polls are defined as polls where the current date is between the poll's start and end dates.

Parameters:
objectType - the type of object we're looking at (defined in the JiveConstants class.
objectID - the ID of the object we're looking at.
Returns:
a count of all live polls for the given object.
Throws:
UnauthorizedException - if not allowed

isModeEnabled

boolean isModeEnabled(long pollID,
                      long mode)
                      throws com.jivesoftware.community.NotFoundException
Returns true if the mode specified is enabled for the poll, false otherwise. Valid modes are defined as static final constants in this interface.

Parameters:
mode - a valid poll mode
pollID - of the poll we're querying
Returns:
true if the mode specified is enabled for the poll, false otherwise.
Throws:
com.jivesoftware.community.NotFoundException

setStartDate

boolean setStartDate(long pollID,
                     java.util.Date startDate)
                     throws UnauthorizedException,
                            com.jivesoftware.community.NotFoundException
Sets the date voting for the poll should start.

Parameters:
startDate - the date voting for the poll should start.
Returns:
true if succeeded
Throws:
UnauthorizedException - if the user does not have permissions to administer the poll.
com.jivesoftware.community.NotFoundException

setEndDate

void setEndDate(long pollID,
                java.util.Date endDate)
                throws UnauthorizedException,
                       com.jivesoftware.community.NotFoundException
Sets the date the poll should end.

Parameters:
endDate - the date the poll should end.
Throws:
UnauthorizedException - if the user does not have permissions to administer the poll.
com.jivesoftware.community.NotFoundException

setExpirationDate

void setExpirationDate(long pollID,
                       java.util.Date expireDate)
                       throws UnauthorizedException,
                              com.jivesoftware.community.NotFoundException
Sets the date the poll should expire. This date must be on or after the end date. This date is automatically set to the end date by default.

Parameters:
expireDate - the date the poll should expire.
Throws:
UnauthorizedException - if the user does not have permissions to administer the poll.
com.jivesoftware.community.NotFoundException

setName

void setName(long pollID,
             java.lang.String name)
             throws UnauthorizedException,
                    com.jivesoftware.community.NotFoundException
Sets the name of the poll. If the name passed in is null, an IllegalArguementException will be thrown.

Parameters:
name - the new name of the poll.
Throws:
UnauthorizedException - if the user does not have permissions to administer the poll.
com.jivesoftware.community.NotFoundException

setDescription

void setDescription(long pollID,
                    java.lang.String description)
                    throws UnauthorizedException,
                           com.jivesoftware.community.NotFoundException
Sets the description of the poll.

Parameters:
description - the description of the poll.
Throws:
UnauthorizedException - if the user does not have permissions to administer the poll.
com.jivesoftware.community.NotFoundException

setMode

void setMode(long pollID,
             long mode,
             boolean enabled)
             throws UnauthorizedException,
                    com.jivesoftware.community.NotFoundException
Sets a mode to be enabled or disabled for the poll. Valid modes are defined as static final constants in this interface.

Parameters:
mode - a valid mode
enabled - true if the poll should be enabled, false if not
Throws:
UnauthorizedException - if the user does not have permissions to administer the poll.
com.jivesoftware.community.NotFoundException

addOption

void addOption(long pollID,
               java.lang.String value)
               throws UnauthorizedException,
                      com.jivesoftware.community.NotFoundException
Add a new option to the poll. The option will be added to the end of the option list for the poll.

Parameters:
value - the text for the new option.
Throws:
UnauthorizedException - if the user does not have permissions to administer the poll.
com.jivesoftware.community.NotFoundException

deleteOption

void deleteOption(long pollID,
                  int index)
                  throws UnauthorizedException,
                         com.jivesoftware.community.NotFoundException
Remove an option from the poll.

Parameters:
index -
Throws:
UnauthorizedException - if the user does not have permissions to administer the poll.
com.jivesoftware.community.NotFoundException

setOption

void setOption(long pollID,
               int index,
               java.lang.String value)
               throws UnauthorizedException,
                      com.jivesoftware.community.NotFoundException
Sets the text of the option at the specified index.

Parameters:
index - the index of the option to set the text for.
value - the new text for the option.
Throws:
java.lang.IndexOutOfBoundsException - if 0 > index > getOptionCount() - 1
UnauthorizedException - if the user does not have permissions to administer the poll.
com.jivesoftware.community.NotFoundException

setOptionIndex

void setOptionIndex(long pollID,
                    int currentIndex,
                    int newIndex)
                    throws UnauthorizedException,
                           com.jivesoftware.community.NotFoundException
Moves the option's index.

Parameters:
currentIndex - the current index of the option.
newIndex - the new index of the option.
Throws:
java.lang.IndexOutOfBoundsException - if 0 > oldIndex/newIndex > getOptionCount() - 1
UnauthorizedException - if the user does not have permissions to administer the poll.
com.jivesoftware.community.NotFoundException

getVoteCount

int getVoteCount(long pollID)
                 throws com.jivesoftware.community.PollException,
                        com.jivesoftware.community.NotFoundException
Returns a count of all votes (both guest and user votes) for all options in the poll.

Returns:
a count of all votes for all options in the poll.
Throws:
com.jivesoftware.community.PollException - reserved for future changes.
com.jivesoftware.community.NotFoundException

getVoteCount

int getVoteCount(long pollID,
                 int index)
                 throws com.jivesoftware.community.PollException,
                        com.jivesoftware.community.NotFoundException
Returns a count of all votes (both guest and user votes) for the specified option in the poll.

Returns:
a count of all votes for the specified option in the poll.
Throws:
java.lang.IndexOutOfBoundsException - if 0 > index > getOptionCount() - 1
com.jivesoftware.community.PollException - reserved for future changes.
com.jivesoftware.community.NotFoundException

getUserVoteCount

int getUserVoteCount(long pollID)
                     throws com.jivesoftware.community.PollException,
                            com.jivesoftware.community.NotFoundException
Returns a count of all user votes for all options in the poll.

Returns:
a count of all user votes for all options in the poll.
Throws:
com.jivesoftware.community.PollException - reserved for future changes.
com.jivesoftware.community.NotFoundException

getUserVoteCount

int getUserVoteCount(long pollID,
                     int index)
                     throws com.jivesoftware.community.PollException,
                            com.jivesoftware.community.NotFoundException
Returns a count of all user votes for the specified option in the poll.

Returns:
a count of all user votes for the specified option in the poll.
Throws:
java.lang.IndexOutOfBoundsException - if 0 > index > getOptionCount() - 1
com.jivesoftware.community.PollException - reserved for future changes.
com.jivesoftware.community.NotFoundException

getAnonymousVoteCount

int getAnonymousVoteCount(long pollID)
                          throws com.jivesoftware.community.PollException,
                                 com.jivesoftware.community.NotFoundException
Returns a count of all guests user votes for all options in the poll.

Returns:
a count of all guest votes for all options in the poll.
Throws:
com.jivesoftware.community.PollException - reserved for future changes.
com.jivesoftware.community.NotFoundException

getAnonymousVoteCount

int getAnonymousVoteCount(long pollID,
                          int index)
                          throws com.jivesoftware.community.PollException,
                                 com.jivesoftware.community.NotFoundException
Returns a count of all user votes for the specified option in the poll.

Returns:
a count of all user votes for the specified option in the poll.
Throws:
java.lang.IndexOutOfBoundsException - if 0 > index > getOptionCount() - 1
com.jivesoftware.community.PollException - reserved for future changes.
com.jivesoftware.community.NotFoundException

getAnonymousVotes

java.lang.String[] getAnonymousVotes(long pollID)
                                     throws com.jivesoftware.community.PollException,
                                            com.jivesoftware.community.NotFoundException
Returns a list of uniqueID's for guests who have voted for the option at the given index.

Returns:
an Iterator of uniqueID's for guests who have voted for the option at the given index.
Throws:
com.jivesoftware.community.PollException - reserved for future changes.
com.jivesoftware.community.NotFoundException

getAnonymousVotes

java.lang.String[] getAnonymousVotes(long pollID,
                                     int index)
                                     throws com.jivesoftware.community.PollException,
                                            com.jivesoftware.community.NotFoundException
Returns an Iterator of uniqueID's for guests who have voted for the option at the given index.

Parameters:
index - the index to return the voting guests for.
Returns:
an Iterator of uniqueID's for guests who have voted for the option at the given index.
Throws:
java.lang.IndexOutOfBoundsException - if 0 > index > getOptionCount() - 1
com.jivesoftware.community.PollException - reserved for future changes.
com.jivesoftware.community.NotFoundException

hasUserVoted

boolean hasUserVoted(long pollID,
                     long userID)
                     throws com.jivesoftware.community.NotFoundException
Returns true if the user specified has previously voted in the poll, false otherwise.

Parameters:
userID - id of the user to check to see if they've voted already.
Returns:
true if the user specified has previously voted in the poll, false otherwise.
Throws:
com.jivesoftware.community.NotFoundException

hasAnonymousVoted

boolean hasAnonymousVoted(long pollID,
                          java.lang.String uniqueID)
                          throws com.jivesoftware.community.NotFoundException
Returns true if the guest associated with the uniqueID has previously voted in the poll, false otherwise.

Parameters:
uniqueID - the uniqueID of the guest to check to see if they've voted already.
Returns:
true if the guest specified has previously voted in the poll, false otherwise.
Throws:
com.jivesoftware.community.NotFoundException

addUserVote

void addUserVote(long pollID,
                 int index,
                 long userID)
                 throws com.jivesoftware.community.PollException,
                        UnauthorizedException,
                        com.jivesoftware.community.NotFoundException
Add a user vote for an option in the poll.

Parameters:
index - the index of the option that the user is voting for
userID - the user making the vote
Throws:
com.jivesoftware.community.PollException - if the user has previously voted in the poll (2 second leeway is provided for posting multiple votes if that mode is enabled) or the poll is not active.
UnauthorizedException - if the user does not have permission to vote.
java.lang.IndexOutOfBoundsException - if 0 > index > getOptionCount() - 1
com.jivesoftware.community.NotFoundException

addAnonymousVote

void addAnonymousVote(long pollID,
                      int index,
                      java.lang.String uniqueID)
                      throws com.jivesoftware.community.PollException,
                             UnauthorizedException,
                             com.jivesoftware.community.NotFoundException
Add a guest vote for an option in the poll.

Parameters:
index - the index of the option that the guest is voting for
uniqueID - a uniqueID for the guest. We suggest either using a session ID or the remote IP of the guest voting.
Throws:
com.jivesoftware.community.PollException - if the guest has previously voted in the poll (2 second leeway is provided for posting multiple votes if that mode is enabled) or the poll is not active.
UnauthorizedException - if the guest does not have permission to vote.
java.lang.IndexOutOfBoundsException - if 0 > index > getOptionCount() - 1
com.jivesoftware.community.NotFoundException

changeUserVote

void changeUserVote(long pollID,
                    int prevOptionIndex,
                    int newOptionIndex,
                    long userID)
                    throws com.jivesoftware.community.PollException,
                           UnauthorizedException,
                           com.jivesoftware.community.NotFoundException
Change a user vote. This method will throw a PollException unless the mode 'ALLOW_USER_VOTE_MODIFICATION' is enabled for the poll.

Parameters:
prevOptionIndex - the index of the option to change the vote from.
newOptionIndex - the index of the option to change the vote to.
Throws:
com.jivesoftware.community.PollException - if the poll is not active, the user did not vote for the prevOptionIndex or vote modification is not enabled for users.
UnauthorizedException - if the user does not have permission to vote.
java.lang.IndexOutOfBoundsException - if 0 > prevOptionIndex/newOptionIndex > getOptionCount() - 1
com.jivesoftware.community.NotFoundException

changeAnonymousVote

void changeAnonymousVote(long pollID,
                         int prevOptionIndex,
                         int newOptionIndex,
                         java.lang.String uniqueID)
                         throws com.jivesoftware.community.PollException,
                                UnauthorizedException,
                                com.jivesoftware.community.NotFoundException
Change a guest vote. This method will throw a PollException unless the mode 'ALLOW_ANONYMOUS_VOTE_MODIFICATION' is enabled for the poll.

Parameters:
prevOptionIndex - the index of the option to change the vote from.
newOptionIndex - the index of the option to change the vote to.
uniqueID - a uniqueID for the guest.
Throws:
com.jivesoftware.community.PollException - if the poll is not active, the guest did not vote for the prevOptionIndex or vote modification is not enabled for guests.
UnauthorizedException - if the guest does not have permission to vote.
java.lang.IndexOutOfBoundsException - if 0 > prevOptionIndex/newOptionIndex > getOptionCount() - 1
com.jivesoftware.community.NotFoundException

removeUserVote

void removeUserVote(long pollID,
                    int prevOptionIndex,
                    long userID)
                    throws com.jivesoftware.community.PollException,
                           UnauthorizedException,
                           com.jivesoftware.community.NotFoundException
Remove a user vote. This method will throw a PollException unless the mode 'ALLOW_USER_VOTE_MODIFICATION' is enabled for the poll.

Parameters:
prevOptionIndex - the index of the option to remove the vote from.
Throws:
com.jivesoftware.community.PollException - if the poll is not active, the user did not vote for the prevOptionIndex or vote modification is not enabled for users.
UnauthorizedException - if the user does not have permission to vote.
java.lang.IndexOutOfBoundsException - if 0 > prevOptionIndex > getOptionCount() - 1
com.jivesoftware.community.NotFoundException

removeAnonymousVote

void removeAnonymousVote(long pollID,
                         int prevOptionIndex,
                         java.lang.String uniqueID)
                         throws com.jivesoftware.community.PollException,
                                UnauthorizedException,
                                com.jivesoftware.community.NotFoundException
Remove a guest vote. This method will throw a PollException unless the mode 'ALLOW_ANONYMOUS_VOTE_MODIFICATION' is enabled for the poll.

Parameters:
prevOptionIndex - the index of the option to remove the vote from.
uniqueID - a uniqueID for the guest.
Throws:
com.jivesoftware.community.PollException - if the poll is not active, the guest did not vote for the prevOptionIndex or vote modification is not enabled for guests.
UnauthorizedException - if the guest does not have permission to vote.
java.lang.IndexOutOfBoundsException - if 0 > prevOptionIndex > getOptionCount() - 1
com.jivesoftware.community.NotFoundException

getUserVoteIndices

int[] getUserVoteIndices(long pollID,
                         long userID)
                         throws com.jivesoftware.community.NotFoundException
Returns a list of option indexes corresponding to the user votes, or an empty array if the user has not voted.

Parameters:
userID - the user to return the indexes of options the user has voted for.
Returns:
a list of option indexes (as Integers) corresponding to the user votes. @param pollID of the poll we're querying on
Throws:
com.jivesoftware.community.NotFoundException

getAnonymousVoteIndices

int[] getAnonymousVoteIndices(long pollID,
                              java.lang.String uniqueID)
                              throws com.jivesoftware.community.NotFoundException
Returns a list of option indexes corresponding to the anonymous votes, or an empty array if the user has not voted.

Parameters:
uniqueID - a uniqueID for the guest.
Returns:
a list of option indexes (as Integers) corresponding to the anonymous votes.
Throws:
com.jivesoftware.community.NotFoundException

getUserVotes

User[] getUserVotes(long pollID)
                    throws com.jivesoftware.community.PollException,
                           com.jivesoftware.community.NotFoundException
Returns a List of User objects for users who have voted for any options in the poll.

Returns:
an Iterator of users who have voted for any option in the poll
Throws:
com.jivesoftware.community.PollException - reserved for future changes.
com.jivesoftware.community.NotFoundException

getUserVotes

User[] getUserVotes(long pollID,
                    int index)
                    throws com.jivesoftware.community.PollException,
                           com.jivesoftware.community.NotFoundException
Returns a list of User objects for users who have voted for the option at the given index.

Parameters:
index - the index to return the voting users for.
Returns:
an Iterator of users who have voted for the option at the given index.
Throws:
java.lang.IndexOutOfBoundsException - if 0 > index > getOptionCount() - 1
com.jivesoftware.community.PollException - reserved for future changes.
com.jivesoftware.community.NotFoundException

Clearspace Project Page

Copyright © 1999-2007 Jive Software.