public interface ManifestProducer
| Modifier and Type | Method and Description |
|---|---|
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. |
ApplicationStatus |
getStatus(URI url)
Returns the current state of the application located at the specified
Url.
|
Manifest getManifest(URI url) throws ManifestNotFoundException
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 ApplicationLinks.
Manifest.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.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.url - the base url of the remote application to create or retrieve
a Manifest from.Manifest. Never returns null.ManifestNotFoundException - if no manifest could be obtained.ApplicationStatus getStatus(URI url)
Returns the current state of the application located at the specified
Url. Since each ManifestProducer
is bound to a specific ApplicationType,
this method must implement the characteristics of that application type
to determine whether it is online or not.
Implementations could check for the presence of a known rest endpoint, or anything else that would confirm the application at the specified Url is of the correct type.
For applications that have no feasible way of detecting their state,
this method should return
ApplicationStatus.AVAILABLE.
url - baseUrl of the peer.Copyright © 2018 Atlassian. All rights reserved.