Package com.atlassian.jira.issue.link
Class LinkCollectionImpl
java.lang.Object
com.atlassian.jira.issue.link.LinkCollectionImpl
- All Implemented Interfaces:
LinkCollection
-
Constructor Summary
ConstructorsConstructorDescriptionLinkCollectionImpl(Long issueId, Set<IssueLinkType> linkTypes, Map<String, List<Issue>> outwardLinkMap, Map<String, List<Issue>> inwardLinkMap, ApplicationUser remoteUser, boolean overrideSecurity, 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, ApplicationUser remoteUser, ApplicationProperties applicationProperties) Creates a new instance of this class. -
Method Summary
Modifier and TypeMethodDescriptionReturns a collection of issues that contains both inward and outward linking issues.getInwardIssues(String linkName) Looks up and returns a "sort.order" sorted list of all inward linked issues by given link name.Returns a set of link types,IssueLinkTypeobjects.getOutwardIssues(String linkName) Looks up and returns a "sort.order" sorted list of all outward linked issues by given link name.static Collection<String> Provides the allowable fields that can be used to specify link sort order.booleanDetermine whether there are links visible to this user - do not display link panel if not
-
Constructor Details
-
LinkCollectionImpl
public LinkCollectionImpl(Long issueId, Set<IssueLinkType> linkTypes, Map<String, List<Issue>> outwardLinkMap, Map<String, List<Issue>> inwardLinkMap, ApplicationUser remoteUser, boolean overrideSecurity, ApplicationProperties applicationProperties) Creates a new instance of this class. Sort order can be specified in the application properties underAPKeys.JIRA_VIEW_ISSUE_LINKS_SORT_ORDERkey.- Parameters:
issueId- issue generic value this link collection relates tolinkTypes- a set of link typesoutwardLinkMap- a map of outward linksinwardLinkMap- a map of inward linksremoteUser- user, used to filter the linked issuesoverrideSecurity- false if permissions should be checked when retrieving linksapplicationProperties- application properties- Since:
- v4.4
-
LinkCollectionImpl
public LinkCollectionImpl(Long issueId, Set<IssueLinkType> linkTypes, Map<String, List<Issue>> outwardLinkMap, Map<String, List<Issue>> inwardLinkMap, ApplicationUser remoteUser, ApplicationProperties applicationProperties) Creates a new instance of this class. Sort order can be specified in the application properties underAPKeys.JIRA_VIEW_ISSUE_LINKS_SORT_ORDERkey.- Parameters:
issueId- issue generic value this link collection relates tolinkTypes- a set of link typesoutwardLinkMap- a map of outward linksinwardLinkMap- a map of inward linksremoteUser- user, used to filter the linked issuesapplicationProperties- application properties- Since:
- v4.4
-
-
Method Details
-
getSortableFields
Provides the allowable fields that can be used to specify link sort order.- Returns:
- the list of allowable fields.
-
getLinkTypes
Description copied from interface:LinkCollectionReturns a set of link types,IssueLinkTypeobjects.- Specified by:
getLinkTypesin interfaceLinkCollection- Returns:
- a set of
IssueLinkTypeobjects
-
getOutwardIssues
Description copied from interface:LinkCollectionLooks up and returns a "sort.order" sorted list of all outward linked issues by given link name. May return null.- Specified by:
getOutwardIssuesin interfaceLinkCollection- Parameters:
linkName- link name to lookup issues by- Returns:
- a sorted list of browsable outward linked issues or null (sorry)
-
getInwardIssues
Description copied from interface:LinkCollectionLooks up and returns a "sort.order" sorted list of all inward linked issues by given link name. May return null.- Specified by:
getInwardIssuesin interfaceLinkCollection- Parameters:
linkName- link name to lookup issues by- Returns:
- a sorted list of browsable inward linked issues
-
getAllIssues
Description copied from interface:LinkCollectionReturns 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:
getAllIssuesin interfaceLinkCollection- Returns:
- a collection of all linked issues
-
isDisplayLinkPanel
public boolean isDisplayLinkPanel()Description copied from interface:LinkCollectionDetermine whether there are links visible to this user - do not display link panel if not- Specified by:
isDisplayLinkPanelin interfaceLinkCollection- Returns:
- true if there are any outward or inward links, false otherwise
-