com.atlassian.jira.bc.issue.vote.VoteService |
Known Indirect Subclasses |
Clients of @PublicApi
can expect
that programs compiled against a given version will remain binary compatible with later versions of the
@PublicApi
as per each product's API policy as long as the client does not implement/extend
@PublicApi
interfaces or classes (refer to each product's API policy for the exact
guarantee---usually binary compatibility is guaranteed at least across minor versions).
@PublicApi
interfaces and classes are not designed to be implemented or extended by clients,
we may perform certain types of binary-incompatible changes to these classes and interfaces, but these will not
affect well-behaved clients that do not extend/implement these types (in general, only classes and interfaces
annotated with @PublicSpi
are safe to extend/implement).
Vote Service used to add and remove votes from a particular issue. This service's methods will make sure that when voting, all of JIRA's business rules are enforced. This means that permissions and data validation will be checked.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
VoteService.VoteValidationResult | A simple validation result that holds the user trying to vote, and the issue being voted on. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adds a new vote using the specified validation result.
| |||||||||||
Get the list of vote history for an issue.
| |||||||||||
Find if the specified user has voted on an issue
| |||||||||||
Retrieves the 'jira.option.voting' property
| |||||||||||
Removes a new vote using the specified validation result.
| |||||||||||
Validates if the user currently logged in may add a vote by the user supplied for the issue provided.
| |||||||||||
Validates if the user currently logged in may remove a vote for the user supplied for the issue provided.
| |||||||||||
Get the list of all users who have voted on an issue.
|
Adds a new vote using the specified validation result. The vote will not be added if the user already voted for the issue.
remoteUser | The currently logged in user |
---|---|
validationResult | Validation result for adding a new vote |
Get the list of vote history for an issue. The history will be in time sequence.
issue | the issue to view |
---|---|
remoteUser | the user who wants to know |
Find if the specified user has voted on an issue
issue | the issue to check |
---|---|
user | the user to check |
Retrieves the 'jira.option.voting' property
Removes a new vote using the specified validation result. The vote will not be removed if the user didn't voted for the issue.
remoteUser | The currently logged in user |
---|---|
validationResult | Validation result for removing a new vote |
Validates if the user currently logged in may add a vote by the user supplied for the issue provided.
The remoteUser and user arguments may be the same if the current user is voting him/herself. The
VoteService.VoteValidationResult
produced by this method should be
used in conjunction with the addVote(ApplicationUser, VoteValidationResult)
method.
The following conditions will fail validation:
remoteUser | The currently logged in user |
---|---|
user | The user for whom a vote is being added |
issue | The issue being voted on |
Validates if the user currently logged in may remove a vote for the user supplied for the issue provided.
The remoteUser and user arguments may be the same if the current user is voting him/herself. The
VoteService.VoteValidationResult
produced by this method should be
used in conjunction with the removeVote(ApplicationUser, VoteValidationResult)
method.
The following conditions will fail validation:
remoteUser | The currently logged in user |
---|---|
user | The user for whom a vote is being removed |
issue | The issue being voted on |
Get the list of all users who have voted on an issue.
issue | the issue to view |
---|---|
remoteUser | the user who wants to know |