com.atlassian.jira.issue.link
Interface IssueLinkManager

All Known Implementing Classes:
DefaultIssueLinkManager

public interface IssueLinkManager

The implementations of this class are used to manage issue link types and issue links.


Method Summary
 void changeIssueLinkType(IssueLink issueLink, IssueLinkType swapLinkType, com.atlassian.crowd.embedded.api.User remoteUser)
          Changes the type of an issue link.
 void changeIssueLinkType(IssueLink issueLink, IssueLinkType swapLinkType, User remoteUser)
          Deprecated. Use changeIssueLinkType(IssueLink, IssueLinkType, com.atlassian.crowd.embedded.api.User) instead. Since v4.3
 void clearCache()
          Clears the Issue Link cache used by the Issue Link Manager.
 void createIssueLink(Long sourceIssueId, Long destinationIssueId, Long issueLinkTypeId, Long sequence, com.atlassian.crowd.embedded.api.User remoteUser)
          Constructs a new issuelink from the sourceIssueId to the destinationId and persists it.
 void createIssueLink(Long sourceIssueId, Long destinationIssueId, Long issueLinkTypeId, Long sequence, User remoteUser)
          Deprecated. Use createIssueLink(Long, Long, Long, Long, com.atlassian.crowd.embedded.api.User) instead. Since v4.3
 List<IssueLink> getInwardLinks(Long destinationIssueId)
          Get links to an issue.
 IssueLink getIssueLink(Long sourceId, Long destinationId, Long issueLinkTypeId)
          Retrieves an issue link given a source, destination and a link type.
 Collection<IssueLink> getIssueLinks(Long issueLinkTypeId)
          Returns a collection of all IssueLinks for a particular issue link type
 LinkCollection getLinkCollection(org.ofbiz.core.entity.GenericValue issue, User remoteUser)
          Deprecated. use getLinkCollection(com.atlassian.jira.issue.Issue, com.opensymphony.user.User) instead
 LinkCollection getLinkCollection(Issue issue, com.atlassian.crowd.embedded.api.User remoteUser)
          Constructs a LinkCollection for a given issue.
 LinkCollection getLinkCollection(Issue issue, User remoteUser)
          Deprecated. Use getLinkCollection(com.atlassian.jira.issue.Issue, com.atlassian.crowd.embedded.api.User) instead. Since v4.3
 LinkCollection getLinkCollectionOverrideSecurity(Issue issue)
          Constructs a LinkCollection for a given issue, ignoring security.
 List<IssueLink> getOutwardLinks(Long sourceIssueId)
          Get links from an issue.
 boolean isLinkingEnabled()
          Returns whether Issue Linking is currently enabled in JIRA.
 void moveIssueLink(List<IssueLink> issueLinks, Long currentSequence, Long sequence)
          Moves an issue link to a different position in the list of issuelink.
 void removeIssueLink(IssueLink issueLink, com.atlassian.crowd.embedded.api.User remoteUser)
          Removes a single issue link We do not check for permission here.
 void removeIssueLink(IssueLink issueLink, User remoteUser)
          Deprecated. Use removeIssueLink(IssueLink, com.atlassian.crowd.embedded.api.User) instead. Since v4.3
 int removeIssueLinks(org.ofbiz.core.entity.GenericValue issue, com.atlassian.crowd.embedded.api.User remoteUser)
          Removes ALL incoming and outgoing issuelinks from the issue supplied.
 int removeIssueLinks(org.ofbiz.core.entity.GenericValue issue, User remoteUser)
          Deprecated. Use removeIssueLinks(org.ofbiz.core.entity.GenericValue, com.atlassian.crowd.embedded.api.User) instead. Since v4.3
 void resetSequences(List<IssueLink> issueLinks)
          Sets the sequence number for each issueLink in the List of issueLinks provided according to its position in the List.
 

Method Detail

createIssueLink

