com.atlassian.jira.issue.vote
Interface VoteManager

All Known Implementing Classes:
DefaultVoteManager

@PublicApi
public interface VoteManager

The vote manager is responsible for counting issue votes.


Method Summary
 boolean addVote(ApplicationUser user, Issue issue)
          Adds a new vote for the user and issue specified.
 boolean addVote(com.atlassian.crowd.embedded.api.User user, org.ofbiz.core.entity.GenericValue issue)
          Deprecated. Use addVote(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.issue.Issue) instead. Since v6.0.
 boolean addVote(com.atlassian.crowd.embedded.api.User user, Issue issue)
          Deprecated. Use addVote(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.issue.Issue) instead. Since v6.0.
 int getVoteCount(Issue issue)
          Return the number of users that have voted for the given issue.
 List<VoteHistoryEntry> getVoteHistory(Issue issue)
          Get the list of vote history for an issue.
 List<com.atlassian.crowd.embedded.api.User> getVoters(Issue issue, Locale usersLocale)
          Deprecated. Use getVotersFor(com.atlassian.jira.issue.Issue, java.util.Locale) instead. Since v6.0.
 List<ApplicationUser> getVotersFor(Issue issue, Locale usersLocale)
          Returns an ordered list of voters for a particular issue.
 Collection<String> getVoterUserkeys(Issue issue)
          Return a collection of userkeys of users that voted for given issue
 Collection<String> getVoterUsernames(org.ofbiz.core.entity.GenericValue issue)
          Deprecated. Use getVoterUsernames(com.atlassian.jira.issue.Issue) instead. Since v6.0.
 Collection<String> getVoterUsernames(Issue issue)
          Deprecated. Use getVoterUserkeys(com.atlassian.jira.issue.Issue) instead. Since v6.0.
 boolean hasVoted(ApplicationUser user, Issue issue)
          Checks if the given User has voted on the given Issue.
 boolean hasVoted(com.atlassian.crowd.embedded.api.User user, org.ofbiz.core.entity.GenericValue issue)
          Deprecated. Use hasVoted(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.issue.Issue) instead. Since v6.0.
 boolean hasVoted(com.atlassian.crowd.embedded.api.User user, Issue issue)
          Deprecated. Use hasVoted(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.issue.Issue) instead. Since v6.0.
 boolean isVotingEnabled()
          Retrieves the 'jira.option.voting' property
 boolean removeVote(ApplicationUser user, Issue issue)
          Removes a vote for the user and issue specified.
 boolean removeVote(com.atlassian.crowd.embedded.api.User user, org.ofbiz.core.entity.GenericValue issue)
          Deprecated. Use removeVote(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.issue.Issue) instead. Since v6.0.
 boolean removeVote(com.atlassian.crowd.embedded.api.User user, Issue issue)
          Deprecated. Use removeVote(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.issue.Issue) instead. Since v6.0.
 void removeVotesForUser(ApplicationUser user)
          Removes all votes made by user.
 void removeVotesForUser(com.atlassian.crowd.embedded.api.User user)
          Deprecated. Use removeVotesForUser(com.atlassian.jira.user.ApplicationUser) instead. Since v6.0.
 

Method Detail

addVote

boolean addVote(com.atlassian.crowd.embedded.api.User user,
                Issue issue)
Deprecated. Use addVote(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.issue.Issue) instead. Since v6.0.

Adds a new vote for the user and issue specified.

Parameters:
user - the User
issue - the Issue
Returns:
True if the vote succeeded. False if the user or issue supplied were null, or if the resolution is set or if voting is disabled.

addVote

boolean addVote(ApplicationUser user,
                Issue issue)
Adds a new vote for the user and issue specified.

Parameters:
user - the User
issue - the Issue
Returns:
True if the vote succeeded. False if the user or issue supplied were null, or if the resolution is set or if voting is disabled.

addVote

boolean addVote(com.atlassian.crowd.embedded.api.User user,
                org.ofbiz.core.entity.GenericValue issue)
Deprecated. Use addVote(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.issue.Issue) instead. Since v6.0.

Adds a new vote for the user and issue specified.

Parameters:
user - the User
issue - the Issue
Returns:
false, if the user or issue supplied were null, or if the resolution is set or if voting is disabled. True if the vote succeeded.

removeVote

boolean removeVote(com.atlassian.crowd.embedded.api.User user,
                   Issue issue)
Deprecated. Use removeVote(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.issue.Issue) instead. Since v6.0.

Removes a vote for the user and issue specified.

Parameters:
user - the User
issue - the Issue
Returns:
true if removing a vote succeeded.

