Class IssueLinksBeanBuilder
java.lang.Object
com.atlassian.jira.issue.fields.rest.json.beans.IssueLinksBeanBuilder
Builder for
IssueLinkJsonBean instances.- Since:
- v5.0
-
Constructor Summary
ConstructorsConstructorDescriptionIssueLinksBeanBuilder(ApplicationProperties applicationProperties, IssueLinkManager issueLinkManager, JiraAuthenticationContext authContext, JiraBaseUrls jiraBaseUrls, Issue issue) -
Method Summary
Modifier and TypeMethodDescriptionBuild a List of IssueLinkJsonBean objects representing the issue links for the current Issue object.buildLink(IssueLinkType issueLinkType, Issue issue, boolean isOutbound, String id) Builds an IssueLinkJsonBean from an IssueLink.Build an IssueLinkJsonBean object representing the parent link for the current Issue object.Build a List of IssueLinkJsonBean objects representing the sub-task links for the current Issue object.buildSubtaskLinks(Collection<Issue> subtasks) Build a List of IssueLinkJsonBean objects representing the sub-task links for the given collection of subtasks.
-
Constructor Details
-
IssueLinksBeanBuilder
public IssueLinksBeanBuilder(ApplicationProperties applicationProperties, IssueLinkManager issueLinkManager, JiraAuthenticationContext authContext, JiraBaseUrls jiraBaseUrls, Issue issue)
-
-
Method Details
-
buildIssueLinks
Build a List of IssueLinkJsonBean objects representing the issue links for the current Issue object.- Returns:
- a List of IssueLinkJsonBean objects, or null if issue linking is disabled, or an empty List if no issue links exist
-
buildLink
public IssueLinkJsonBean buildLink(IssueLinkType issueLinkType, Issue issue, boolean isOutbound, String id) Builds an IssueLinkJsonBean from an IssueLink.- Parameters:
issueLinkType- an IssueLinkType instanceissue- an Issue that is linked to this.issueisOutbound- a boolean indicating whether it's an outbound linkid- issue link id- Returns:
- an IssueLinkJsonBean
-
buildParentLink
Build an IssueLinkJsonBean object representing the parent link for the current Issue object.- Returns:
- an IssueLinkJsonBean object, or null if no parent link exists
-
buildSubtaskLinks
Build a List of IssueLinkJsonBean objects representing the sub-task links for the current Issue object.- Returns:
- a List of IssueLinkJsonBean objects, or an empty List if no sub-task links exist
-
buildSubtaskLinks
Build a List of IssueLinkJsonBean objects representing the sub-task links for the given collection of subtasks.- Parameters:
subtasks- the collection of subtasks to build links for- Returns:
- a List of IssueLinkJsonBean objects, or an empty List if no sub-task links exist
-