Class I18nFactoryServiceImpl

java.lang.Object
com.atlassian.greenhopper.service.I18nFactoryServiceImpl
All Implemented Interfaces:
I18nFactoryService

@Service public class I18nFactoryServiceImpl extends Object implements I18nFactoryService
Default implementation of the i18n service.

Hides away JIRA i18n internals. NOTE : since this service is used by MANY other services, we MUST keep its dependencies light weight otherwise we end up with circular references.

  • Constructor Details

    • I18nFactoryServiceImpl

      public I18nFactoryServiceImpl()
  • Method Details

    • getI18n

      public I18n2 getI18n(com.atlassian.jira.user.ApplicationUser user)
      Get the I18n object for a given user.
      Specified by:
      getI18n in interface I18nFactoryService
      Parameters:
      user - the user to fetch the i18n object for
      Returns:
      the i18n object for the user locale or the default i18n object in case user is null
    • getI18n

      public I18n2 getI18n()
      Get the default I18n object.
      Specified by:
      getI18n in interface I18nFactoryService
    • getI18n

      public I18n2 getI18n(Locale locale)
      Get the I18n object for a given locale

      Specified by:
      getI18n in interface I18nFactoryService
      Parameters:
      locale - the locale to fetch for
      Returns:
      the i18n object for the locale or the default i18n object in case locale is null