public class

LinkCollectionImpl

extends Object
implements LinkCollection
java.lang.Object
   ↳ com.atlassian.jira.issue.link.LinkCollectionImpl

Summary

Public Constructors
LinkCollectionImpl(Long issueId, Set<IssueLinkType> linkTypes, Map<StringList<Issue>> outwardLinkMap, Map<StringList<Issue>> inwardLinkMap, ApplicationUser remoteUser, boolean overrideSecurity, ApplicationProperties applicationProperties)
Creates a new instance of this class.
LinkCollectionImpl(Long issueId, Set<IssueLinkType> linkTypes, Map<StringList<Issue>> outwardLinkMap, Map<StringList<Issue>> inwardLinkMap, ApplicationUser remoteUser, ApplicationProperties applicationProperties)
Creates a new instance of this class.
Public Methods
Collection<Issue> getAllIssues()
Returns a collection of issues that contains both inward and outward linking issues.
List<Issue> getInwardIssues(String linkName)
Looks up and returns a "sort.order" sorted list of all inward linked issues by given link name.
Set<IssueLinkType> getLinkTypes()
Returns a set of link types, IssueLinkType objects.
List<Issue> getOutwardIssues(String linkName)
Looks up and returns a "sort.order" sorted list of all outward linked issues by given link name.
static Collection<String> getSortableFields()
Provides the allowable fields that can be used to specify link sort order.
boolean isDisplayLinkPanel()
Determine whether there are links visible to this user - do not display link panel if not
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.issue.link.LinkCollection

Public Constructors

public LinkCollectionImpl (Long issueId, Set<IssueLinkType> linkTypes, Map<StringList<Issue>> outwardLinkMap, Map<StringList<Issue>> inwardLinkMap, ApplicationUser remoteUser, boolean overrideSecurity, ApplicationProperties applicationProperties)

Creates a new instance of this class. Sort order can be specified in the application properties under JIRA_VIEW_ISSUE_LINKS_SORT_ORDER key.

Parameters
issueId issue generic value this link collection relates to
linkTypes a set of link types
outwardLinkMap a map of outward links
inwardLinkMap a map of inward links
remoteUser user, used to filter the linked issues
overrideSecurity false if permissions should be checked when retrieving links
applicationProperties application properties

public LinkCollectionImpl (Long issueId, Set<IssueLinkType> linkTypes, Map<StringList<Issue>> outwardLinkMap, Map<StringList<Issue>> inwardLinkMap, ApplicationUser remoteUser, ApplicationProperties applicationProperties)

Creates a new instance of this class. Sort order can be specified in the application properties under JIRA_VIEW_ISSUE_LINKS_SORT_ORDER key.

Parameters
issueId issue generic value this link collection relates to
linkTypes a set of link types
outwardLinkMap a map of outward links
inwardLinkMap a map of inward links
remoteUser user, used to filter the linked issues
applicationProperties application properties

Public Methods

public Collection<Issue> getAllIssues ()

Returns a collection of issues that contains both inward and outward linking issues. The returned collection is sorted by "sort.order" and does not contain duplicates.

Returns
  • a collection of all linked issues

public List<Issue> getInwardIssues (String linkName)

Looks up and returns a "sort.order" sorted list of all inward linked issues by given link name. May return null.

Parameters
linkName link name to lookup issues by
Returns
  • a sorted list of browsable inward linked issues

public Set<IssueLinkType> getLinkTypes ()

Returns a set of link types, IssueLinkType objects.

Returns

public List<Issue> getOutwardIssues (String linkName)

Looks up and returns a "sort.order" sorted list of all outward linked issues by given link name. May return null.

Parameters
linkName link name to lookup issues by
Returns
  • a sorted list of browsable outward linked issues or null (sorry)

public static Collection<String> getSortableFields ()

Provides the allowable fields that can be used to specify link sort order.

Returns
  • the list of allowable fields.

public boolean isDisplayLinkPanel ()

Determine whether there are links visible to this user - do not display link panel if not

Returns
  • true if there are any outward or inward links, false otherwise