Package com.polarion.alm.tracker
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 Summary
Modifier and TypeMethodDescriptionboolean
canVote
(ITrackerUser user, IWorkItem item) Returns true if the user can vote for the item according to project voting rules.getPopularWorkItems
(IProject[] projects) Returns a list of work items ordered descending by number of votes.Returns users that voted for the item (sorted by name).int
getVotesCount
(IWorkItem item) Returns number of users that voted for the item.boolean
hasVoted
(ITrackerUser user, IWorkItem item) Returnstrue
if the user has voted for the item.boolean
isVotingEnabled
(IWorkItem item) Returns true if voting is not disabled for the Work Item.
-
Method Details
-
canVote
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
Returns true if voting is not disabled for the Work Item.- Parameters:
item
-
-
getVotesCount
Returns number of users that voted for the item. -
getVotes
Returns users that voted for the item (sorted by name). -
hasVoted
Returnstrue
if the user has voted for the item.- Parameters:
item
-
-
getPopularWorkItems
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
containingIWorkItem
s, ordered descending by number of votes
-