com.atlassian.jira.issue.vote
Interface VoteManager

All Known Implementing Classes:
DefaultVoteManager

public interface VoteManager

The vote manager is responsible for counting issue votes.


Method Summary
 boolean addVote(User user, org.ofbiz.core.entity.GenericValue issue)
          Adds a new vote for the user and issue specified.
 Collection getVoters(org.ofbiz.core.entity.GenericValue issue)
          Return a list of voters for a particular issue.
 boolean hasVoted(User user, org.ofbiz.core.entity.GenericValue issue)
          Checks if the collection of getVoters(org.ofbiz.core.entity.GenericValue) contains the user supplied.
 boolean isVotingEnabled()
          Retrieves the 'jira.option.voting' property
 boolean removeVote(User user, org.ofbiz.core.entity.GenericValue issue)
          Removes a vote for the user and issue specified.
 

Method Detail

addVote

boolean addVote(User user,
                org.ofbiz.core.entity.GenericValue issue)
Adds a new vote for the user and issue specified.

Parameters:
user -
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(User user,
                   org.ofbiz.core.entity.GenericValue issue)
Removes a vote for the user and issue specified.

Parameters:
user -
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

Collection getVoters(org.ofbiz.core.entity.GenericValue issue)
Return a list of voters for a particular issue.

Parameters:
issue -
Returns:
A collection of Users

isVotingEnabled

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

Returns:
True if voting is enabled

hasVoted

boolean hasVoted(User user,
                 org.ofbiz.core.entity.GenericValue issue)
Checks if the collection of getVoters(org.ofbiz.core.entity.GenericValue) contains the user supplied.

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


Copyright © 2002-2007 Atlassian. All Rights Reserved.