public class DefaultIssueLinkManager extends Object implements IssueLinkManager
| Constructor and Description |
|---|
DefaultIssueLinkManager(OfBizDelegator genericDelegator,
QueryDslAccessor queryDslAccessor,
IssueLinkCreator issueLinkCreator,
IssueLinkTypeManager issueLinkTypeManager,
IssueUpdater issueUpdater,
IssueIndexingService issueIndexingService,
ApplicationProperties applicationProperties,
RequestCacheFactory requestCacheFactory,
com.atlassian.event.api.EventPublisher eventPublisher) |
| Modifier and Type | Method and Description |
|---|---|
void |
changeIssueLinkType(IssueLink issueLink,
IssueLinkType swapLinkType,
ApplicationUser remoteUser)
Changes the type of an issue link.
|
void |
createIssueLink(Long sourceId,
Long destinationId,
Long issueLinkTypeId,
Long sequence,
ApplicationUser remoteUser)
Constructs a new issuelink from the sourceIssueId to the destinationId and persists it.
|
List<IssueLink> |
getInwardLinks(Long destinationId)
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
IssueLinks for a particular issue link type |
LinkCollection |
getLinkCollection(org.ofbiz.core.entity.GenericValue issue,
ApplicationUser remoteUser)
Constructs a
LinkCollection for a given issue. |
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 sourceId)
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.
|
protected void |
reindexLinkedIssues(IssueLink 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)
Removes ALL incoming and outgoing issuelinks from the issue supplied.
|
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclearCachepublic DefaultIssueLinkManager(OfBizDelegator genericDelegator, QueryDslAccessor queryDslAccessor, IssueLinkCreator issueLinkCreator, IssueLinkTypeManager issueLinkTypeManager, IssueUpdater issueUpdater, IssueIndexingService issueIndexingService, ApplicationProperties applicationProperties, RequestCacheFactory requestCacheFactory, com.atlassian.event.api.EventPublisher eventPublisher)
public void createIssueLink(Long sourceId, Long destinationId, Long issueLinkTypeId, Long sequence, ApplicationUser remoteUser) throws CreateException
IssueLinkManagercreateIssueLink in interface IssueLinkManagersourceId - The source issue.destinationId - 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.protected void reindexLinkedIssues(IssueLink issueLink)
public void removeIssueLink(IssueLink issueLink, ApplicationUser remoteUser)
IssueLinkManagerremoveIssueLink in interface IssueLinkManagerissueLink - the issue link to removeremoteUser - needed for creation of change itemspublic int removeIssueLinks(Issue issue, ApplicationUser remoteUser)
IssueLinkManagerremoveIssueLinks in interface IssueLinkManagerissue - the IssueremoteUser - the remote userpublic int removeIssueLinks(org.ofbiz.core.entity.GenericValue issue,
ApplicationUser remoteUser)
IssueLinkManagerremoveIssueLinks in interface IssueLinkManagerissue - the IssueremoteUser - the remote userpublic int removeIssueLinksNoChangeItems(Issue issue)
IssueLinkManagerYou would normally want to use the other method which creates the ChangeItems - this method is only intended for use during Issue Delete.
removeIssueLinksNoChangeItems in interface IssueLinkManagerissue - the IssueIssueLinkManager.removeIssueLinks(Issue, ApplicationUser)public LinkCollection getLinkCollection(org.ofbiz.core.entity.GenericValue issue, ApplicationUser remoteUser)
IssueLinkManagerLinkCollection for a given issue.getLinkCollection in interface IssueLinkManagerissue - the IssueremoteUser - the remote userLinkCollection with all the issues ingoing and outgoing issue linkspublic LinkCollection getLinkCollection(Issue issue, ApplicationUser remoteUser)
IssueLinkManagerLinkCollection for a given issue.getLinkCollection in interface IssueLinkManagerissue - the issueremoteUser - the user performing the searchLinkCollection with all the issues ingoing and outgoing issue linkspublic LinkCollection getLinkCollection(Issue issue, ApplicationUser remoteUser, boolean excludeSystemLinks)
getLinkCollection in interface IssueLinkManagerissue - 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)public LinkCollection getLinkCollectionOverrideSecurity(Issue issue)
IssueLinkManagerLinkCollection for a given issue, ignoring security.getLinkCollectionOverrideSecurity in interface IssueLinkManagerissue - the issueLinkCollection with all the issues ingoing and outgoing issue linkspublic List<IssueLink> getOutwardLinks(Long sourceId)
IssueLinkManagergetOutwardLinks in interface IssueLinkManagersourceId - Eg. from Issue.getId()IssueLinks. This list will be immutable.public List<IssueLink> getInwardLinks(Long destinationId)
IssueLinkManagergetInwardLinks in interface IssueLinkManagerdestinationId - Eg. from Issue.getId()IssueLinks. This list will be immutable.public void moveIssueLink(List<IssueLink> issueLinks, Long currentSequence, Long sequence)
IssueLinkManagermoveIssueLink in interface IssueLinkManagerissueLinks - The list of issueLinkscurrentSequence - The postion of the issuelink about to be movedsequence - The target position of the issuelinkpublic void resetSequences(List<IssueLink> issueLinks)
IssueLinkManagerresetSequences in interface IssueLinkManagerissueLinks - A list of issue links to be recalculatedpublic IssueLink getIssueLink(Long sourceId, Long destinationId, Long issueLinkTypeId)
IssueLinkManagergetIssueLink in interface IssueLinkManagersourceId - the ID of the source issuedestinationId - the ID of the destination issueissueLinkTypeId - the issue link typeIssueLink or null if this link does not existpublic Collection<IssueLink> getIssueLinks(Long issueLinkTypeId)
IssueLinkManagerIssueLinks for a particular issue link typegetIssueLinks in interface IssueLinkManagerissueLinkTypeId - ID of the Issue Link TypeIssueLinkspublic IssueLink getIssueLink(Long issueLinkId)
IssueLinkManagerIssueLink with the specified id.getIssueLink in interface IssueLinkManagerissueLinkId - the issue link id.IssueLink. Can be NULL, if no issue link found.public void changeIssueLinkType(IssueLink issueLink, IssueLinkType swapLinkType, ApplicationUser remoteUser)
IssueLinkManagerchangeIssueLinkType in interface IssueLinkManagerissueLink - the issue linkswapLinkType - the new link typeremoteUser - the user requesting this changepublic boolean isLinkingEnabled()
IssueLinkManagerisLinkingEnabled in interface IssueLinkManagerCopyright © 2002-2017 Atlassian. All Rights Reserved.