com.atlassian.jira.issue.fields.rest.json.beans
Class IssueLinksBeanBuilder

java.lang.Object
  extended by com.atlassian.jira.issue.fields.rest.json.beans.IssueLinksBeanBuilder

public class IssueLinksBeanBuilder
extends Object

Builder for IssueLinkJsonBean instances.

Since:
v5.0

Constructor Summary
IssueLinksBeanBuilder(ApplicationProperties applicationProperties, IssueLinkManager issueLinkManager, JiraAuthenticationContext authContext, JiraBaseUrls jiraBaseUrls, Issue issue)
           
 
Method Summary
 List<IssueLinkJsonBean> buildIssueLinks()
          Build a List of IssueLinkJsonBean objects representing the issue links for the current Issue object.
 IssueLinkJsonBean buildLink(IssueLinkType issueLinkType, Issue issue, boolean isOutbound, String id)
          Builds an IssueLinkJsonBean from an IssueLink.
 IssueRefJsonBean buildParentLink()
          Build an IssueLinkJsonBean object representing the parent link for the current Issue object.
 List<IssueRefJsonBean> buildSubtaskLinks()
          Build a List of IssueLinkJsonBean objects representing the sub-task links for the current Issue object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IssueLinksBeanBuilder

public IssueLinksBeanBuilder(ApplicationProperties applicationProperties,
                             IssueLinkManager issueLinkManager,
                             JiraAuthenticationContext authContext,
                             JiraBaseUrls jiraBaseUrls,
                             Issue issue)
Method Detail

buildIssueLinks

public List<IssueLinkJsonBean> 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 instance
issue - an Issue that is linked to this.issue
isOutbound - a boolean indicating whether it's an outbound link
id - issue link id
Returns:
an IssueLinkJsonBean

buildParentLink

public IssueRefJsonBean 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

public List<IssueRefJsonBean> 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


Copyright © 2002-2013 Atlassian. All Rights Reserved.