java.lang.Object |
↳ |
com.atlassian.applinks.core.manifest.AppLinksManifestProducer |
Known Direct Subclasses
|
Class Overview
Abstract base class for all AppLinks manifest producers.
These producers will first attempt to download the manifest and if that
fails (either because the peer is offline, is an older non-applinks-capable
version, or is a different kind of app altogether), it will delegate to the
actual subclass to create a manifest locally.
Fields
protected
final
WebResourceManager
webResourceManager
Protected Constructors
protected
AppLinksManifestProducer
(RequestFactory<Request<Request<?, Response>, Response>> requestFactory, AppLinksManifestDownloader downloader, WebResourceManager webResourceManager, AppLinkPluginUtil AppLinkPluginUtil)
Public Methods
public
Manifest
getManifest
(URI url)
During ApplicationLink
registration via the administrative UI, the user is prompted to choose what type
of remote application they are linking to. If selected, this NonAppLinksApplicationType
will be asked to provide a manifest for the URI
provided by the user.
The Manifest
can either be created completely locally with pre-determined values, or with some
interaction with the remote application. A local implementation is far simpler to implement, but has the drawback
of allowing users to configure spurious, non-functional ApplicationLink
s.
Considerations:
getId()
should return a consistent, unique value for a particular application instance.
ApplicationIdUtil
has been provided to assist in generating a consistent id for a given base url.
Implementations that do not retrieve a unique ID from the remote application should always delegate to
ApplicationIdUtil
.
- The
ManifestNotFoundException
may be thrown to indicate that communication with the remote application
failed, causing the implementation to be unable to create a Manifest
object.
Implementations that synthesise the Manifest
locally should have no need of this exception.
Parameters
url
| the base url of the remote application to create or retrieve
a Manifest from. |
Returns
- the created or retrieved
Manifest
. Never returns null.
Does a GET on the baseurl and expects a 200 status code.
Protected Methods
protected
Version
getApplicationAppLinksVersion
()
protected
Long
getApplicationBuildNumber
()
protected
abstract
String
getApplicationName
()
protected
abstract
TypeId
getApplicationTypeId
()
protected
String
getApplicationVersion
()