Package org.openhab.core.io.rest
Class LocaleServiceImpl
java.lang.Object
org.openhab.core.io.rest.LocaleServiceImpl
- All Implemented Interfaces:
 LocaleService
LocaleServiceImpl provides helper method for working with locales in REST
 resources.- Author:
 - Dennis Nobel - Initial contribution, Markus Rathgeb - Use locale provider, Martin Herbst - Support of different language definition variants, Lyubomir Papazov - Add component annotation, rename the class to LocaleService and add method tryGetLocale
 
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionReturns the locale in respect to the given "Accept-Language" HTTP header.protected voidsetLocaleProvider(LocaleProvider provider) protected voidunsetLocaleProvider(LocaleProvider provider)  
- 
Constructor Details
- 
LocaleServiceImpl
public LocaleServiceImpl() 
 - 
 - 
Method Details
- 
getLocale
Description copied from interface:LocaleServiceReturns the locale in respect to the given "Accept-Language" HTTP header.- Specified by:
 getLocalein interfaceLocaleService- Parameters:
 acceptLanguageHttpHeader- value of the "Accept-Language" HTTP header (can be null).- Returns:
 - Locale for the "Accept-Language" HTTP header or default locale if header is not set or can not be parsed.
 
 - 
setLocaleProvider
 - 
unsetLocaleProvider
 
 -