Package io.tesler.model.core.service
Class LocaleServiceImpl
- java.lang.Object
-
- io.tesler.model.core.service.LocaleServiceImpl
-
- All Implemented Interfaces:
LocaleService
,ISystemSettingChangeEventListener
,EventListener
,org.springframework.context.ApplicationListener<SystemSettingChangedEvent>
@Service("localeService") public class LocaleServiceImpl extends Object implements LocaleService, ISystemSettingChangeEventListener
-
-
Field Summary
-
Fields inherited from interface io.tesler.api.service.LocaleService
defaultLocale, SERVICE_NAME
-
-
Constructor Summary
Constructors Constructor Description LocaleServiceImpl(SystemSettings systemSettings)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Locale
getDefaultLocale()
boolean
isLanguageSupported(String language)
void
onApplicationEvent(SystemSettingChangedEvent event)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.tesler.api.service.LocaleService
getSupportedLanguages
-
-
-
-
Constructor Detail
-
LocaleServiceImpl
public LocaleServiceImpl(SystemSettings systemSettings)
-
-
Method Detail
-
onApplicationEvent
public void onApplicationEvent(SystemSettingChangedEvent event)
- Specified by:
onApplicationEvent
in interfaceorg.springframework.context.ApplicationListener<SystemSettingChangedEvent>
- Specified by:
onApplicationEvent
in interfaceISystemSettingChangeEventListener
-
isLanguageSupported
public boolean isLanguageSupported(String language)
- Specified by:
isLanguageSupported
in interfaceLocaleService
-
getDefaultLocale
public Locale getDefaultLocale()
- Specified by:
getDefaultLocale
in interfaceLocaleService
-
-