|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface VoteService
Vote Service used to add and remove votes from a particular issue. This service's methods will make sure that when voting, all of JIRA's business rules are enforced. This means that permissions and data validation will be checked.
| Nested Class Summary | |
|---|---|
static class |
VoteService.VoteValidationResult
A simple validation result that holds the user trying to vote, and the issue being voted on. |
| Method Summary | |
|---|---|
int |
addVote(User remoteUser,
VoteService.VoteValidationResult validationResult)
Adds a new vote using the specified validation result |
int |
addVote(com.atlassian.crowd.embedded.api.User remoteUser,
VoteService.VoteValidationResult validationResult)
Adds a new vote using the specified validation result |
ServiceOutcome<List<VoteHistoryEntry>> |
getVoterHistory(Issue issue,
com.atlassian.crowd.embedded.api.User remoteUser)
Get the list of vote history for an issue. |
boolean |
hasVoted(Issue issue,
User user)
Find if the specified user has voted on an issue |
boolean |
hasVoted(Issue issue,
com.atlassian.crowd.embedded.api.User user)
Find if the specified user has voted on an issue |
boolean |
isVotingEnabled()
Retrieves the 'jira.option.voting' property |
int |
removeVote(User remoteUser,
VoteService.VoteValidationResult validationResult)
Removes a new vote using the specified validation result |
int |
removeVote(com.atlassian.crowd.embedded.api.User remoteUser,
VoteService.VoteValidationResult validationResult)
Removes a new vote using the specified validation result |
VoteService.VoteValidationResult |
validateAddVote(User remoteUser,
User user,
Issue issue)
Validates if the user currently logged in may add a vote by the user supplied for the issue provided. |
VoteService.VoteValidationResult |
validateAddVote(com.atlassian.crowd.embedded.api.User remoteUser,
com.atlassian.crowd.embedded.api.User user,
Issue issue)
Validates if the user currently logged in may add a vote by the user supplied for the issue provided. |
VoteService.VoteValidationResult |
validateRemoveVote(User remoteUser,
User user,
Issue issue)
Validates if the user currently logged in may remove a vote for the user supplied for the issue provided. |
VoteService.VoteValidationResult |
validateRemoveVote(com.atlassian.crowd.embedded.api.User remoteUser,
com.atlassian.crowd.embedded.api.User user,
Issue issue)
Validates if the user currently logged in may remove a vote for the user supplied for the issue provided. |
ServiceOutcome<Collection<User>> |
viewVoters(Issue issue,
User remoteUser)
Get the list of all users who have voted on an issue. |
ServiceOutcome<Collection<com.atlassian.crowd.embedded.api.User>> |
viewVoters(Issue issue,
com.atlassian.crowd.embedded.api.User remoteUser)
Get the list of all users who have voted on an issue. |
| Method Detail |
|---|
VoteService.VoteValidationResult validateAddVote(User remoteUser,
User user,
Issue issue)
VoteService.VoteValidationResult produced by this method should be
used in conjunction with the addVote(com.opensymphony.user.User, VoteValidationResult)
method.
The following conditions will fail validation:
remoteUser - The currently logged in useruser - The user for whom a vote is being addedissue - The issue being voted on
VoteService.VoteValidationResult validateAddVote(com.atlassian.crowd.embedded.api.User remoteUser,
com.atlassian.crowd.embedded.api.User user,
Issue issue)
VoteService.VoteValidationResult produced by this method should be
used in conjunction with the addVote(User, VoteValidationResult)
method.
The following conditions will fail validation:
remoteUser - The currently logged in useruser - The user for whom a vote is being addedissue - The issue being voted on
int addVote(User remoteUser,
VoteService.VoteValidationResult validationResult)
remoteUser - The currently logged in uservalidationResult - Validation result for adding a new vote
int addVote(com.atlassian.crowd.embedded.api.User remoteUser,
VoteService.VoteValidationResult validationResult)
remoteUser - The currently logged in uservalidationResult - Validation result for adding a new vote
VoteService.VoteValidationResult validateRemoveVote(User remoteUser,
User user,
Issue issue)
VoteService.VoteValidationResult produced by this method should be
used in conjunction with the removeVote(com.opensymphony.user.User, VoteValidationResult)
method.
The following conditions will fail validation:
remoteUser - The currently logged in useruser - The user for whom a vote is being removedissue - The issue being voted on
VoteService.VoteValidationResult validateRemoveVote(com.atlassian.crowd.embedded.api.User remoteUser,
com.atlassian.crowd.embedded.api.User user,
Issue issue)
VoteService.VoteValidationResult produced by this method should be
used in conjunction with the removeVote(User, VoteValidationResult)
method.
The following conditions will fail validation:
remoteUser - The currently logged in useruser - The user for whom a vote is being removedissue - The issue being voted on
int removeVote(User remoteUser,
VoteService.VoteValidationResult validationResult)
remoteUser - The currently logged in uservalidationResult - Validation result for removing a new vote
int removeVote(com.atlassian.crowd.embedded.api.User remoteUser,
VoteService.VoteValidationResult validationResult)
remoteUser - The currently logged in uservalidationResult - Validation result for removing a new vote
ServiceOutcome<Collection<User>> viewVoters(Issue issue,
User remoteUser)
issue - the issue to viewremoteUser - the user who wants to know
ServiceOutcome<Collection<com.atlassian.crowd.embedded.api.User>> viewVoters(Issue issue,
com.atlassian.crowd.embedded.api.User remoteUser)
issue - the issue to viewremoteUser - the user who wants to know
ServiceOutcome<List<VoteHistoryEntry>> getVoterHistory(Issue issue,
com.atlassian.crowd.embedded.api.User remoteUser)
issue - the issue to viewremoteUser - the user who wants to know
boolean isVotingEnabled()
boolean hasVoted(Issue issue,
User user)
issue - the issue to checkuser - the user to check
boolean hasVoted(Issue issue,
com.atlassian.crowd.embedded.api.User user)
issue - the issue to checkuser - the user to check
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||