public interface ApplicationLinkService
ApplicationLinks representing linked applications (e.g. JIRA, Confluence,
etc.)| Modifier and Type | Method and Description |
|---|---|
ApplicationLink |
getApplicationLink(ApplicationId id)
Retrieves an
ApplicationLink by its ApplicationId. |
Iterable<ApplicationLink> |
getApplicationLinks()
Retrieves all
ApplicationLinks. |
Iterable<ApplicationLink> |
getApplicationLinks(Class<? extends ApplicationType> type)
Retrieves all
ApplicationLinks of a particular ApplicationType. |
ApplicationLink |
getPrimaryApplicationLink(Class<? extends ApplicationType> type)
Retrieves the primary
ApplicationLink of a particular ApplicationType. |
ApplicationLink getApplicationLink(ApplicationId id) throws TypeNotInstalledException
Retrieves an ApplicationLink by its ApplicationId. Use this method only if you know the
ApplicationId of an existing ApplicationLink. If you storing an ApplicationId for
future look-ups using this method, you should listen for the ApplicationLinksIDChangedEvent to ensure
your stored ApplicationId is kept current.
Note: if your code doesn't use the application link's property set, then
ReadOnlyApplicationLinkService.getApplicationLink(ApplicationId) could offer a better performing
alternative.
id - the ApplicationId of a stored ApplicationLinkApplicationLink specified by the id, or null if it does not existTypeNotInstalledException - if the specified ApplicationLink's ApplicationType is
not currently installed.Iterable<ApplicationLink> getApplicationLinks()
ApplicationLinks. Note: if your code doesn't use the application link's
property set, the ReadOnlyApplicationLinkService.getApplicationLinks() could offer a better performing
alternative.Iterable of stored ApplicationLinks, of all
ApplicationTypes.Iterable<ApplicationLink> getApplicationLinks(Class<? extends ApplicationType> type)
ApplicationLinks of a particular ApplicationType. Note: if your
code doesn't use the application link's property set, the
ReadOnlyApplicationLinkService.getApplicationLinks(Class) could offer a better performing alternative.type - the Class of the ApplicationTypes to returnIterable containing all stored ApplicationLinks of the specified type.
The primary ApplicationLink is the first link in the list.ApplicationLink getPrimaryApplicationLink(Class<? extends ApplicationType> type)
Retrieves the primary ApplicationLink of a particular ApplicationType. This
method should be used when you are implementing an integration feature that requires just one remote
entity, for example: determining which linked JIRA project to create an issue in, or which linked Confluence
space to create a page in. Features that require all ApplicationLinks of a particular
ApplicationType (like aggregating activity or searching) should use getApplicationLinks(Class).
Note: if your code doesn't use the application link's property set, the
ReadOnlyApplicationLinkService.getPrimaryApplicationLink(Class) could offer a better performing
alternative.
type - an application type (e.g. "jira")ApplicationLink of the specified typeCopyright © 2020 Atlassian. All rights reserved.