@PublicApi
public interface IssueLinkManager
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.
Modifier and Type | Method and Description |
---|---|
void |
changeIssueLinkType(IssueLink issueLink,
IssueLinkType swapLinkType,
ApplicationUser remoteUser)
Changes the type of an issue link.
|
default void |
clearCache()
Deprecated.
No replacement needed; just stop calling it. Since v7.0.
|
void |
createIssueLink(Long sourceIssueId,
Long destinationIssueId,
Long issueLinkTypeId,
Long sequence,
ApplicationUser remoteUser)
Constructs a new issuelink from the sourceIssueId to the destinationId and persists it.
|
List<IssueLink> |
getInwardLinks(Long destinationIssueId)
Get links to an issue.
|
IssueLink |
getIssueLink(Long issueLinkId)
Returns the
IssueLink with the specified id. |
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
IssueLink s for a particular issue link type |
LinkCollection |
getLinkCollection(org.ofbiz.core.entity.GenericValue issue,
ApplicationUser remoteUser)
Deprecated.
use
getLinkCollection(Issue, ApplicationUser) instead |
LinkCollection |
getLinkCollection(Issue issue,
ApplicationUser remoteUser)
Constructs a
LinkCollection for a given issue. |
LinkCollection |
getLinkCollection(Issue issue,
ApplicationUser remoteUser,
boolean excludeSystemLinks) |
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,
ApplicationUser remoteUser)
Removes a single issue link
We do not check for permission here.
|
int |
removeIssueLinks(org.ofbiz.core.entity.GenericValue issue,
ApplicationUser remoteUser)
Deprecated.
Use
#removeIssueLinks(com.atlassian.jira.issue.Issue, com.atlassian.crowd.embedded.api.User) instead. Since v5.0. |
int |
removeIssueLinks(Issue issue,
ApplicationUser remoteUser)
Removes ALL incoming and outgoing issuelinks from the issue supplied.
|
int |
removeIssueLinksNoChangeItems(Issue issue)
Removes ALL incoming and outgoing issuelinks from the issue supplied without creating ChangeItems for the Change History.
|
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.
|
void createIssueLink(Long sourceIssueId, Long destinationIssueId, Long issueLinkTypeId, Long sequence, ApplicationUser remoteUser) throws CreateException
sourceIssueId
- The source issue.destinationIssueId
- The destination issue.issueLinkTypeId
- The type of issuelinksequence
- In which order the link will appear in the UIremoteUser
- 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.void removeIssueLink(IssueLink issueLink, ApplicationUser remoteUser)
issueLink
- the issue link to removeremoteUser
- needed for creation of change itemsIllegalArgumentException
- if the supplied issueLink is null.int removeIssueLinks(org.ofbiz.core.entity.GenericValue issue, ApplicationUser remoteUser)
#removeIssueLinks(com.atlassian.jira.issue.Issue, com.atlassian.crowd.embedded.api.User)
instead. Since v5.0.issue
- the IssueremoteUser
- the remote userint removeIssueLinks(Issue issue, ApplicationUser remoteUser)
issue
- the IssueremoteUser
- the remote userint removeIssueLinksNoChangeItems(Issue issue)
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 IssueremoveIssueLinks(Issue, ApplicationUser)
LinkCollection getLinkCollection(org.ofbiz.core.entity.GenericValue issue, ApplicationUser remoteUser)
getLinkCollection(Issue, ApplicationUser)
insteadLinkCollection
for a given issue.issue
- the IssueremoteUser
- the remote userLinkCollection
with all the issues ingoing and outgoing issue linksLinkCollection getLinkCollection(Issue issue, ApplicationUser remoteUser, boolean excludeSystemLinks)
issue
- the issueremoteUser
- the user performing the searchexcludeSystemLinks
- whether or not to exclude system linksLinkCollection
with all the issues ingoing and outgoing issue links#getLinkCollection(com.atlassian.jira.issue.Issue, com.atlassian.crowd.embedded.api.User)
LinkCollection getLinkCollection(Issue issue, ApplicationUser remoteUser)
LinkCollection
for a given issue.issue
- the issueremoteUser
- the user performing the searchLinkCollection
with all the issues ingoing and outgoing issue linksLinkCollection getLinkCollectionOverrideSecurity(Issue issue)
LinkCollection
for a given issue, ignoring security.issue
- the issueLinkCollection
with all the issues ingoing and outgoing issue linksCollection<IssueLink> getIssueLinks(Long issueLinkTypeId)
IssueLink
s for a particular issue link typeissueLinkTypeId
- ID of the Issue Link TypeIssueLink
sIssueLink getIssueLink(Long issueLinkId)
IssueLink
with the specified id.issueLinkId
- the issue link id.IssueLink
. Can be NULL, if no issue link found.List<IssueLink> getOutwardLinks(Long sourceIssueId)
sourceIssueId
- Eg. from Issue.getId()
IssueLink
s. This list will be immutable.List<IssueLink> getInwardLinks(Long destinationIssueId)
destinationIssueId
- Eg. from Issue.getId()
IssueLink
s. This list will be immutable.void moveIssueLink(List<IssueLink> issueLinks, Long currentSequence, Long sequence)
issueLinks
- The list of issueLinkscurrentSequence
- The postion of the issuelink about to be movedsequence
- The target position of the issuelinkIllegalArgumentException
- If currentSequence or sequence are nullvoid resetSequences(List<IssueLink> issueLinks)
issueLinks
- A list of issue links to be recalculated@Nullable IssueLink getIssueLink(Long sourceId, Long destinationId, Long issueLinkTypeId)
sourceId
- the ID of the source issuedestinationId
- the ID of the destination issueissueLinkTypeId
- the issue link typeIssueLink
or null if this link does not existvoid changeIssueLinkType(IssueLink issueLink, IssueLinkType swapLinkType, ApplicationUser remoteUser)
issueLink
- the issue linkswapLinkType
- the new link typeremoteUser
- the user requesting this changeboolean isLinkingEnabled()
@Deprecated default void clearCache()
Copyright © 2002-2017 Atlassian. All Rights Reserved.