public class DefaultRemoteIssueLinkManager extends Object implements RemoteIssueLinkManager
Modifier and Type | Field and Description |
---|---|
static int |
MAX_GLOBAL_ID_LIST_SIZE_FOR_FIND |
static int |
MAX_LONG_VARCHAR_LENGTH |
Constructor and Description |
---|
DefaultRemoteIssueLinkManager(RemoteIssueLinkStore remoteIssueLinkStore,
IssueManager issueManager,
IssueUpdater issueUpdater,
I18nHelper.BeanFactory i18nBeanFactory,
com.atlassian.event.api.EventPublisher eventPublisher,
IssueIndexingService issueIndexingService) |
Modifier and Type | Method and Description |
---|---|
RemoteIssueLink |
createRemoteIssueLink(RemoteIssueLink remoteIssueLink,
ApplicationUser user)
Creates the given remote issue link.
|
List<RemoteIssueLink> |
findRemoteIssueLinksByGlobalIds(Collection<String> globalIds)
Returns the remote issue links that have any the given globalIds, or empty if none exists.
|
RemoteIssueLink |
getRemoteIssueLink(Long remoteIssueLinkId)
Returns the remote issue link with the given id, or null if it does not exist.
|
RemoteIssueLink |
getRemoteIssueLinkByGlobalId(Issue issue,
String globalId)
Returns the first remote issue link found that links with the given JIRA issue and has the given globalId, or
null if none exists.
|
List<RemoteIssueLink> |
getRemoteIssueLinksForIssue(Issue issue)
Gets the remote issue links that link with the given JIRA issue.
|
long |
getTotalRemoteIssueLinkCountByGlobalId(String globalId)
Get the total count of Remote Issue Links which have a given global id
|
void |
removeRemoteIssueLink(Long remoteIssueLinkId,
ApplicationUser user)
Deletes the given remote issue link id.
|
void |
removeRemoteIssueLinkByGlobalId(Issue issue,
String globalId,
ApplicationUser user)
Deletes any remote issue link that links with the given JIRA issue and has the given global id.
|
void |
updateRemoteIssueLink(RemoteIssueLink remoteIssueLink,
ApplicationUser user)
Updates the given remote issue link.
|
public static final int MAX_LONG_VARCHAR_LENGTH
public static final int MAX_GLOBAL_ID_LIST_SIZE_FOR_FIND
public DefaultRemoteIssueLinkManager(RemoteIssueLinkStore remoteIssueLinkStore, IssueManager issueManager, IssueUpdater issueUpdater, I18nHelper.BeanFactory i18nBeanFactory, com.atlassian.event.api.EventPublisher eventPublisher, IssueIndexingService issueIndexingService)
public RemoteIssueLink getRemoteIssueLink(Long remoteIssueLinkId)
RemoteIssueLinkManager
getRemoteIssueLink
in interface RemoteIssueLinkManager
remoteIssueLinkId
- the id of the remote issue link to getpublic List<RemoteIssueLink> getRemoteIssueLinksForIssue(Issue issue)
RemoteIssueLinkManager
getRemoteIssueLinksForIssue
in interface RemoteIssueLinkManager
issue
- the issue to get the remote issue links forpublic RemoteIssueLink getRemoteIssueLinkByGlobalId(Issue issue, String globalId)
RemoteIssueLinkManager
getRemoteIssueLinkByGlobalId
in interface RemoteIssueLinkManager
issue
- the issue to get the remote issue links forglobalId
- the globalId to get the remote issue link forpublic List<RemoteIssueLink> findRemoteIssueLinksByGlobalIds(Collection<String> globalIds) throws GetException
RemoteIssueLinkManager
findRemoteIssueLinksByGlobalIds
in interface RemoteIssueLinkManager
globalIds
- the globalIds to get the remote issue links forGetException
- when the number of globalIds exceeds 100.public RemoteIssueLink createRemoteIssueLink(RemoteIssueLink remoteIssueLink, ApplicationUser user) throws CreateException
RemoteIssueLinkManager
createRemoteIssueLink
in interface RemoteIssueLinkManager
remoteIssueLink
- the remote issue link to createuser
- the current userCreateException
public void updateRemoteIssueLink(RemoteIssueLink remoteIssueLink, ApplicationUser user) throws UpdateException
RemoteIssueLinkManager
updateRemoteIssueLink
in interface RemoteIssueLinkManager
remoteIssueLink
- the remote issue link to updateuser
- the current userUpdateException
public void removeRemoteIssueLink(Long remoteIssueLinkId, ApplicationUser user)
RemoteIssueLinkManager
removeRemoteIssueLink
in interface RemoteIssueLinkManager
remoteIssueLinkId
- the id of the remote issue link to deleteuser
- the current userpublic void removeRemoteIssueLinkByGlobalId(Issue issue, String globalId, ApplicationUser user)
RemoteIssueLinkManager
removeRemoteIssueLinkByGlobalId
in interface RemoteIssueLinkManager
issue
- the issue of the remote issue linkglobalId
- the global id of the remote issue linkuser
- the current userpublic long getTotalRemoteIssueLinkCountByGlobalId(String globalId)
RemoteIssueLinkManager
getTotalRemoteIssueLinkCountByGlobalId
in interface RemoteIssueLinkManager
globalId
- The global of the remote issue linkCopyright © 2002-2022 Atlassian. All Rights Reserved.