|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.jira.issue.vote.DefaultVoteManager
public class DefaultVoteManager
Constructor Summary | |
---|---|
DefaultVoteManager(ApplicationProperties applicationProperties,
UserAssociationStore userAssociationStore,
IssueIndexManager indexManager,
VoteHistoryStore voteHistoryStore,
IssueManager issueManager)
|
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)
Adds a new vote for the user and issue specified. |
boolean |
addVote(com.atlassian.crowd.embedded.api.User user,
Issue issue)
Adds a new vote for the user and issue specified. |
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)
Returns an ordered list of voters for a particular issue. |
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)
Return a collection of usernames of users that voted for given issue |
Collection<String> |
getVoterUsernames(Issue issue)
Return a collection of usernames of users that voted for the given issue. |
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)
Checks if the given User has voted on the given Issue. |
boolean |
hasVoted(com.atlassian.crowd.embedded.api.User user,
Issue issue)
Checks if the given User has voted on the given Issue. |
boolean |
isVotingEnabled()
Check if voting has been enabled |
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)
Removes a vote for the user and issue specified. |
boolean |
removeVote(com.atlassian.crowd.embedded.api.User user,
Issue issue)
Removes a vote for the user and issue specified. |
void |
removeVotesForUser(ApplicationUser user)
Removes all votes made by user. |
void |
removeVotesForUser(com.atlassian.crowd.embedded.api.User user)
Removes all votes made by user. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultVoteManager(ApplicationProperties applicationProperties, UserAssociationStore userAssociationStore, IssueIndexManager indexManager, VoteHistoryStore voteHistoryStore, IssueManager issueManager)
Method Detail |
---|
public boolean addVote(com.atlassian.crowd.embedded.api.User user, Issue issue)
VoteManager
addVote
in interface VoteManager
user
- the Userissue
- the Issue
public boolean addVote(ApplicationUser user, Issue issue)
VoteManager
addVote
in interface VoteManager
user
- the Userissue
- the Issue
public boolean addVote(com.atlassian.crowd.embedded.api.User user, org.ofbiz.core.entity.GenericValue issue)
VoteManager
addVote
in interface VoteManager
user
- the Userissue
- the Issue
public boolean removeVote(com.atlassian.crowd.embedded.api.User user, Issue issue)
VoteManager
removeVote
in interface VoteManager
user
- the Userissue
- the Issue
public boolean removeVote(ApplicationUser user, Issue issue)
VoteManager
removeVote
in interface VoteManager
user
- the Userissue
- the Issue
public boolean removeVote(com.atlassian.crowd.embedded.api.User user, org.ofbiz.core.entity.GenericValue issue)
VoteManager
removeVote
in interface VoteManager
user
- the Userissue
- the Issue
public Collection<String> getVoterUsernames(Issue issue)
VoteManager
getVoterUsernames
in interface VoteManager
issue
- the Issue
public Collection<String> getVoterUsernames(org.ofbiz.core.entity.GenericValue issue)
VoteManager
getVoterUsernames
in interface VoteManager
issue
- issue voted for
public Collection<String> getVoterUserkeys(Issue issue)
VoteManager
getVoterUserkeys
in interface VoteManager
issue
- issue voted for
public int getVoteCount(Issue issue)
VoteManager
getVoteCount
in interface VoteManager
issue
- issue voted for
public List<VoteHistoryEntry> getVoteHistory(Issue issue)
VoteManager
getVoteHistory
in interface VoteManager
issue
- the issue to view
public List<com.atlassian.crowd.embedded.api.User> getVoters(Issue issue, Locale usersLocale)
VoteManager
getVoters
in interface VoteManager
issue
- the IssueusersLocale
- the locale of the user making this call which is used to sort the results.
public List<ApplicationUser> getVotersFor(Issue issue, Locale usersLocale)
VoteManager
getVotersFor
in interface VoteManager
issue
- the IssueusersLocale
- the locale of the user making this call which is used to sort the results.
public boolean isVotingEnabled()
isVotingEnabled
in interface VoteManager
public boolean hasVoted(com.atlassian.crowd.embedded.api.User user, Issue issue)
VoteManager
hasVoted
in interface VoteManager
user
- the Userissue
- the Issue
public boolean hasVoted(ApplicationUser user, Issue issue)
VoteManager
hasVoted
in interface VoteManager
user
- the Userissue
- the Issue
public boolean hasVoted(com.atlassian.crowd.embedded.api.User user, org.ofbiz.core.entity.GenericValue issue)
VoteManager
hasVoted
in interface VoteManager
user
- the Userissue
- the Issue
public void removeVotesForUser(com.atlassian.crowd.embedded.api.User user)
VoteManager
removeVotesForUser
in interface VoteManager
user
- user to remove vote associations for.public void removeVotesForUser(ApplicationUser user)
VoteManager
removeVotesForUser
in interface VoteManager
user
- user to remove vote associations for.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |