Package com.almis.awe.model.dao
Class AweElementsDao
java.lang.Object
com.almis.awe.model.dao.AweElementsDao
-
Field Summary
-
Constructor Summary
ConstructorDescriptionAweElementsDao
(XStreamSerializer serializer, BaseConfigProperties baseConfigProperties) Autowired constructor -
Method Summary
Modifier and TypeMethodDescription<T> T
parseTemplate
(Class<T> clazz, String template) Deserialize string templatereadLocaleModuleAsync
(String basePath) Read a locale file asynchronouslyreadModuleFile
(Class<T> rootClass, Map<String, N> storage, String filePath) Read all XML files and store them in the componentreadModuleFolderXmlFile
(Class<T> clazz, String path) Read all XML files and store them in the component<T> T
readXmlFile
(Class<T> clazz, String basePath, String fileName) Read all XML files and store them in the componentreadXmlFiles
(Class<T> rootClass, Map<String, N> storage, String filePath) Read all XML files and store them in the componentreadXmlFilesAsync
(Class<T> rootClass, Map<String, N> storage, String filePath) Read all XML files and store them in the component<T> String
toXMLString
(T template) Deserialize string template
-
Field Details
-
LOG_SECONDS_FORMAT
- See Also:
-
-
Constructor Details
-
AweElementsDao
Autowired constructor- Parameters:
serializer
- SerializerbaseConfigProperties
- 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 classstorage
- Storage listfilePath
- 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 classstorage
- Storage listfilePath
- 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 classstorage
- Storage listfilePath
- File path
-
readXmlFile
Read all XML files and store them in the component- Type Parameters:
T
- Class type- Parameters:
clazz
- File classbasePath
- File pathfileName
- 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 classpath
- 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
Deserialize string template- Parameters:
template
- String template- Returns:
- Object deserialized
-
parseTemplate
Deserialize string template- Parameters:
template
- String template- Returns:
- Object deserialized
-