@ExperimentalApi @ParametersAreNonnullByDefault @ReturnValuesAreNonnullByDefault public interface ApprovalService
Modifier and Type | Method and Description |
---|---|
com.atlassian.fugue.Either<com.atlassian.pocketknife.api.commons.error.AnError,Approval> |
answerApproval(com.atlassian.jira.user.ApplicationUser user,
Approval approval,
ApprovalDecisionType decision)
Answer to an approval of a given
approvalId
The answer could be approve or decline
Required permissions:
- User is an approver of the approval
- User can view the request that the approval belongs to |
com.atlassian.fugue.Either<com.atlassian.pocketknife.api.commons.error.AnError,Boolean> |
canAnswerApproval(com.atlassian.jira.user.ApplicationUser user,
Approval approval)
Return true if
user can answer this approval or false if:
- user is not approver of the passed in approval
- the approval is not pending anymore
- the issue that the approval belong to does not have the same current status as the approval configured
- user already made decision |
com.atlassian.fugue.Either<com.atlassian.pocketknife.api.commons.error.AnError,Approval> |
getApprovalById(com.atlassian.jira.user.ApplicationUser user,
int approvalId)
Return an
Approval for a given approvalId or AnError if:
- user does not have permission to view issue in customer portal context
- Approval was not found for the given approvalId |
com.atlassian.fugue.Either<com.atlassian.pocketknife.api.commons.error.AnError,PagedResponse<Approval>> |
getApprovals(com.atlassian.jira.user.ApplicationUser user,
ApprovalQuery approvalQuery)
Retrieve a page of
Approval of a particular ApprovalQuery |
com.atlassian.fugue.Either<com.atlassian.pocketknife.api.commons.error.AnError,List<Approver>> |
getApprovers(com.atlassian.jira.user.ApplicationUser user,
Approval approval)
Return a list of
Approver for a given approval |
ApprovalQuery.Builder |
newQueryBuilder() |
ApprovalQuery.Builder newQueryBuilder()
ApprovalQuery.Builder
to build approval querycom.atlassian.fugue.Either<com.atlassian.pocketknife.api.commons.error.AnError,PagedResponse<Approval>> getApprovals(com.atlassian.jira.user.ApplicationUser user, ApprovalQuery approvalQuery)
Approval
of a particular ApprovalQuery
user
- the user executing the queryapprovalQuery
- the query to retrieve approvalAnError
if failure, or a paged collection of Approval
com.atlassian.fugue.Either<com.atlassian.pocketknife.api.commons.error.AnError,Approval> getApprovalById(com.atlassian.jira.user.ApplicationUser user, int approvalId)
Approval
for a given approvalId
or AnError
if:
- user
does not have permission to view issue
in customer portal context
- Approval was not found for the given approvalId
user
- the user who is executing the actionApproval
associated with the given approval id
or AnError
.com.atlassian.fugue.Either<com.atlassian.pocketknife.api.commons.error.AnError,List<Approver>> getApprovers(com.atlassian.jira.user.ApplicationUser user, Approval approval)
Approver
for a given approval
com.atlassian.fugue.Either<com.atlassian.pocketknife.api.commons.error.AnError,Boolean> canAnswerApproval(com.atlassian.jira.user.ApplicationUser user, Approval approval)
user
can answer this approval or false if:
- user is not approver of the passed in approval
- the approval is not pending anymore
- the issue that the approval belong to does not have the same current status as the approval configured
- user already made decisionapproval
- the Approval
that we want to checkuser
can answer the given approval
or AnError
com.atlassian.fugue.Either<com.atlassian.pocketknife.api.commons.error.AnError,Approval> answerApproval(com.atlassian.jira.user.ApplicationUser user, Approval approval, ApprovalDecisionType decision)
approvalId
The answer could be approve or decline
Required permissions:
- User is an approver of the approval
- User can view the request that the approval belongs toApproval
or AnError
.Copyright © 2017 Atlassian. All rights reserved.