removeVote

boolean removeVote(ApplicationUser user,
                   Issue issue)
Removes a vote for the user and issue specified.

Parameters:
user - the User
issue - the Issue
Returns:
true if removing a vote succeeded.

removeVote

boolean removeVote(com.atlassian.crowd.embedded.api.User user,
                   org.ofbiz.core.entity.GenericValue issue)
Deprecated. Use removeVote(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.issue.Issue) instead. Since v6.0.

Removes a vote for the user and issue specified.

Parameters:
user - the User
issue - the Issue
Returns:
false, if the user or issue supplied were null, or if the resolution is set or if voting is disabled. True if removing a vote succeeded.

getVoters

List<com.atlassian.crowd.embedded.api.User> getVoters(Issue issue,
                                                      Locale usersLocale)
Deprecated. Use getVotersFor(com.atlassian.jira.issue.Issue, java.util.Locale) instead. Since v6.0.

Returns an ordered list of voters for a particular issue.

Parameters:
issue - the Issue
usersLocale - the locale of the user making this call which is used to sort the results.
Returns:
an ordered list of voters for a particular issue.
Since:
v4.3

getVotersFor

List<ApplicationUser> getVotersFor(Issue issue,
                                   Locale usersLocale)
Returns an ordered list of voters for a particular issue.

Parameters:
issue - the Issue
usersLocale - the locale of the user making this call which is used to sort the results.
Returns:
an ordered list of voters for the given issue.
Since:
v6.0

getVoterUsernames

Collection<String> getVoterUsernames(Issue issue)
Deprecated. Use getVoterUserkeys(com.atlassian.jira.issue.Issue) instead. Since v6.0.

Return a collection of usernames of users that voted for the given issue.

Parameters:
issue - the Issue
Returns:
a collection of usernames, never null
Since:
v4.3

getVoterUsernames

Collection<String> getVoterUsernames(org.ofbiz.core.entity.GenericValue issue)
Deprecated. Use getVoterUsernames(com.atlassian.jira.issue.Issue) instead. Since v6.0.

Return a collection of usernames of users that voted for given issue

Parameters:
issue - issue voted for
Returns:
a collection of usernames, never null
Since:
v3.13

getVoterUserkeys

Collection<String> getVoterUserkeys(Issue issue)
Return a collection of userkeys of users that voted for given issue

Parameters:
issue - issue voted for
Returns:
a collection of userkeys, never null
Since:
v6.0

getVoteCount

int getVoteCount(Issue issue)
Return the number of users that have voted for the given issue.

Parameters:
issue - issue voted for
Returns:
the number of users that have voted for the given issue.
Since:
v6.0

getVoteHistory

List<VoteHistoryEntry> getVoteHistory(Issue issue)
Get the list of vote history for an issue. The history will be in time sequence.

Parameters:
issue - the issue to view
Returns:
List of Vote History Entries

isVotingEnabled

boolean isVotingEnabled()
Retrieves the 'jira.option.voting' property

Returns:
True if voting is enabled

hasVoted

boolean hasVoted(com.atlassian.crowd.embedded.api.User user,
                 Issue issue)
Deprecated. Use hasVoted(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.issue.Issue) instead. Since v6.0.

Checks if the given User has voted on the given Issue.

Parameters:
user - the User
issue - the Issue
Returns:
True if the user has voted.

hasVoted

boolean hasVoted(ApplicationUser user,
                 Issue issue)
Checks if the given User has voted on the given Issue.

Parameters:
user - the User
issue - the Issue
Returns:
True if the user has voted.

hasVoted

boolean hasVoted(com.atlassian.crowd.embedded.api.User user,
                 org.ofbiz.core.entity.GenericValue issue)
Deprecated. Use hasVoted(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.issue.Issue) instead. Since v6.0.

Checks if the given User has voted on the given Issue. the user supplied.

Parameters:
user - the User
issue - the Issue
Returns:
True if the user has voted.

removeVotesForUser

void removeVotesForUser(com.atlassian.crowd.embedded.api.User user)
Deprecated. Use removeVotesForUser(com.atlassian.jira.user.ApplicationUser) instead. Since v6.0.

Removes all votes made by user. Usually means user is being deleted.

Parameters:
user - user to remove vote associations for.
Since:
v3.13

removeVotesForUser

void removeVotesForUser(ApplicationUser user)
Removes all votes made by user. Usually means user is being deleted.

Parameters:
user - user to remove vote associations for.
Since:
v6.0


Copyright © 2002-2013 Atlassian. All Rights Reserved.