|
Clearspace API (2.0.15) 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. |
WSPoll |
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 |
getActivePollCountByObjectTypeAndObjectID(int objectType,
long objectID)
Returns a count of all active polls of a given type and object ID. |
java.util.List<WSPoll> |
getActivePolls()
Returns an iterable of active polls in the system. |
java.util.List<WSPoll> |
getActivePollsByObjectTypeAndObjectID(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 |
getAnonymousVoteCountByIndex(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[] |
getAnonymousVotesByIndex(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 |
getLivePollCountByObjectTypeAndObjectID(int objectType,
long objectID)
Returns a count of all live polls of a given type and object ID. |
java.util.List<WSPoll> |
getLivePolls()
Returns a List of live polls in the system. |
java.util.List<WSPoll> |
getLivePollsByObjectTypeAndObjectID(int objectType,
long objectID)
Returns an iterable of live polls associated with the object specified by the objectType and objectID. |
WSPoll |
getPoll(long pollID)
Returns the Poll specified by the poll ID. |
int |
getPollCount()
Returns a count of all polls, both active and inactive. |
int |
getPollCountByObjectTypeAndObjectID(int objectType,
long objectID)
Returns an count of polls, both active and inactive, associated with the object specified by the objectType and objectID. |
java.util.List<WSPoll> |
getPolls()
Returns an iterable of all polls, both active and inactive. |
java.util.List<WSPoll> |
getPollsByObjectTypeAndObjectID(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 |
getUserVoteCountByIndex(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. |
WSUser[] |
getUserVotes(long pollID)
Returns a List of User objects for users who have voted for any options in the poll. |
WSUser[] |
getUserVotesByIndex(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 |
getVoteCountByIndex(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 |
setMode(long pollID,
long mode,
boolean enabled)
Sets a mode to be enabled or disabled for 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. |
void |
update(WSPoll poll)
|
| Method Detail |
|---|
WSPoll createPoll(int objectType,
long objectID,
long userID,
java.lang.String name)
throws UserNotFoundException
UserNotFoundException
WSPoll getPoll(long pollID)
throws UnauthorizedException,
NotFoundException
pollID - the id of the poll to return.
UnauthorizedException - if no permissions to view the poll.
NotFoundException - if the poll of the given ID was not found.
void deletePoll(long pollID)
throws UnauthorizedException,
PollException,
NotFoundException
pollID - the poll to delete
UnauthorizedException - if no permissions to delete the poll.
PollException - if the poll could not be deleted
NotFoundException - if the poll is not foundint getPollCount()
java.util.List<WSPoll> getPolls()
int getPollCountByObjectTypeAndObjectID(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.
java.util.List<WSPoll> getPollsByObjectTypeAndObjectID(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.java.util.List<WSPoll> getActivePolls()
int getActivePollCount()
java.util.List<WSPoll> getActivePollsByObjectTypeAndObjectID(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 getActivePollCountByObjectTypeAndObjectID(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.
java.util.List<WSPoll> getLivePolls()
int getLivePollCount()
java.util.List<WSPoll> getLivePollsByObjectTypeAndObjectID(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 getLivePollCountByObjectTypeAndObjectID(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 NotFoundException
mode - a valid poll modepollID - of the poll we're querying
NotFoundException
void setMode(long pollID,
long mode,
boolean enabled)
throws UnauthorizedException,
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.
NotFoundException
void addOption(long pollID,
java.lang.String value)
throws UnauthorizedException,
NotFoundException
value - the text for the new option.
UnauthorizedException - if the user does not have permissions to administer the poll.
NotFoundException
void deleteOption(long pollID,
int index)
throws UnauthorizedException,
NotFoundException
index -
UnauthorizedException - if the user does not have permissions to administer the poll.
NotFoundException
void setOption(long pollID,
int index,
java.lang.String value)
throws UnauthorizedException,
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.
NotFoundException
void setOptionIndex(long pollID,
int currentIndex,
int newIndex)
throws UnauthorizedException,
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.
NotFoundException
int getVoteCount(long pollID)
throws PollException,
NotFoundException
PollException - reserved for future changes.
NotFoundException
int getVoteCountByIndex(long pollID,
int index)
throws PollException,
NotFoundException
java.lang.IndexOutOfBoundsException - if 0 > index > getOptionCount() - 1
PollException - reserved for future changes.
NotFoundException
int getUserVoteCount(long pollID)
throws PollException,
NotFoundException
PollException - reserved for future changes.
NotFoundException
int getUserVoteCountByIndex(long pollID,
int index)
throws PollException,
NotFoundException
java.lang.IndexOutOfBoundsException - if 0 > index > getOptionCount() - 1
PollException - reserved for future changes.
NotFoundException
int getAnonymousVoteCount(long pollID)
throws PollException,
NotFoundException
PollException - reserved for future changes.
NotFoundException
int getAnonymousVoteCountByIndex(long pollID,
int index)
throws PollException,
NotFoundException
java.lang.IndexOutOfBoundsException - if 0 > index > getOptionCount() - 1
PollException - reserved for future changes.
NotFoundException
java.lang.String[] getAnonymousVotes(long pollID)
throws PollException,
NotFoundException
PollException - reserved for future changes.
NotFoundException
java.lang.String[] getAnonymousVotesByIndex(long pollID,
int index)
throws PollException,
NotFoundException
index - the index to return the voting guests for.
java.lang.IndexOutOfBoundsException - if 0 > index > getOptionCount() - 1
PollException - reserved for future changes.
NotFoundException
boolean hasUserVoted(long pollID,
long userID)
throws NotFoundException
userID - id of the user to check to see if they've voted already.
NotFoundException
boolean hasAnonymousVoted(long pollID,
java.lang.String uniqueID)
throws NotFoundException
uniqueID - the uniqueID of the guest to check to see if they've voted already.
NotFoundException
void addUserVote(long pollID,
int index,
long userID)
throws PollException,
UnauthorizedException,
NotFoundException
index - the index of the option that the user is voting foruserID - the user making the vote
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
NotFoundException
void addAnonymousVote(long pollID,
int index,
java.lang.String uniqueID)
throws PollException,
UnauthorizedException,
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.
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
NotFoundException
void changeUserVote(long pollID,
int prevOptionIndex,
int newOptionIndex,
long userID)
throws PollException,
UnauthorizedException,
NotFoundException
prevOptionIndex - the index of the option to change the vote from.newOptionIndex - the index of the option to change the vote to.
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
NotFoundException
void changeAnonymousVote(long pollID,
int prevOptionIndex,
int newOptionIndex,
java.lang.String uniqueID)
throws PollException,
UnauthorizedException,
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.
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
NotFoundException
void removeUserVote(long pollID,
int prevOptionIndex,
long userID)
throws PollException,
UnauthorizedException,
NotFoundException
prevOptionIndex - the index of the option to remove the vote from.
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
NotFoundException
void removeAnonymousVote(long pollID,
int prevOptionIndex,
java.lang.String uniqueID)
throws PollException,
UnauthorizedException,
NotFoundException
prevOptionIndex - the index of the option to remove the vote from.uniqueID - a uniqueID for the guest.
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
NotFoundException
int[] getUserVoteIndices(long pollID,
long userID)
throws NotFoundException
userID - the user to return the indexes of options the user has voted for.
NotFoundException
int[] getAnonymousVoteIndices(long pollID,
java.lang.String uniqueID)
throws NotFoundException
uniqueID - a uniqueID for the guest.
NotFoundException
WSUser[] getUserVotes(long pollID)
throws PollException,
NotFoundException
PollException - reserved for future changes.
NotFoundException
WSUser[] getUserVotesByIndex(long pollID,
int index)
throws PollException,
NotFoundException
index - the index to return the voting users for.
java.lang.IndexOutOfBoundsException - if 0 > index > getOptionCount() - 1
PollException - reserved for future changes.
NotFoundException
void update(WSPoll poll)
throws NotFoundException
NotFoundException
|
Clearspace Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||