Package com.atlassian.jira.issue.link
Class DefaultRemoteIssueLinkManager
java.lang.Object
com.atlassian.jira.issue.link.DefaultRemoteIssueLinkManager
- All Implemented Interfaces:
RemoteIssueLinkManager
Default implementation of the RemoteIssueLinkManager.
- Since:
- v5.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultRemoteIssueLinkManager
(RemoteIssueLinkStore remoteIssueLinkStore, IssueManager issueManager, IssueUpdater issueUpdater, I18nHelper.BeanFactory i18nBeanFactory, com.atlassian.event.api.EventPublisher eventPublisher, IssueIndexingService issueIndexingService) -
Method Summary
Modifier and TypeMethodDescriptioncreateRemoteIssueLink
(RemoteIssueLink remoteIssueLink, ApplicationUser user) Creates the given remote issue link.createRemoteIssuesFromRemoteIssueLinks
(List<RemoteIssueLink> remoteIssueLinks) Creates remote issues from remote issue links.findRemoteIssueLinksByGlobalIds
(Collection<String> globalIds) Returns the remote issue links that have any the given globalIds, or empty if none exists.getRemoteIssueLink
(Long remoteIssueLinkId) Returns the remote issue link with the given id, or null if it does not exist.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.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 idvoid
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.
-
Field Details
-
MAX_LONG_VARCHAR_LENGTH
public static final int MAX_LONG_VARCHAR_LENGTH- See Also:
-
MAX_GLOBAL_ID_LIST_SIZE_FOR_FIND
public static final int MAX_GLOBAL_ID_LIST_SIZE_FOR_FIND- See Also:
-
-
Constructor Details
-
DefaultRemoteIssueLinkManager
public DefaultRemoteIssueLinkManager(RemoteIssueLinkStore remoteIssueLinkStore, IssueManager issueManager, IssueUpdater issueUpdater, I18nHelper.BeanFactory i18nBeanFactory, com.atlassian.event.api.EventPublisher eventPublisher, IssueIndexingService issueIndexingService)
-
-
Method Details
-
getRemoteIssueLink
Description copied from interface:RemoteIssueLinkManager
Returns the remote issue link with the given id, or null if it does not exist.- Specified by:
getRemoteIssueLink
in interfaceRemoteIssueLinkManager
- Parameters:
remoteIssueLinkId
- the id of the remote issue link to get- Returns:
- the remote issue link with the given id
-
getRemoteIssueLinksForIssue
Description copied from interface:RemoteIssueLinkManager
Gets the remote issue links that link with the given JIRA issue.- Specified by:
getRemoteIssueLinksForIssue
in interfaceRemoteIssueLinkManager
- Parameters:
issue
- the issue to get the remote issue links for- Returns:
- the remote issue links for the given issue. This will never return null. If no remote issue links are stored against the issue, the list will be empty.
-
getRemoteIssueLinkByGlobalId
Description copied from interface:RemoteIssueLinkManager
Returns the first remote issue link found that links with the given JIRA issue and has the given globalId, or null if none exists.- Specified by:
getRemoteIssueLinkByGlobalId
in interfaceRemoteIssueLinkManager
- Parameters:
issue
- the issue to get the remote issue links forglobalId
- the globalId to get the remote issue link for- Returns:
- the remote issue link for the given issue with the given globalId
-
findRemoteIssueLinksByGlobalIds
public List<RemoteIssueLink> findRemoteIssueLinksByGlobalIds(Collection<String> globalIds) throws GetException Description copied from interface:RemoteIssueLinkManager
Returns the remote issue links that have any the given globalIds, or empty if none exists.- Specified by:
findRemoteIssueLinksByGlobalIds
in interfaceRemoteIssueLinkManager
- Parameters:
globalIds
- the globalIds to get the remote issue links for- Returns:
- the remote issue links with any of the given globalIds
- Throws:
GetException
- when the number of globalIds exceeds 100.
-
createRemoteIssueLink
public RemoteIssueLink createRemoteIssueLink(RemoteIssueLink remoteIssueLink, ApplicationUser user) throws CreateException Description copied from interface:RemoteIssueLinkManager
Creates the given remote issue link.- Specified by:
createRemoteIssueLink
in interfaceRemoteIssueLinkManager
- Parameters:
remoteIssueLink
- the remote issue link to createuser
- the current user- Returns:
- the RemoteIssueLink object that was created including the generated id
- Throws:
CreateException
-
createRemoteIssuesFromRemoteIssueLinks
public List<RemoteIssue> createRemoteIssuesFromRemoteIssueLinks(List<RemoteIssueLink> remoteIssueLinks) Description copied from interface:RemoteIssueLinkManager
Creates remote issues from remote issue links. This allows Velocities template engine to render a remote issue link as an issue.- Specified by:
createRemoteIssuesFromRemoteIssueLinks
in interfaceRemoteIssueLinkManager
- Parameters:
remoteIssueLinks
- the remote issue links for which remote issues should be generated- Returns:
- the remote issues for the provided issue, or an empty list if no remote issue links exist
-
updateRemoteIssueLink
public void updateRemoteIssueLink(RemoteIssueLink remoteIssueLink, ApplicationUser user) throws UpdateException Description copied from interface:RemoteIssueLinkManager
Updates the given remote issue link. The remote issue link is updated using all of the values in this object. Null values are written as null, and must adhere to the required field constraints.- Specified by:
updateRemoteIssueLink
in interfaceRemoteIssueLinkManager
- Parameters:
remoteIssueLink
- the remote issue link to updateuser
- the current user- Throws:
UpdateException
-
removeRemoteIssueLink
Description copied from interface:RemoteIssueLinkManager
Deletes the given remote issue link id.- Specified by:
removeRemoteIssueLink
in interfaceRemoteIssueLinkManager
- Parameters:
remoteIssueLinkId
- the id of the remote issue link to deleteuser
- the current user
-
removeRemoteIssueLinkByGlobalId
Description copied from interface:RemoteIssueLinkManager
Deletes any remote issue link that links with the given JIRA issue and has the given global id.- Specified by:
removeRemoteIssueLinkByGlobalId
in interfaceRemoteIssueLinkManager
- Parameters:
issue
- the issue of the remote issue linkglobalId
- the global id of the remote issue linkuser
- the current user
-
getTotalRemoteIssueLinkCountByGlobalId
Description copied from interface:RemoteIssueLinkManager
Get the total count of Remote Issue Links which have a given global id- Specified by:
getTotalRemoteIssueLinkCountByGlobalId
in interfaceRemoteIssueLinkManager
- Parameters:
globalId
- The global of the remote issue link- Returns:
- A count of remote issue links with that global id
-
onRemoteIssueLinkDecorated
-