com.atlassian.greenhopper.service
Class I18nFactoryServiceImpl

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

@Service
public class I18nFactoryServiceImpl
extends java.lang.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 Summary
I18nFactoryServiceImpl()
           
 
Method Summary
 I18n2 getI18n()
          Get the default I18n object.
 I18n2 getI18n(java.util.Locale locale)
          Get the I18n object for a given locale

 I18n2 getI18n(com.atlassian.crowd.embedded.api.User user)
          Get the I18n object for a given user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

I18nFactoryServiceImpl

public I18nFactoryServiceImpl()
Method Detail

getI18n

public I18n2 getI18n(com.atlassian.crowd.embedded.api.User 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(java.util.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


Copyright © 2007-2013 Atlassian. All Rights Reserved.