Interface IVotingManager


public interface IVotingManager
Access point to voting related features. Voting is relationship between user and work item, since
Author:
dobisekm
See Also:
  • Method Details

    • canVote

      boolean canVote(ITrackerUser user, IWorkItem item)
      Returns true if the user can vote for the item according to project voting rules. Security restrictions are not taken into account.
      Parameters:
      user -
      item -
    • isVotingEnabled

      boolean isVotingEnabled(IWorkItem item)
      Returns true if voting is not disabled for the Work Item.
      Parameters:
      item -
    • getVotesCount

      int getVotesCount(IWorkItem item)
      Returns number of users that voted for the item.
    • getVotes

      IPObjectList getVotes(IWorkItem item)
      Returns users that voted for the item (sorted by name).
    • hasVoted

      boolean hasVoted(ITrackerUser user, IWorkItem item)
      Returns true if the user has voted for the item.
      Parameters:
      item -
    • getPopularWorkItems

      List getPopularWorkItems(IProject[] projects)
      Returns a list of work items ordered descending by number of votes.
      Parameters:
      projects - the projects to get the work items for
      Returns:
      a List containing IWorkItems, ordered descending by number of votes