public class DefaultLocaleProvider extends Object implements LocaleProvider
| Constructor and Description |
|---|
DefaultLocaleProvider() |
| Modifier and Type | Method and Description |
|---|---|
protected Locale |
getDefaultLocale() |
protected TimeZone |
getDefaultTimezone() |
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) |
Locale |
getLocaleWithDefault(String requestedLocale)
Returns the default locale for given requested locale.
|
TimeZone |
getTimeZone(CoreSession repo) |
public DefaultLocaleProvider()
public Locale getLocale(CoreSession repo)
getLocale in interface LocaleProviderpublic Locale getLocale(DocumentModel userProfileDoc)
LocaleProvidergetLocale in interface LocaleProviderpublic TimeZone getTimeZone(CoreSession repo)
getTimeZone in interface LocaleProviderpublic Locale getLocaleWithDefault(CoreSession session)
getLocaleWithDefault in interface LocaleProviderpublic Locale getLocaleWithDefault(DocumentModel userProfileDoc)
getLocaleWithDefault in interface LocaleProviderpublic Locale getLocaleWithDefault(String requestedLocale)
LocaleProviderChecks if requested locale is part of supported locales, and fall-backs on a default locale if not (or if requested locale is empty).
getLocaleWithDefault in interface LocaleProviderprotected Locale getDefaultLocale()
protected TimeZone getDefaultTimezone()
Copyright © 2017 Nuxeo. All rights reserved.