public interface

ApplicationLink

implements PropertySet
com.atlassian.applinks.api.ApplicationLink
Known Indirect Subclasses

Class Overview

Represents a link to a remote application-level entity (JIRA, Confluence, Bamboo, etc). You can store simple data against ApplicationLinks using the methods provided by the PropertySet interface. Note that these properties are shared between all plugins in the local application, so be careful to namespace your property keys carefully.

See Also

Summary

Public Methods
abstract ApplicationLinkRequestFactory createAuthenticatedRequestFactory(Class<? extends AuthenticationProvider> providerClass)
This method returns a ApplicationLinkRequestFactory initialised by the specified AuthenticationProvider.
abstract ApplicationLinkRequestFactory createAuthenticatedRequestFactory()
The ApplicationLinkRequestFactory returned by this method will choose a single AuthenticationProvider for automatically authenticating created Request objects.
abstract URI getDisplayUrl()
abstract ApplicationId getId()
This ApplicationId is subject to change if an administrator:
  • upgrades the remote application to use Unified Application Links (and this link was created prior to the upgrade); or
  • the remote application does not have Unified Application Links deployed, and its RPC URL changes.
abstract String getName()
abstract URI getRpcUrl()
abstract ApplicationType getType()
See the com.atlassian.applinks.api.application package for a list of ApplicationTypes bundled with the Unified Application Links plugin.
abstract boolean isPrimary()
[Expand]
Inherited Methods
From interface com.atlassian.applinks.api.PropertySet

Public Methods

public abstract ApplicationLinkRequestFactory createAuthenticatedRequestFactory (Class<? extends AuthenticationProvider> providerClass)

This method returns a ApplicationLinkRequestFactory initialised by the specified AuthenticationProvider. You should use this method only if your feature requires a specific AuthenticationProvider implementation. Note that this method will return null if an administrator of the local application has not configured the specified AuthenticationProvider for this ApplicationLink.

Parameters
providerClass the AuthenticationProvider type to use for the RequestFactory
Returns

public abstract ApplicationLinkRequestFactory createAuthenticatedRequestFactory ()

The ApplicationLinkRequestFactory returned by this method will choose a single AuthenticationProvider for automatically authenticating created Request objects. The selection algorithm is as follows:

  • If one or more ImpersonatingAuthenticationProviders are configured (for example, OAuth or Trusted Applications), one will be used. Trusted Applications will be returned in preference to OAuth if both are configured;
  • else if one or more NonImpersonatingAuthenticationProviders are configured (for example, Basic Auth), one will be used
  • else the request will be unauthenticated, and processed in the remote application anonymously.
Additional AuthenticationProviders can be implemented via the extension APIs in the applinks-spi module. If your feature only supports a single authentication method, you should use createAuthenticatedRequestFactory(Class)}.
Returns

public abstract URI getDisplayUrl ()

Returns
  • the base URL to be used when constructing links that are sent to clients, e.g. web browsers. The URI returned by this method will have no trailing slash. e.g. "https://mydomain.com/jira"

public abstract ApplicationId getId ()

This ApplicationId is subject to change if an administrator:

  • upgrades the remote application to use Unified Application Links (and this link was created prior to the upgrade); or
  • the remote application does not have Unified Application Links deployed, and its RPC URL changes.
If you are storing the ApplicationId for any reason, your plugin should listen for the ApplicationLinksIDChangedEvent.
Returns
  • the globally unique ID of the server at the other end of this link.

public abstract String getName ()

Returns
  • a brief identifier for the linked application e.g. "My FishEye". Note that this property is never guaranteed to be unique or immutable. Do not use as primary key (use ID instead).

public abstract URI getRpcUrl ()

Returns
  • the base URL to be used when constructing URIs to be used for RPC calls to this application (e.g. xml-rpc, SOAP or REST requests). The returned URI will have no trailing slash. e.g. "http://localhost:8080/jira"

public abstract ApplicationType getType ()

See the com.atlassian.applinks.api.application package for a list of ApplicationTypes bundled with the Unified Application Links plugin. Additional types can be added via the extension APIs in the applinks-spi module.

Returns

public abstract boolean isPrimary ()

Returns