Package com.atlassian.jira.help
Class DefaultHelpUrlsLoader
java.lang.Object
com.atlassian.jira.help.DefaultHelpUrlsLoader
- All Implemented Interfaces:
HelpUrlsLoader
,com.google.common.base.Function<HelpUrlsLoader.HelpUrlsLoaderKey,
,HelpUrls> Function<HelpUrlsLoader.HelpUrlsLoaderKey,
HelpUrls>
- Since:
- v6.2.4
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.atlassian.jira.help.HelpUrlsLoader
HelpUrlsLoader.HelpUrlsLoaderKey
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultHelpUrlsLoader
(HelpResourceBundleLoader helpResourceBundleLoader, JiraAuthenticationContext ctx, LocalHelpUrls localHelpUrls, I18nHelper.BeanFactory i18n, HelpUrlsParserBuilderFactory parserBuilderFactory, HelpUrlsApplicationKeyProvider helpUrlsApplicationKeyProvider, ApplicationHelpSpaceProvider applicationHelpSpaceProvider) -
Method Summary
Modifier and TypeMethodDescriptionReturn theHelpUrls
associated with the passedHelpUrlsLoader.HelpUrlsLoaderKey
.keyForApplication
(com.atlassian.application.api.ApplicationKey applicationKey) Return theHelpUrlsLoader.HelpUrlsLoaderKey
associated with the application key provided.Return theHelpUrlsLoader.HelpUrlsLoaderKey
associated with the calling user.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.google.common.base.Function
equals
-
Constructor Details
-
DefaultHelpUrlsLoader
public DefaultHelpUrlsLoader(HelpResourceBundleLoader helpResourceBundleLoader, JiraAuthenticationContext ctx, LocalHelpUrls localHelpUrls, I18nHelper.BeanFactory i18n, HelpUrlsParserBuilderFactory parserBuilderFactory, HelpUrlsApplicationKeyProvider helpUrlsApplicationKeyProvider, ApplicationHelpSpaceProvider applicationHelpSpaceProvider)
-
-
Method Details
-
keyForCurrentUser
Description copied from interface:HelpUrlsLoader
Return theHelpUrlsLoader.HelpUrlsLoaderKey
associated with the calling user. It can safely be used as a key to cache the result of aHelpUrls
lookup.- Specified by:
keyForCurrentUser
in interfaceHelpUrlsLoader
- Returns:
- the loader key associated with the calling user.
-
keyForApplication
@Nonnull public HelpUrlsLoader.HelpUrlsLoaderKey keyForApplication(@Nonnull com.atlassian.application.api.ApplicationKey applicationKey) Description copied from interface:HelpUrlsLoader
Return theHelpUrlsLoader.HelpUrlsLoaderKey
associated with the application key provided. It can safely be used as a key to cache the result of aHelpUrls
lookup.- Specified by:
keyForApplication
in interfaceHelpUrlsLoader
- Returns:
- the loader key associated with the passed application.
-
apply
Description copied from interface:HelpUrlsLoader
Return theHelpUrls
associated with the passedHelpUrlsLoader.HelpUrlsLoaderKey
. The passedHelpUrlsLoaderKey
must have been returned from a previous call toHelpUrlsLoader.keyForCurrentUser()
on this instance. It is not safe to useHelpUrlsLoaderKey
across instances ofHelpUrlsLoader
.- Specified by:
apply
in interfacecom.google.common.base.Function<HelpUrlsLoader.HelpUrlsLoaderKey,
HelpUrls> - Specified by:
apply
in interfaceFunction<HelpUrlsLoader.HelpUrlsLoaderKey,
HelpUrls> - Specified by:
apply
in interfaceHelpUrlsLoader
- Parameters:
input
- theHelpUrlsLoaderKey
to query for. It must have been returned from aHelpUrlsLoader.keyForCurrentUser()
on this instance. UsingHelpUrlsLoaderKey
from other instances may result in runtime exceptions.- Returns:
- the
HelpUrls
associated with the passed key.
-