|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.bc.issue.vote.DefaultVoteService
public class DefaultVoteService
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.atlassian.jira.bc.issue.vote.VoteService |
---|
VoteService.VoteValidationResult |
Constructor Summary | |
---|---|
DefaultVoteService(VoteManager voteManager,
I18nHelper.BeanFactory beanFactory,
ApplicationProperties applicationProperties,
PermissionManager permissionManager,
I18nHelper.BeanFactory i18nFactory)
|
Method Summary | |
---|---|
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,
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(com.atlassian.crowd.embedded.api.User remoteUser,
VoteService.VoteValidationResult validationResult)
Removes a new vote using the specified validation result |
VoteService.VoteValidationResult |
validateAddVote(com.atlassian.crowd.embedded.api.User remoteUser,
com.atlassian.crowd.embedded.api.User voter,
Issue issue)
Validates if the user currently logged in may add a vote by the user supplied for the issue provided. |
VoteService.VoteValidationResult |
validateRemoveVote(com.atlassian.crowd.embedded.api.User remoteUser,
com.atlassian.crowd.embedded.api.User voter,
Issue issue)
Validates if the user currently logged in may remove a vote for the user supplied for the issue provided. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultVoteService(VoteManager voteManager, I18nHelper.BeanFactory beanFactory, ApplicationProperties applicationProperties, PermissionManager permissionManager, I18nHelper.BeanFactory i18nFactory)
Method Detail |
---|
public VoteService.VoteValidationResult validateAddVote(com.atlassian.crowd.embedded.api.User remoteUser, com.atlassian.crowd.embedded.api.User voter, Issue issue)
VoteService
VoteService.VoteValidationResult
produced by this method should be
used in conjunction with the VoteService.addVote(User, VoteValidationResult)
method.
The following conditions will fail validation:
validateAddVote
in interface VoteService
remoteUser
- The currently logged in uservoter
- The user for whom a vote is being addedissue
- The issue being voted on
public int addVote(com.atlassian.crowd.embedded.api.User remoteUser, VoteService.VoteValidationResult validationResult)
VoteService
addVote
in interface VoteService
remoteUser
- The currently logged in uservalidationResult
- Validation result for adding a new vote
public VoteService.VoteValidationResult validateRemoveVote(com.atlassian.crowd.embedded.api.User remoteUser, com.atlassian.crowd.embedded.api.User voter, Issue issue)
VoteService
VoteService.VoteValidationResult
produced by this method should be
used in conjunction with the VoteService.removeVote(User, VoteValidationResult)
method.
The following conditions will fail validation:
validateRemoveVote
in interface VoteService
remoteUser
- The currently logged in uservoter
- The user for whom a vote is being removedissue
- The issue being voted on
public int removeVote(com.atlassian.crowd.embedded.api.User remoteUser, VoteService.VoteValidationResult validationResult)
VoteService
removeVote
in interface VoteService
remoteUser
- The currently logged in uservalidationResult
- Validation result for removing a new vote
public ServiceOutcome<Collection<com.atlassian.crowd.embedded.api.User>> viewVoters(Issue issue, com.atlassian.crowd.embedded.api.User remoteUser)
VoteService
viewVoters
in interface VoteService
issue
- the issue to viewremoteUser
- the user who wants to know
public ServiceOutcome<List<VoteHistoryEntry>> getVoterHistory(Issue issue, com.atlassian.crowd.embedded.api.User remoteUser)
VoteService
getVoterHistory
in interface VoteService
issue
- the issue to viewremoteUser
- the user who wants to know
public boolean isVotingEnabled()
VoteService
isVotingEnabled
in interface VoteService
public boolean hasVoted(Issue issue, com.atlassian.crowd.embedded.api.User user)
VoteService
hasVoted
in interface VoteService
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 |