public interface ApplicationLinkUIService
CredentialsRequiredException indicating that the link is
unavailable. The servlet can use ApplicationLinkUIService as follows
to generate a standard message box with a "please authenticate with
[application name]" link:
ApplicationLinkUIService.MessageBuilder messageBuilder =
applicationLinkUIService.authorisationRequest(myAppLink)
.format(ApplicationLinkUIService.MessageFormat.BANNER);
String messageHtml = messageBuilder.getHtml();
ApplicationLinkUIService.MessageFormat.BANNER format is a standard AUI message box of
the "warning" style, which is meant to be displayed at the very top of a
page or a gadget. This is appropriate if the overall page/gadget content
depends on the application link's state; successful completion of the
authentication/authorisation flow will cause the page/gadget to be
refreshed. To display a smaller inline message that does not apply to
the entire page, use ApplicationLinkUIService.MessageFormat.INLINE instead.
I18nResolver mechanism.| Modifier and Type | Interface and Description |
|---|---|
static interface |
ApplicationLinkUIService.MessageBuilder
An HTML fragment builder returned by
authorisationRequest(ApplicationLink). |
static class |
ApplicationLinkUIService.MessageFormat
Constants to use in MessageBuilder#format(MessageFormat).
|
| Modifier and Type | Method and Description |
|---|---|
ApplicationLinkUIService.MessageBuilder |
authorisationRequest(ApplicationLink appLink)
Returns a
ApplicationLinkUIService.MessageBuilder to construct an HTML fragment with a
"please authenticate with [application]" message, and a link that lets the
user begin authentication. |
ApplicationLinkUIService.MessageBuilder authorisationRequest(ApplicationLink appLink)
ApplicationLinkUIService.MessageBuilder to construct an HTML fragment with a
"please authenticate with [application]" message, and a link that lets the
user begin authentication.appLink - an application link; cannot be nullApplicationLinkUIService.MessageBuilder; will not be nullCopyright © 2020 Atlassian. All rights reserved.