Package com.almis.awe.developer.service
Class LocaleFileService
java.lang.Object
com.almis.awe.config.ServiceConfig
com.almis.awe.developer.service.LocaleFileService
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
- Author:
- agomez
-
Constructor Summary
ConstructorDescriptionLocaleFileService
(PathService pathService, XStreamSerializer serializer, BaseConfigProperties baseConfigProperties) Autowired constructor -
Method Summary
Modifier and TypeMethodDescriptionRetrieve language listvoid
printHeader
(Writer out, String doc, String des, boolean addHdg) Print an XML header into a file output streamreadLocalesFromFile
(String codeLang) Read local list from filevoid
storeLocaleListFile
(String codeLang, Locales locales) Store local fileMethods inherited from class com.almis.awe.config.ServiceConfig
containsBean, getApplicationContext, getBean, getBean, getElements, getLocale, getLocale, getProperty, getProperty, getRequest, getSession, setApplicationContext
-
Constructor Details
-
LocaleFileService
@Autowired public LocaleFileService(PathService pathService, XStreamSerializer serializer, BaseConfigProperties baseConfigProperties) Autowired constructor- Parameters:
pathService
- Path serviceserializer
- SerializerbaseConfigProperties
- Base config properties
-
-
Method Details
-
getLanguageList
Retrieve language list- Returns:
- Language list
- Throws:
AWException
-
readLocalesFromFile
Read local list from file- Parameters:
codeLang
- Language code (es-ES, en-GB, fr-FR...)- Returns:
- List of locales loaded
- Throws:
AWException
-
storeLocaleListFile
Store local file- Parameters:
codeLang
- Language- Throws:
AWException
-
printHeader
Print an XML header into a file output stream- Parameters:
out
- Output Streamdoc
- Document namedes
- Document descriptionaddHdg
- Enable print headers- Throws:
IOException
- IO exception error
-