Class AweElementsDao

java.lang.Object
com.almis.awe.model.dao.AweElementsDao

public class AweElementsDao extends Object
  • Field Details

  • Constructor Details

    • AweElementsDao

      public AweElementsDao(XStreamSerializer serializer, BaseConfigProperties baseConfigProperties)
      Autowired constructor
      Parameters:
      serializer - Serializer
      baseConfigProperties - Base config properties
  • Method Details

    • readXmlFilesAsync

      @Async("contextlessTaskExecutor") public <T extends XMLFile, N extends XMLNode> Future<String> readXmlFilesAsync(Class<T> rootClass, Map<String,N> storage, String filePath)
      Read all XML files and store them in the component
      Parameters:
      rootClass - Root class
      storage - Storage list
      filePath - File path
    • readXmlFiles

      public <T extends XMLFile, N extends XMLNode> String readXmlFiles(Class<T> rootClass, Map<String,N> storage, String filePath)
      Read all XML files and store them in the component
      Parameters:
      rootClass - Root class
      storage - Storage list
      filePath - File path
    • readModuleFile

      public <T extends XMLFile, N extends XMLNode> String readModuleFile(Class<T> rootClass, Map<String,N> storage, String filePath)
      Read all XML files and store them in the component
      Parameters:
      rootClass - Root class
      storage - Storage list
      filePath - File path
    • readXmlFile

      public <T> T readXmlFile(Class<T> clazz, String basePath, String fileName)
      Read all XML files and store them in the component
      Type Parameters:
      T - Class type
      Parameters:
      clazz - File class
      basePath - File path
      fileName - File name
      Returns:
      Xml file object
    • readModuleFolderXmlFile

      @Async("contextlessTaskExecutor") public <T> Future<Map<String,T>> readModuleFolderXmlFile(Class<T> clazz, String path)
      Read all XML files and store them in the component
      Parameters:
      clazz - File class
      path - Base directory path
      Returns:
      Xml file object
    • readLocaleModuleAsync

      @Async("contextlessTaskExecutor") public Future<Map<String,String>> readLocaleModuleAsync(String basePath)
      Read a locale file asynchronously
      Parameters:
      basePath - base path
    • toXMLString

      public <T> String toXMLString(T template)
      Deserialize string template
      Parameters:
      template - String template
      Returns:
      Object deserialized
    • parseTemplate

      public <T> T parseTemplate(Class<T> clazz, String template)
      Deserialize string template
      Parameters:
      template - String template
      Returns:
      Object deserialized