public interface MessageUtil extends I18nHelper, BaseUrl
I18nHelper
, HelpUrls
, BaseUrl
and ExternalLinkUtil
.
This utility contains convenient methods to retrieve i18n messages, help urls and external urls.
Modifier and Type | Interface and Description |
---|---|
static interface |
MessageUtil.Factory |
I18nHelper.BeanFactory
Modifier and Type | Method and Description |
---|---|
String |
getAnchorTagWithInternalLink(String keyOfLink)
Get a
String representation of an anchor tag with an internal link and link text. |
HelpUrl |
getDefaultUrl()
Returns a
HelpUrl that can be used for generic JIRA help. |
String |
getExternalLink(String key)
Get the external link for the specified key.
|
String |
getExternalLink(String key,
Object parameters)
Get the external link for the specified key with the specified parameters formatted into the link.
|
String |
getExternalLink(String key,
String value1)
Get the external link for the specified key with the specified parameter formatted into the link.
|
String |
getExternalLink(String key,
String value1,
String value2)
Get the external link for the specified key with the specified parameters formatted into the link.
|
String |
getExternalLink(String key,
String value1,
String value2,
String value3)
Get the external link for the specified key with the specified parameters formatted into the link.
|
String |
getExternalLink(String key,
String value1,
String value2,
String value3,
String value4)
Get the external link for the specified key with the specified parameters formatted into the link.
|
HelpUrl |
getUrl(String key)
Returns a
HelpUrl associated with the passed key. |
Set<String> |
getUrlKeys()
Return all the keys that have an associated
HelpUrl . |
getDefaultResourceBundle, getKeysForPrefix, getLocale, getResourceBundle, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getUnescapedText, getUntransformedRawText, isKeyDefined
getBaseUri, getBaseUrl, getCanonicalBaseUrl, runWithStaticBaseUrl
@Nonnull HelpUrl getUrl(String key)
HelpUrl
associated with the passed key. The getDefaultUrl()
URL is returned if the key
has no associated URL.key
- the key to search for.HelpUrl
HelpUrls.getUrl(String)
@Nonnull HelpUrl getDefaultUrl()
HelpUrl
that can be used for generic JIRA help. It commonly points at
the JIRA help index/landing page.HelpUrl
for this instance.HelpUrls.getDefaultUrl()
@Nonnull Set<String> getUrlKeys()
HelpUrl
.HelpUrl
.HelpUrls.getUrlKeys()
String getExternalLink(String key)
key
- of the external link.ExternalLinkUtil.getProperty(String)
String getExternalLink(String key, String value1)
key
- of the external link.value1
- specified parameter.ExternalLinkUtil.getProperty(String, String)
String getExternalLink(String key, String value1, String value2)
key
- of the external link.value1
- first specified parameter.value2
- second specified parameter.ExternalLinkUtil.getProperty(String, String, String)
String getExternalLink(String key, String value1, String value2, String value3)
key
- of the external link.value1
- first specified parameter.value2
- second specified parameter.value3
- third specified parameter.ExternalLinkUtil.getProperty(String, String, String, String)
String getExternalLink(String key, String value1, String value2, String value3, String value4)
key
- of the external link.value1
- first specified parameter.value2
- second specified parameter.value3
- third specified parameter.value4
- third specified parameter.ExternalLinkUtil.getProperty(String, String, String, String, String)
String getExternalLink(String key, Object parameters)
key
- of the external link.parameters
- specified parameters, typically a List
of parameters.ExternalLinkUtil.getProperty(String, Object)
String getAnchorTagWithInternalLink(String keyOfLink)
String
representation of an anchor tag with an internal link and link text. The internal link would
be the JIRA base url with the path of the specified key appended.
Example for default implementation:
#Config internal-help-paths.properties: app_access_local.path=/secure/admin/ApplicationAccess.jspa app_access_local.title=application.access.configuration.title #Config JiraWebActionSupport.properties: application.access.configuration.title=Application Access #Usage: messageUtil.getAnchorTagWithInternalLink("app_access_local"); #Result: Application access
keyOfLink
- the key for the internal link to be appended with the base URL.String
representation of an anchor tag with an internal link and link text.I18nHelper
Copyright © 2002-2019 Atlassian. All Rights Reserved.