com.atlassian.jira.issue.link.IssueLinkManager |
Known Indirect Subclasses |
Clients of @PublicApi
can expect
that programs compiled against a given version will remain binary compatible with later versions of the
@PublicApi
as per each product's API policy as long as the client does not implement/extend
@PublicApi
interfaces or classes (refer to each product's API policy for the exact
guarantee---usually binary compatibility is guaranteed at least across minor versions).
@PublicApi
interfaces and classes are not designed to be implemented or extended by clients,
we may perform certain types of binary-incompatible changes to these classes and interfaces, but these will not
affect well-behaved clients that do not extend/implement these types (in general, only classes and interfaces
annotated with @PublicSpi
are safe to extend/implement).
The implementations of this class are used to manage issue link types
and issue links
.
WARNING: Prior to JIRA v7.0.1, most issue link queries were globally cached. This is no longer the case, and developers are advised to cache this information locally where they may have previously relied upon that caching behaviour for acceptable performance.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Changes the type of an issue link.
| |||||||||||
This method is deprecated.
No replacement needed; just stop calling it. Since v7.0.
| |||||||||||
Constructs a new issuelink from the sourceIssueId to the destinationId and persists it.
| |||||||||||
Get links to an issue.
| |||||||||||
Returns the
IssueLink with the specified id. | |||||||||||
Retrieves an issue link given a source, destination and a link type.
| |||||||||||
Returns a collection of all
IssueLink s for a particular issue link type | |||||||||||
This method is deprecated.
use
getLinkCollection(Issue, ApplicationUser) instead
| |||||||||||
Constructs a
LinkCollection for a given issue. | |||||||||||
Constructs a
LinkCollection for a given issue, ignoring security. | |||||||||||
Get links from an issue.
| |||||||||||
Returns whether Issue Linking is currently enabled in JIRA.
| |||||||||||
Moves an issue link to a different position in the list of issuelink.
| |||||||||||
Removes a single issue link
We do not check for permission here.
| |||||||||||
Removes ALL incoming and outgoing issuelinks from the issue supplied.
| |||||||||||
This method is deprecated.
Use #removeIssueLinks(com.atlassian.jira.issue.Issue, com.atlassian.crowd.embedded.api.User) instead. Since v5.0.
| |||||||||||
Removes ALL incoming and outgoing issuelinks from the issue supplied without creating ChangeItems for the Change History.
| |||||||||||
Sets the sequence number for each issueLink in the List of issueLinks provided
according to its position in the List.
|
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.
issueLink | the issue link |
---|---|
swapLinkType | the new link type |
remoteUser | the user requesting this change |
This method is deprecated.
No replacement needed; just stop calling it. Since v7.0.
Does nothing. This manager no longer has a cache.
Constructs a new issuelink from the sourceIssueId to the destinationId and persists it. This operation will cause a re-index of the associated issues.
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. |
CreateException | If there is an error when creating the "Change Item" for this operation. Note that the Link itself has most likely been created. |
---|
Retrieves an issue link given a source, destination and a link type.
sourceId | the ID of the source issue |
---|---|
destinationId | the ID of the destination issue |
issueLinkTypeId | the issue link type |
IssueLink
or null if this link does not exist
issue | the issue |
---|---|
remoteUser | the user performing the search |
excludeSystemLinks | whether or not to exclude system links |
LinkCollection
with all the issues ingoing and outgoing issue links
This method is deprecated.
use getLinkCollection(Issue, ApplicationUser)
instead
Constructs a LinkCollection
for a given issue.
issue | the Issue |
---|---|
remoteUser | the remote user |
LinkCollection
with all the issues ingoing and outgoing issue linksConstructs a LinkCollection
for a given issue.
issue | the issue |
---|---|
remoteUser | the user performing the search |
LinkCollection
with all the issues ingoing and outgoing issue linksConstructs a LinkCollection
for a given issue, ignoring security.
issue | the issue |
---|
LinkCollection
with all the issues ingoing and outgoing issue linksReturns whether Issue Linking is currently enabled in JIRA. Issue Linking can be enabled or disabled in the Admin section of JIRA.
Moves an issue link to a different position in the list of issuelink. NOTE: This is currently only used when re-ordering sub-tasks.
issueLinks | The list of issueLinks |
---|---|
currentSequence | The postion of the issuelink about to be moved |
sequence | The target position of the issuelink |
IllegalArgumentException | If currentSequence or sequence are null |
---|
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.
issueLink | the issue link to remove |
---|---|
remoteUser | needed for creation of change items |
IllegalArgumentException | if the supplied issueLink is null. |
---|
Removes ALL incoming and outgoing issuelinks from the issue supplied.
issue | the Issue |
---|---|
remoteUser | the remote user |
This method is deprecated.
Use #removeIssueLinks(com.atlassian.jira.issue.Issue, com.atlassian.crowd.embedded.api.User) instead. Since v5.0.
Removes ALL incoming and outgoing issuelinks from the issue supplied.
issue | the Issue |
---|---|
remoteUser | the remote user |
Removes ALL incoming and outgoing issuelinks from the issue supplied without creating ChangeItems for the Change History.
You would normally want to use the other method which creates the ChangeItems - this method is only intended for use during Issue Delete.
issue | the Issue |
---|
Sets the sequence number for each issueLink in the List of issueLinks provided according to its position in the List.
issueLinks | A list of issue links to be recalculated |
---|