com.atlassian.jira.help
Class DefaultHelpUrlsLoader

java.lang.Object
  extended by com.atlassian.jira.help.DefaultHelpUrlsLoader
All Implemented Interfaces:
HelpUrlsLoader, com.google.common.base.Function<HelpUrlsLoader.HelpUrlsLoaderKey,HelpUrls>

public class DefaultHelpUrlsLoader
extends Object
implements HelpUrlsLoader

Since:
v6.2.4

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.atlassian.jira.help.HelpUrlsLoader
HelpUrlsLoader.HelpUrlsLoaderKey
 
Constructor Summary
DefaultHelpUrlsLoader(ResourceBundleLoader loader, JiraAuthenticationContext ctx, FeatureManager featureManager, LocalHelpUrls localHelpUrls, I18nHelper.BeanFactory i18n, HelpUrlsParser parser)
           
 
Method Summary
 HelpUrls apply(HelpUrlsLoader.HelpUrlsLoaderKey input)
          Return the HelpUrls associated with the passed HelpUrlsLoader.HelpUrlsLoaderKey.
 HelpUrlsLoader.HelpUrlsLoaderKey keyForCurrentUser()
          Return the HelpUrlsLoader.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 Detail

DefaultHelpUrlsLoader

public DefaultHelpUrlsLoader(ResourceBundleLoader loader,
                             JiraAuthenticationContext ctx,
                             FeatureManager featureManager,
                             LocalHelpUrls localHelpUrls,
                             I18nHelper.BeanFactory i18n,
                             HelpUrlsParser parser)
Method Detail

keyForCurrentUser

@Nonnull
public HelpUrlsLoader.HelpUrlsLoaderKey keyForCurrentUser()
Description copied from interface: HelpUrlsLoader
Return the HelpUrlsLoader.HelpUrlsLoaderKey associated with the calling user. It can safely be used as a key to cache the result of a HelpUrls lookup.

Specified by:
keyForCurrentUser in interface HelpUrlsLoader
Returns:
the loader key associated with the calling user.

apply

public HelpUrls apply(HelpUrlsLoader.HelpUrlsLoaderKey input)
Description copied from interface: HelpUrlsLoader
Return the HelpUrls associated with the passed HelpUrlsLoader.HelpUrlsLoaderKey. The passed HelpUrlsLoaderKey must have been returned from a previous call to HelpUrlsLoader.keyForCurrentUser() on this instance. It is not safe to use HelpUrlsLoaderKey across instances of HelpUrlsLoader.

Specified by:
apply in interface HelpUrlsLoader
Specified by:
apply in interface com.google.common.base.Function<HelpUrlsLoader.HelpUrlsLoaderKey,HelpUrls>
Parameters:
input - the HelpUrlsLoaderKey to query for. It must have been returned from a HelpUrlsLoader.keyForCurrentUser() on this instance. Using HelpUrlsLoaderKey from other instances may result in runtime exceptions.
Returns:
the HelpUrls associated with the passed key.


Copyright © 2002-2014 Atlassian. All Rights Reserved.