void createIssueLink(Long sourceIssueId,
                     Long destinationIssueId,
                     Long issueLinkTypeId,
                     Long sequence,
                     com.atlassian.crowd.embedded.api.User remoteUser)
                     throws CreateException
Constructs a new issuelink from the sourceIssueId to the destinationId and persists it. This operation will cause a re-index of the associated issues.

Parameters:
sourceIssueId - The source issue.
destinationIssueId - The destination issue.
issueLinkTypeId - The type of issuelink
sequence - In which order the link will appear in the UI
remoteUser - Needed for creation of change items.
Throws:
CreateException - If there is an error when creating the "Change Item" for this operation. Note that the Link itself has most likely been created.

createIssueLink

void createIssueLink(Long sourceIssueId,
                     Long destinationIssueId,
                     Long issueLinkTypeId,
                     Long sequence,
                     User remoteUser)
                     throws CreateException
Deprecated. Use createIssueLink(Long, Long, Long, Long, com.atlassian.crowd.embedded.api.User) instead. Since v4.3

Constructs a new issuelink from the sourceIssueId to the destinationId and persists it. This operation will cause a re-index of the associated issues.

Parameters:
sourceIssueId - The source issue.
destinationIssueId - The destination issue.
issueLinkTypeId - The type of issuelink
sequence - In which order the link will appear in the UI
remoteUser - Needed for creation of change items.
Throws:
CreateException - If there is an error when creating the "Change Item" for this operation. Note that the Link itself has most likely been created.

removeIssueLink

void removeIssueLink(IssueLink issueLink,
                     com.atlassian.crowd.embedded.api.User remoteUser)
                     throws RemoveException
Removes a single issue link We do not check for permission here. It should be done before this method is called. For example, in the action.

Parameters:
issueLink - the issue link to remove
remoteUser - needed for creation of change items
Throws:
RemoveException - if error occurs during creation of change items
IllegalArgumentException - if the supplied issueLink is null.

removeIssueLink

void removeIssueLink(IssueLink issueLink,
                     User remoteUser)
                     throws RemoveException
Deprecated. Use removeIssueLink(IssueLink, com.atlassian.crowd.embedded.api.User) instead. Since v4.3

Removes a single issue link We do not check for permission here. It should be done before this method is called. For example, in the action.

Parameters:
issueLink - the issue link to remove
remoteUser - needed for creation of change items
Throws:
RemoveException - if error occurs during creation of change items
IllegalArgumentException - if the supplied issueLink is null.

removeIssueLinks

int removeIssueLinks(org.ofbiz.core.entity.GenericValue issue,
                     com.atlassian.crowd.embedded.api.User remoteUser)
                     throws RemoveException
Removes ALL incoming and outgoing issuelinks from the issue supplied.

Parameters:
issue -
remoteUser -
Returns:
The total number of issuelinks deleted.
Throws:
RemoveException

removeIssueLinks

int removeIssueLinks(org.ofbiz.core.entity.GenericValue issue,
                     User remoteUser)
                     throws RemoveException
Deprecated. Use removeIssueLinks(org.ofbiz.core.entity.GenericValue, com.atlassian.crowd.embedded.api.User) instead. Since v4.3

Removes ALL incoming and outgoing issuelinks from the issue supplied.

Parameters:
issue -
remoteUser -
Returns:
The total number of issuelinks deleted.
Throws:
RemoveException

getLinkCollection

LinkCollection getLinkCollection(org.ofbiz.core.entity.GenericValue issue,
                                 User remoteUser)
Deprecated. use getLinkCollection(com.atlassian.jira.issue.Issue, com.opensymphony.user.User) instead

Constructs a LinkCollection for a given issue.

Parameters:
issue -
remoteUser -
Returns:
A LinkCollection with all the issues ingoing and outgoing issue links

getLinkCollection

LinkCollection getLinkCollection(Issue issue,
                                 com.atlassian.crowd.embedded.api.User remoteUser)
Constructs a LinkCollection for a given issue.

