public interface PollVoteManager
| Modifier and Type | Method and Description |
|---|---|
void |
deleteAll(List<Vote> votes)
Delete the given votes
|
void |
deleteVote(Vote vote)
Delete the given vote
|
List<Vote> |
getAllVotesForOption(Option option)
Get all votes for Option
|
List<Vote> |
getAllVotesForPoll(Poll poll) |
int |
getDisctinctVotersForPoll(Poll poll) |
Vote |
getVoteById(Long voteId)
Get a vote by id
|
Map<Long,List<Vote>> |
getVotesForUser(String userId,
Long[] pollIds)
Get all the votes for a specific user in a poll or polls (or all polls)
|
boolean |
isUserAllowedVote(String userId,
Long pollId,
boolean ignoreVoted)
Check if the given user can vote in the supplied poll,
also checks if the user has already voted, if so this will return false
|
boolean |
pollIsVotable(Poll poll)
Is the current user able to vote on this poll?
|
boolean |
saveVote(Vote vote) |
void |
saveVoteList(List<Vote> voteCollection)
Save a vote collection - a users collection of votes for a specific poll
|
boolean |
userHasVoted(Long pollid)
Assumes current user
|
boolean |
userHasVoted(Long pollid,
String userID) |
Vote getVoteById(Long voteId)
voteId - boolean saveVote(Vote vote)
void saveVoteList(List<Vote> voteCollection)
voteCollection - boolean isUserAllowedVote(String userId, Long pollId, boolean ignoreVoted)
userId - an internal user idpollId - the id of a pollignoreVoted - if true then ignores the user's vote when checking,
else will only return true if the user is allowed AND has not already votedboolean userHasVoted(Long pollid)
pollid - int getDisctinctVotersForPoll(Poll poll)
Map<Long,List<Vote>> getVotesForUser(String userId, Long[] pollIds)
userId - an internal user id (not username)pollIds - an array of all polls to get the votes for (null to get all)List<Vote> getAllVotesForOption(Option option)
option - boolean pollIsVotable(Poll poll)
poll - void deleteVote(Vote vote)
vote - The vote to deleteCopyright © 2003–2016 Sakai Project. All rights reserved.