Interface ApplicationLinkService
ApplicationLinks representing linked applications (e.g. JIRA, Confluence,
etc.)- Since:
- v3.0
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves anApplicationLinkby itsApplicationId.Retrieves all internalApplicationLinks.getApplicationLinks(Class<? extends ApplicationType> type) Retrieves allApplicationLinks of a particularApplicationType.getPrimaryApplicationLink(Class<? extends ApplicationType> type) Retrieves the primaryApplicationLinkof a particularApplicationType.
-
Method Details
-
getApplicationLink
Retrieves an
ApplicationLinkby itsApplicationId. Use this method only if you know theApplicationIdof an existingApplicationLink. If you storing anApplicationIdfor future look-ups using this method, you should listen for theApplicationLinksIDChangedEventto ensure your storedApplicationIdis 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.- Parameters:
id- theApplicationIdof a storedApplicationLink- Returns:
- the
ApplicationLinkspecified by the id, ornullif it does not exist - Throws:
TypeNotInstalledException- if the specifiedApplicationLink'sApplicationTypeis not currently installed.
-
getApplicationLinks
Iterable<ApplicationLink> getApplicationLinks()Retrieves all internalApplicationLinks. Note: if your code doesn't use the application link's property set, theReadOnlyApplicationLinkService.getApplicationLinks()could offer a better performing alternative. For external application links, useApplinkOAuth2Service.- Returns:
- an
Iterableof storedApplicationLinks, of allApplicationTypes.
-
getApplicationLinks
Retrieves allApplicationLinks of a particularApplicationType. Note: if your code doesn't use the application link's property set, theReadOnlyApplicationLinkService.getApplicationLinks(Class)could offer a better performing alternative.- Parameters:
type- theClassof theApplicationTypes to return- Returns:
- an
Iterablecontaining all storedApplicationLinks of the specified type. The primaryApplicationLinkis the first link in the list.
-
getPrimaryApplicationLink
Retrieves the primary
ApplicationLinkof a particularApplicationType. 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 allApplicationLinks of a particularApplicationType(like aggregating activity or searching) should usegetApplicationLinks(Class).Note: if your code doesn't use the application link's property set, the
ReadOnlyApplicationLinkService.getPrimaryApplicationLink(Class)could offer a better performing alternative.- Parameters:
type- an application type (e.g. "jira")- Returns:
- the primary
ApplicationLinkof the specified type
-