Parameters:
issue - the issue
remoteUser - the user performing the search
Returns:
A LinkCollection with all the issues ingoing and outgoing issue links
Since:
v4.0

getLinkCollection

LinkCollection getLinkCollection(Issue issue,
                                 User remoteUser)
Deprecated. Use getLinkCollection(com.atlassian.jira.issue.Issue, com.atlassian.crowd.embedded.api.User) instead. Since v4.3

Constructs a LinkCollection for a given issue.

Parameters:
issue - the issue
remoteUser - the user performing the search
Returns:
A LinkCollection with all the issues ingoing and outgoing issue links
Since:
v4.0

getLinkCollectionOverrideSecurity

LinkCollection getLinkCollectionOverrideSecurity(Issue issue)
Constructs a LinkCollection for a given issue, ignoring security.

Parameters:
issue - the issue
Returns:
A LinkCollection with all the issues ingoing and outgoing issue links
Since:
v4.0

getIssueLinks

Collection<IssueLink> getIssueLinks(Long issueLinkTypeId)
Returns a collection of all IssueLinks for a particular issue link type

Parameters:
issueLinkTypeId - ID of the Issue Link Type
Returns:
A collection of IssueLinks

getOutwardLinks

List<IssueLink> getOutwardLinks(Long sourceIssueId)
Get links from an issue.

Parameters:
sourceIssueId - Eg. from Issue.getId()
Returns:
List of IssueLinks

getInwardLinks

List<IssueLink> getInwardLinks(Long destinationIssueId)
Get links to an issue.

Parameters:
destinationIssueId - Eg. from Issue.getId()
Returns:
List of IssueLinks

moveIssueLink

void moveIssueLink(List<IssueLink> issueLinks,
                   Long currentSequence,
                   Long sequence)
Moves an issue link to a different position in the list of issuelink. NOTE: This is currently only used when re-ordering sub-tasks.

Parameters:
issueLinks - The list of issueLinks
currentSequence - The postion of the issuelink about to be moved
sequence - The target position of the issuelink
Throws:
IllegalArgumentException - If currentSequence or sequence are null

resetSequences

void resetSequences(List<IssueLink> issueLinks)
Sets the sequence number for each issueLink in the List of issueLinks provided according to its position in the List.

Parameters:
issueLinks - A list of issue links to be recalculated

getIssueLink

IssueLink getIssueLink(Long sourceId,
                       Long destinationId,
                       Long issueLinkTypeId)
Retrieves an issue link given a source, destination and a link type.

Parameters:
sourceId -
destinationId -
issueLinkTypeId -
Returns:
an IssueLink

changeIssueLinkType

void changeIssueLinkType(IssueLink issueLink,
                         IssueLinkType swapLinkType,
                         com.atlassian.crowd.embedded.api.User remoteUser)
                         throws RemoveException
Changes the type of an issue link. NOTE: It is not possible to convert a system link type to a non-system link type and vice versa.

Parameters:
issueLink -
swapLinkType -
remoteUser -
Throws:
RemoveException

changeIssueLinkType

void changeIssueLinkType(IssueLink issueLink,
                         IssueLinkType swapLinkType,
                         User remoteUser)
                         throws RemoveException
Deprecated. Use changeIssueLinkType(IssueLink, IssueLinkType, com.atlassian.crowd.embedded.api.User) instead. Since v4.3

Changes the type of an issue link. NOTE: It is not possible to convert a system link type to a non-system link type and vice versa.

Parameters:
issueLink -
swapLinkType -
remoteUser -
Throws:
RemoveException

isLinkingEnabled

boolean isLinkingEnabled()
Returns whether Issue Linking is currently enabled in JIRA. Issue Linking can be enabled or disabled in the Admin section of JIRA.


clearCache

void clearCache()
Clears the Issue Link cache used by the Issue Link Manager.



Copyright © 2002-2011 Atlassian. All Rights Reserved.