|
Clearspace API (1.10.14) Web Services Client Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
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 |
|---|
Poll createPoll(int objectType,
long objectID,
long userID,
java.lang.String name)
throws UserNotFoundException
UserNotFoundException
Poll getPoll(long pollID)
throws UnauthorizedException,
com.jivesoftware.community.NotFoundException
pollID - the id of the poll to return.
UnauthorizedException - if no permissions to view the poll.
com.jivesoftware.community.NotFoundException - if the poll of the given ID was not found.
void deletePoll(long pollID)
throws UnauthorizedException,
com.jivesoftware.community.PollException,
com.jivesoftware.community.NotFoundException
pollID - the poll to delete
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 foundint getPollCount()
Poll[] getPolls()
int getPollCount(int objectType,
long objectID)
throws UnauthorizedException
objectType - the object type of the object the poll is associated with.objectID - the objectID of the object the poll is associated with.
UnauthorizedException - if no permissions to view polls for the specified
objectType and objectID.
Poll[] getPolls(int objectType,
long objectID)
throws UnauthorizedException
objectType - the object type of the object the poll is associated with.objectID - the objectID of the object the poll is associated with.
UnauthorizedException - if no permissions to view polls for the specified
objectType and objectID.Poll[] getActivePolls()
int getActivePollCount()
Poll[] getActivePolls(int objectType,
long objectID)
throws UnauthorizedException
objectType - the object type of the object the poll is associated with.objectID - the objectID of the object the poll is associated with.
UnauthorizedException - if no permissions to view polls for the specified
objectType and objectID.
int getActivePollCount(int objectType,
long objectID)
objectType - the type of object we're looking at (defined in the
JiveConstants class.objectID - the ID of the object we're looking at.
Poll[] getLivePolls()
int getLivePollCount()
Poll[] getLivePolls(int objectType,
long objectID)
throws UnauthorizedException
objectType - the object type of the object the poll is associated with.objectID - the objectID of the object the poll is associated with.
UnauthorizedException - if no permissions to view polls for the specified
objectType and objectID.
int getLivePollCount(int objectType,
long objectID)
throws UnauthorizedException
objectType - the type of object we're looking at (defined in the
JiveConstants class.objectID - the ID of the object we're looking at.
UnauthorizedException - if not allowed
boolean isModeEnabled(long pollID,
long mode)
throws com.jivesoftware.community.NotFoundException
mode - a valid poll modepollID - of the poll we're querying
com.jivesoftware.community.NotFoundException
boolean setStartDate(long pollID,
java.util.Date startDate)
throws UnauthorizedException,
com.jivesoftware.community.NotFoundException
startDate - the date voting for the poll should start.
UnauthorizedException - if the user does not have permissions to administer the poll.
com.jivesoftware.community.NotFoundException
void setEndDate(long pollID,
java.util.Date endDate)
throws UnauthorizedException,
com.jivesoftware.community.NotFoundException
endDate - the date the poll should end.
UnauthorizedException - if the user does not have permissions to administer the poll.
com.jivesoftware.community.NotFoundException
void setExpirationDate(long pollID,
java.util.Date expireDate)
throws UnauthorizedException,
com.jivesoftware.community.NotFoundException
expireDate - the date the poll should expire.
UnauthorizedException - if the user does not have permissions to administer the poll.
com.jivesoftware.community.NotFoundException
void setName(long pollID,
java.lang.String name)
throws UnauthorizedException,
com.jivesoftware.community.NotFoundException
name - the new name of the poll.
UnauthorizedException - if the user does not have permissions to administer the poll.
com.jivesoftware.community.NotFoundException
void setDescription(long pollID,
java.lang.String description)
throws UnauthorizedException,
com.jivesoftware.community.NotFoundException
description - the description of the poll.
UnauthorizedException - if the user does not have permissions to administer the poll.
com.jivesoftware.community.NotFoundException
void setMode(long pollID,
long mode,
boolean enabled)
throws UnauthorizedException,
com.jivesoftware.community.NotFoundException
mode - a valid modeenabled - true if the poll should be enabled, false if not
UnauthorizedException - if the user does not have permissions to administer the poll.
com.jivesoftware.community.NotFoundException
void addOption(long pollID,
java.lang.String value)
throws UnauthorizedException,
com.jivesoftware.community.NotFoundException
value - the text for the new option.
UnauthorizedException - if the user does not have permissions to administer the poll.
com.jivesoftware.community.NotFoundException
void deleteOption(long pollID,
int index)
throws UnauthorizedException,
com.jivesoftware.community.NotFoundException
index -
UnauthorizedException - if the user does not have permissions to administer the poll.
com.jivesoftware.community.NotFoundException
void setOption(long pollID,
int index,
java.lang.String value)
throws UnauthorizedException,
com.jivesoftware.community.NotFoundException
index - the index of the option to set the text for.value - the new text for the option.
java.lang.IndexOutOfBoundsException - if 0 > index > getOptionCount() - 1
UnauthorizedException - if the user does not have permissions to administer the poll.
com.jivesoftware.community.NotFoundException
void setOptionIndex(long pollID,
int currentIndex,
int newIndex)
throws UnauthorizedException,
com.jivesoftware.community.NotFoundException
currentIndex - the current index of the option.newIndex - the new index of the option.
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
int getVoteCount(long pollID)
throws com.jivesoftware.community.PollException,
com.jivesoftware.community.NotFoundException
com.jivesoftware.community.PollException - reserved for future changes.
com.jivesoftware.community.NotFoundException
int getVoteCount(long pollID,
int index)
throws com.jivesoftware.community.PollException,
com.jivesoftware.community.NotFoundException
java.lang.IndexOutOfBoundsException - if 0 > index > getOptionCount() - 1
com.jivesoftware.community.PollException - reserved for future changes.
com.jivesoftware.community.NotFoundException
int getUserVoteCount(long pollID)
throws com.jivesoftware.community.PollException,
com.jivesoftware.community.NotFoundException
com.jivesoftware.community.PollException - reserved for future changes.
com.jivesoftware.community.NotFoundException
int getUserVoteCount(long pollID,
int index)
throws com.jivesoftware.community.PollException,
com.jivesoftware.community.NotFoundException
java.lang.IndexOutOfBoundsException - if 0 > index > getOptionCount() - 1
com.jivesoftware.community.PollException - reserved for future changes.
com.jivesoftware.community.NotFoundException
int getAnonymousVoteCount(long pollID)
throws com.jivesoftware.community.PollException,
com.jivesoftware.community.NotFoundException
com.jivesoftware.community.PollException - reserved for future changes.
com.jivesoftware.community.NotFoundException
int getAnonymousVoteCount(long pollID,
int index)
throws com.jivesoftware.community.PollException,
com.jivesoftware.community.NotFoundException
java.lang.IndexOutOfBoundsException - if 0 > index > getOptionCount() - 1
com.jivesoftware.community.PollException - reserved for future changes.
com.jivesoftware.community.NotFoundException
java.lang.String[] getAnonymousVotes(long pollID)
throws com.jivesoftware.community.PollException,
com.jivesoftware.community.NotFoundException
com.jivesoftware.community.PollException - reserved for future changes.
com.jivesoftware.community.NotFoundException
java.lang.String[] getAnonymousVotes(long pollID,
int index)
throws com.jivesoftware.community.PollException,
com.jivesoftware.community.NotFoundException
index - the index to return the voting guests for.
java.lang.IndexOutOfBoundsException - if 0 > index > getOptionCount() - 1
com.jivesoftware.community.PollException - reserved for future changes.
com.jivesoftware.community.NotFoundException
boolean hasUserVoted(long pollID,
long userID)
throws com.jivesoftware.community.NotFoundException
userID - id of the user to check to see if they've voted already.
com.jivesoftware.community.NotFoundException
boolean hasAnonymousVoted(long pollID,
java.lang.String uniqueID)
throws com.jivesoftware.community.NotFoundException
uniqueID - the uniqueID of the guest to check to see if they've voted already.
com.jivesoftware.community.NotFoundException
void addUserVote(long pollID,
int index,
long userID)
throws com.jivesoftware.community.PollException,
UnauthorizedException,
com.jivesoftware.community.NotFoundException
index - the index of the option that the user is voting foruserID - the user making the vote
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
void addAnonymousVote(long pollID,
int index,
java.lang.String uniqueID)
throws com.jivesoftware.community.PollException,
UnauthorizedException,
com.jivesoftware.community.NotFoundException
index - the index of the option that the guest is voting foruniqueID - a uniqueID for the guest. We suggest either using a session ID or the remote
IP of the guest voting.
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
void changeUserVote(long pollID,
int prevOptionIndex,
int newOptionIndex,
long userID)
throws com.jivesoftware.community.PollException,
UnauthorizedException,
com.jivesoftware.community.NotFoundException
prevOptionIndex - the index of the option to change the vote from.newOptionIndex - the index of the option to change the vote to.
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
void changeAnonymousVote(long pollID,
int prevOptionIndex,
int newOptionIndex,
java.lang.String uniqueID)
throws com.jivesoftware.community.PollException,
UnauthorizedException,
com.jivesoftware.community.NotFoundException
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.
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
void removeUserVote(long pollID,
int prevOptionIndex,
long userID)
throws com.jivesoftware.community.PollException,
UnauthorizedException,
com.jivesoftware.community.NotFoundException
prevOptionIndex - the index of the option to remove the vote from.
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
void removeAnonymousVote(long pollID,
int prevOptionIndex,
java.lang.String uniqueID)
throws com.jivesoftware.community.PollException,
UnauthorizedException,
com.jivesoftware.community.NotFoundException
prevOptionIndex - the index of the option to remove the vote from.uniqueID - a uniqueID for the guest.
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
int[] getUserVoteIndices(long pollID,
long userID)
throws com.jivesoftware.community.NotFoundException
userID - the user to return the indexes of options the user has voted for.
com.jivesoftware.community.NotFoundException
int[] getAnonymousVoteIndices(long pollID,
java.lang.String uniqueID)
throws com.jivesoftware.community.NotFoundException
uniqueID - a uniqueID for the guest.
com.jivesoftware.community.NotFoundException
User[] getUserVotes(long pollID)
throws com.jivesoftware.community.PollException,
com.jivesoftware.community.NotFoundException
com.jivesoftware.community.PollException - reserved for future changes.
com.jivesoftware.community.NotFoundException
User[] getUserVotes(long pollID,
int index)
throws com.jivesoftware.community.PollException,
com.jivesoftware.community.NotFoundException
index - the index to return the voting users for.
java.lang.IndexOutOfBoundsException - if 0 > index > getOptionCount() - 1
com.jivesoftware.community.PollException - reserved for future changes.
com.jivesoftware.community.NotFoundException
|
Clearspace Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||