public interface

ManifestProducer

com.atlassian.applinks.spi.manifest.ManifestProducer
Known Indirect Subclasses

Class Overview

Each application type implements and registers its own manifest retriever component.

Summary

Public Methods
abstract 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.

abstract ApplicationStatus getStatus(URI url)

Returns the current state of the application located at the specified Url.

Public Methods

public abstract 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 ApplicationLinks.

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.
Throws
ManifestNotFoundException if no manifest could be obtained.

public abstract 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 AVAILABLE.

Parameters
url baseUrl of the peer.