Class UserLocaleProvider
- java.lang.Object
-
- org.nuxeo.ecm.platform.web.common.locale.DefaultLocaleProvider
-
- org.nuxeo.ecm.user.center.profile.localeProvider.UserLocaleProvider
-
- All Implemented Interfaces:
LocaleProvider
public class UserLocaleProvider extends DefaultLocaleProvider
Provides user local stored in profile doc model- Since:
- 5.6
-
-
Constructor Summary
Constructors Constructor Description UserLocaleProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Locale
getLocale(CoreSession repo)
Locale
getLocale(DocumentModel userProfileDoc)
Gets the locale stored in the given user profile.Locale
getLocaleWithDefault(CoreSession session)
Locale
getLocaleWithDefault(DocumentModel userProfileDoc)
TimeZone
getTimeZone(CoreSession repo)
-
Methods inherited from class org.nuxeo.ecm.platform.web.common.locale.DefaultLocaleProvider
getDefaultLocale, getDefaultTimezone, getLocaleWithDefault
-
-
-
-
Field Detail
-
log
public static final Log log
-
-
Method Detail
-
getLocale
public Locale getLocale(CoreSession repo)
- Specified by:
getLocale
in interfaceLocaleProvider
- Overrides:
getLocale
in classDefaultLocaleProvider
- Returns:
- the Locale to be used or null to let the caller decides.
-
getLocale
public Locale getLocale(DocumentModel userProfileDoc)
Description copied from interface:LocaleProvider
Gets the locale stored in the given user profile.- Specified by:
getLocale
in interfaceLocaleProvider
- Overrides:
getLocale
in classDefaultLocaleProvider
- Returns:
- the Locale to be used or null to let the caller decide
-
getTimeZone
public TimeZone getTimeZone(CoreSession repo)
- Specified by:
getTimeZone
in interfaceLocaleProvider
- Overrides:
getTimeZone
in classDefaultLocaleProvider
- Returns:
- the Timezone to be used or null to let the caller decides.
-
getLocaleWithDefault
public Locale getLocaleWithDefault(CoreSession session)
- Specified by:
getLocaleWithDefault
in interfaceLocaleProvider
- Overrides:
getLocaleWithDefault
in classDefaultLocaleProvider
- Returns:
- the Locale to be used or a default Locale
-
getLocaleWithDefault
public Locale getLocaleWithDefault(DocumentModel userProfileDoc)
- Specified by:
getLocaleWithDefault
in interfaceLocaleProvider
- Overrides:
getLocaleWithDefault
in classDefaultLocaleProvider
- Returns:
- the Locale stored in userProfile or a default Locale
-
-