Class StaticAliasProviderHelper

java.lang.Object
com.atlassian.administration.quicksearch.impl.spi.alias.StaticAliasProviderHelper
Direct Known Subclasses:
JiraStaticAliasProviderHelper

public class StaticAliasProviderHelper extends Object

Re-usable component for all alias providers that use application i18n resources to retrieve the aliases. The value of the resource is supposed to contain comma-separated list of aliases.

This component maintains a cache of keys/locales vs. alias sets that gets reloaded as i18n resources are added/removed from the system. The decision whether a given module/plugin event is requiring cache reload may be customized by subclasses.

NOTE: for the cache to be refreshed upon appropriate plugin events instances of this class have to be registered with plugin event manager.

Since:
1.0
  • Field Details

    • EMPTY_KEYWORDS

      public static final Set<String> EMPTY_KEYWORDS
  • Constructor Details

    • StaticAliasProviderHelper

      public StaticAliasProviderHelper()
  • Method Details

    • aliasesFor

      public Set<String> aliasesFor(String key, UserContext context)
    • resetCache

      public void resetCache()
    • onPluginModuleEnabled

      public void onPluginModuleEnabled(com.atlassian.plugin.event.events.PluginModuleEnabledEvent pluginModuleEnabledEvent)
    • onPluginModuleDisabled

      public void onPluginModuleDisabled(com.atlassian.plugin.event.events.PluginModuleDisabledEvent pluginModuleDisabledEvent)
    • onPluginEnabled

      public void onPluginEnabled(com.atlassian.plugin.event.events.PluginEnabledEvent pluginEnabledEvent)
    • onPluginDisabled

      public void onPluginDisabled(com.atlassian.plugin.event.events.PluginDisabledEvent pluginDisabledEvent)
    • isI18nAffecting

      protected boolean isI18nAffecting(com.atlassian.plugin.Plugin changedPlugin)
    • isI18nAffecting

      protected boolean isI18nAffecting(com.atlassian.plugin.ModuleDescriptor<?> moduleDescriptor)