com.atlassian.jira.issue.link
Class LinkCollectionImpl

java.lang.Object
  extended by com.atlassian.jira.issue.link.LinkCollectionImpl
All Implemented Interfaces:
LinkCollection

public class LinkCollectionImpl
extends Object
implements LinkCollection


Constructor Summary
LinkCollectionImpl(Long issueId, Set<IssueLinkType> linkTypes, Map<String,List<Issue>> outwardLinkMap, Map<String,List<Issue>> inwardLinkMap, com.atlassian.crowd.embedded.api.User remoteUser, ApplicationProperties applicationProperties)
          Creates a new instance of this class.
LinkCollectionImpl(Long issueId, Set<IssueLinkType> linkTypes, Map<String,List<Issue>> outwardLinkMap, Map<String,List<Issue>> inwardLinkMap, com.atlassian.crowd.embedded.api.User remoteUser, boolean overrideSecurity, ApplicationProperties applicationProperties)
          Creates a new instance of this class.
 
Method Summary
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinkCollectionImpl

public LinkCollectionImpl(Long issueId,
                          Set<IssueLinkType> linkTypes,
                          Map<String,List<Issue>> outwardLinkMap,
                          Map<String,List<Issue>> inwardLinkMap,
                          com.atlassian.crowd.embedded.api.User remoteUser,
                          boolean overrideSecurity,
                          ApplicationProperties applicationProperties)
Creates a new instance of this class. Sort order can be specified in the application properties under APKeys.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
Since:
v4.4

LinkCollectionImpl

public LinkCollectionImpl(Long issueId,
                          Set<IssueLinkType> linkTypes,
                          Map<String,List<Issue>> outwardLinkMap,
                          Map<String,List<Issue>> inwardLinkMap,
                          com.atlassian.crowd.embedded.api.User remoteUser,
                          ApplicationProperties applicationProperties)
Creates a new instance of this class. Sort order can be specified in the application properties under APKeys.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
Since:
v4.4
Method Detail

getSortableFields

public static Collection<String> getSortableFields()
Provides the allowable fields that can be used to specify link sort order.

Returns:
the list of allowable fields.

getLinkTypes

public Set<IssueLinkType> getLinkTypes()
Description copied from interface: LinkCollection
Returns a set of link types, IssueLinkType objects.

Specified by:
getLinkTypes in interface LinkCollection
Returns:
a set of IssueLinkType objects

getOutwardIssues

public List<Issue> getOutwardIssues(String linkName)
Description copied from interface: LinkCollection
Looks up and returns a "sort.order" sorted list of all outward linked issues by given link name. May return null.

Specified by:
getOutwardIssues in interface LinkCollection
Parameters:
linkName - link name to lookup issues by
Returns:
a sorted list of browsable outward linked issues or null (sorry)

getInwardIssues

public List<Issue> getInwardIssues(String linkName)
Description copied from interface: LinkCollection
Looks up and returns a "sort.order" sorted list of all inward linked issues by given link name. May return null.

Specified by:
getInwardIssues in interface LinkCollection
Parameters:
linkName - link name to lookup issues by
Returns:
a sorted list of browsable inward linked issues

getAllIssues

public Collection<Issue> getAllIssues()
Description copied from interface: LinkCollection
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.

Specified by:
getAllIssues in interface LinkCollection
Returns:
a collection of all linked issues

isDisplayLinkPanel

public boolean isDisplayLinkPanel()
Description copied from interface: LinkCollection
Determine whether there are links visible to this user - do not display link panel if not

Specified by:
isDisplayLinkPanel in interface LinkCollection
Returns:
true if there are any outward or inward links, false otherwise


Copyright © 2002-2012 Atlassian. All Rights Reserved.