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
Provides user local stored in profile doc model
- Since:
- 5.6
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetLocale
(CoreSession repo) getLocale
(DocumentModel userProfileDoc) Gets the locale stored in the given user profile.getLocaleWithDefault
(CoreSession session) getLocaleWithDefault
(DocumentModel userProfileDoc) getTimeZone
(CoreSession repo) Methods inherited from class org.nuxeo.ecm.platform.web.common.locale.DefaultLocaleProvider
getDefaultLocale, getDefaultTimezone, getLocaleWithDefault
-
Constructor Details
-
UserLocaleProvider
public UserLocaleProvider()
-
-
Method Details
-
getLocale
- Specified by:
getLocale
in interfaceLocaleProvider
- Overrides:
getLocale
in classDefaultLocaleProvider
- Returns:
- the Locale to be used or null to let the caller decides.
-
getLocale
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
- Specified by:
getTimeZone
in interfaceLocaleProvider
- Overrides:
getTimeZone
in classDefaultLocaleProvider
- Returns:
- the Timezone to be used or null to let the caller decides.
-
getLocaleWithDefault
- Specified by:
getLocaleWithDefault
in interfaceLocaleProvider
- Overrides:
getLocaleWithDefault
in classDefaultLocaleProvider
- Returns:
- the Locale to be used or a default Locale
-
getLocaleWithDefault
- Specified by:
getLocaleWithDefault
in interfaceLocaleProvider
- Overrides:
getLocaleWithDefault
in classDefaultLocaleProvider
- Returns:
- the Locale stored in userProfile or a default Locale
-