Package com.atlassian.jira.message
Interface MessageUtil
- All Superinterfaces:
BaseUrl
,I18nHelper
- All Known Implementing Classes:
MessageUtilImpl
A message utility that acts as a delegate to to the following utilities:
I18nHelper
, HelpUrls
, BaseUrl
and ExternalLinkUtil
.
This utility contains convenient methods to retrieve i18n messages, help urls and external urls.
- Since:
- 7.0
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface com.atlassian.jira.util.I18nHelper
I18nHelper.BeanFactory
-
Method Summary
Modifier and TypeMethodDescriptiongetAnchorTagWithInternalLink
(String keyOfLink) Get aString
representation of an anchor tag with an internal link and link text.Returns aHelpUrl
that can be used for generic JIRA help.getExternalLink
(String key) Get the external link for the specified key.getExternalLink
(String key, Object parameters) Get the external link for the specified key with the specified parameters formatted into the link.getExternalLink
(String key, String value1) Get the external link for the specified key with the specified parameter formatted into the link.getExternalLink
(String key, String value1, String value2) Get the external link for the specified key with the specified parameters formatted into the link.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.Get the external link for the specified key with the specified parameters formatted into the link.Returns aHelpUrl
associated with the passed key.Return all the keys that have an associatedHelpUrl
.Methods inherited from interface com.atlassian.jira.util.BaseUrl
getBaseUri, getBaseUrl, getCanonicalBaseUrl, resolveAddress, runWithStaticBaseUrl
Methods inherited from interface com.atlassian.jira.util.I18nHelper
getDefaultResourceBundle, getKeysForPrefix, getLocale, getResourceBundle, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getUnescapedText, getUntransformedRawText, isKeyDefined
-
Method Details
-
getUrl
Returns aHelpUrl
associated with the passed key. ThegetDefaultUrl()
URL is returned if thekey
has no associated URL.- Parameters:
key
- the key to search for.- Returns:
- the
HelpUrl
- See Also:
-
getDefaultUrl
Returns aHelpUrl
that can be used for generic JIRA help. It commonly points at the JIRA help index/landing page.- Returns:
- the default
HelpUrl
for this instance. - See Also:
-
getUrlKeys
Return all the keys that have an associatedHelpUrl
.- Returns:
- all the keys that have an associated
HelpUrl
. - See Also:
-
getExternalLink
Get the external link for the specified key.- Parameters:
key
- of the external link.- Returns:
- the external link or the specified key if the link was not found.
- See Also:
-
getExternalLink
Get the external link for the specified key with the specified parameter formatted into the link.- Parameters:
key
- of the external link.value1
- specified parameter.- Returns:
- the external link with the parameter formatted into the link or the specified key if the link was not found.
- See Also:
-
getExternalLink
Get the external link for the specified key with the specified parameters formatted into the link.- Parameters:
key
- of the external link.value1
- first specified parameter.value2
- second specified parameter.- Returns:
- the external link with the parameters formatted into the link or the specified key if the link was not found.
- See Also:
-
getExternalLink
Get the external link for the specified key with the specified parameters formatted into the link.- Parameters:
key
- of the external link.value1
- first specified parameter.value2
- second specified parameter.value3
- third specified parameter.- Returns:
- the external link with the parameters formatted into the link or the specified key if the link was not found.
- See Also:
-
getExternalLink
Get the external link for the specified key with the specified parameters formatted into the link.- Parameters:
key
- of the external link.value1
- first specified parameter.value2
- second specified parameter.value3
- third specified parameter.value4
- third specified parameter.- Returns:
- the external link with the parameters formatted into the link or the specified key if the link was not found.
- See Also:
-
getExternalLink
Get the external link for the specified key with the specified parameters formatted into the link.- Parameters:
key
- of the external link.parameters
- specified parameters, typically aList
of parameters.- Returns:
- the external link with the parameters formatted into the link or the specified key if the link was not found.
- See Also:
-
getAnchorTagWithInternalLink
Get aString
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
- Parameters:
keyOfLink
- the key for the internal link to be appended with the base URL.- Returns:
- a
String
representation of an anchor tag with an internal link and link text. - See Also:
-