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 LocaleProvider
public Locale getLocale(DocumentModel userProfileDoc)
LocaleProvider
getLocale
in interface LocaleProvider
public TimeZone getTimeZone(CoreSession repo)
getTimeZone
in interface LocaleProvider
public Locale getLocaleWithDefault(CoreSession session)
getLocaleWithDefault
in interface LocaleProvider
public Locale getLocaleWithDefault(DocumentModel userProfileDoc)
getLocaleWithDefault
in interface LocaleProvider
public Locale getLocaleWithDefault(String requestedLocale)
LocaleProvider
Checks 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 LocaleProvider
protected Locale getDefaultLocale()
protected TimeZone getDefaultTimezone()
Copyright © 2016 Nuxeo SA. All rights reserved.