@PublicApi @ParametersAreNonnullByDefault @ReturnValuesAreNonnullByDefault public interface ApprovalService
Modifier and Type | Method and Description |
---|---|
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 |
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 |
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 |
PagedResponse<Approval> |
getApprovals(com.atlassian.jira.user.ApplicationUser user,
ApprovalQuery approvalQuery)
Retrieve a page of
Approval of a particular ApprovalQuery |
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 queryPagedResponse<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 approvalApproval
ServiceDeskServiceException
- on errorApproval 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 idServiceDeskServiceException
- on errorList<Approver> getApprovers(com.atlassian.jira.user.ApplicationUser user, Approval approval)
Approver
for a given approval
approval
- the Approval
that we want to retrieve Approver
fromApprover
associated with the given approvalServiceDeskServiceException
- on errorBoolean 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
ServiceDeskServiceException
- on errorApproval 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
ServiceDeskServiceException
- on errorCopyright © 2020 Atlassian. All rights reserved.