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

public class LocaleFileService extends ServiceConfig
Author:
agomez
  • Constructor Details

    • LocaleFileService

      @Autowired public LocaleFileService(PathService pathService, XStreamSerializer serializer, BaseConfigProperties baseConfigProperties)
      Autowired constructor
      Parameters:
      pathService - Path service
      serializer - Serializer
      baseConfigProperties - Base config properties
  • Method Details

    • getLanguageList

      public List<String> getLanguageList() throws AWException
      Retrieve language list
      Returns:
      Language list
      Throws:
      AWException
    • readLocalesFromFile

      public Locales readLocalesFromFile(String codeLang) throws AWException
      Read local list from file
      Parameters:
      codeLang - Language code (es-ES, en-GB, fr-FR...)
      Returns:
      List of locales loaded
      Throws:
      AWException
    • storeLocaleListFile

      public void storeLocaleListFile(String codeLang, Locales locales) throws AWException
      Store local file
      Parameters:
      codeLang - Language
      Throws:
      AWException
    • printHeader

      public void printHeader(Writer out, String doc, String des, boolean addHdg) throws IOException
      Print an XML header into a file output stream
      Parameters:
      out - Output Stream
      doc - Document name
      des - Document description
      addHdg - Enable print headers
      Throws:
      IOException - IO exception error