com.atlassian.jira.util.resourcebundle
Class MockResourceBundleLoader

java.lang.Object
  extended by com.atlassian.jira.util.resourcebundle.MockResourceBundleLoader
All Implemented Interfaces:
ResourceBundleLoader

public class MockResourceBundleLoader
extends Object
implements ResourceBundleLoader

Since:
v6.2.3

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.atlassian.jira.util.resourcebundle.ResourceBundleLoader
ResourceBundleLoader.LoadResult
 
Constructor Summary
MockResourceBundleLoader()
           
MockResourceBundleLoader(Locale locale)
           
 
Method Summary
 MockResourceBundleLoader helpText()
          Returns a loader that will search for resources associated with HelpUrls.
 MockResourceBundleLoader i18n()
          Returns a loader that will search for resources associated with a I18nHelper.
 ResourceBundleLoader.LoadResult load()
          Perform a search and load all the configured resources.
 MockResourceBundleLoader locale(Locale locale)
          Returns a loader that will search for resources associated with the passed Locale.
 MockResourceBundleLoader registerHelp(Map<String,String> text, com.atlassian.plugin.Plugin... plugins)
           
 MockResourceBundleLoader registerI18n(Map<String,String> text, com.atlassian.plugin.Plugin... plugins)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockResourceBundleLoader

public MockResourceBundleLoader()

MockResourceBundleLoader

public MockResourceBundleLoader(Locale locale)
Method Detail

locale

public MockResourceBundleLoader locale(Locale locale)
Description copied from interface: ResourceBundleLoader
Returns a loader that will search for resources associated with the passed Locale. This method will not mutate this and as such the caller must use the returned loader to search against the passed Locale.

Specified by:
locale in interface ResourceBundleLoader
Parameters:
locale - the locale.
Returns:
a loader that will search for resources associated with the passed Locale. The type of search remains unchanged.

helpText

public MockResourceBundleLoader helpText()
Description copied from interface: ResourceBundleLoader
Returns a loader that will search for resources associated with HelpUrls. The Locale used by the search remains unchanged. This method will not mutate this and as such the caller must use the returned loader to find the right type of resources.

Specified by:
helpText in interface ResourceBundleLoader
Returns:
a loader that will search for resources associated with HelpUrls. The Locale used by the search remains unchanged.

i18n

public MockResourceBundleLoader i18n()
Description copied from interface: ResourceBundleLoader
Returns a loader that will search for resources associated with a I18nHelper. The Locale used by the search remains unchanged. This method will not mutate this and as such the caller must use the returned loader to find the right type of resources.

Specified by:
i18n in interface ResourceBundleLoader
Returns:
a loader that will search for resources associated with a I18nHelper. The Locale used by the search remains unchanged.

load

public ResourceBundleLoader.LoadResult load()
Description copied from interface: ResourceBundleLoader
Perform a search and load all the configured resources.

Specified by:
load in interface ResourceBundleLoader
Returns:
the loaded resources with the plugins that provided them.

registerI18n

public MockResourceBundleLoader registerI18n(Map<String,String> text,
                                             com.atlassian.plugin.Plugin... plugins)

registerHelp

public MockResourceBundleLoader registerHelp(Map<String,String> text,
                                             com.atlassian.plugin.Plugin... plugins)


Copyright © 2002-2014 Atlassian. All Rights Reserved.