Interface MessageRenderer<T>
- All Known Implementing Classes:
MapMessageRenderer
public interface MessageRenderer<T>
-
Method Summary
Modifier and TypeMethodDescriptiongetValueFromFile
(String filename, String encoding, boolean hasVariable, com.github.benmanes.caffeine.cache.Cache<Object, Object> cache) Read text from file, eventually replace variables, then convert it.getValueFromText
(String text) Convert text to expected type
-
Method Details
-
getValueFromText
Convert text to expected type- Parameters:
text
- Text representing the type- Returns:
- the constructed object
-
getValueFromFile
T getValueFromFile(String filename, String encoding, boolean hasVariable, com.github.benmanes.caffeine.cache.Cache<Object, Object> cache) Read text from file, eventually replace variables, then convert it. Cached content depends if variabilisation is active or not.- Parameters:
filename
- name of the file to get the value fromencoding
- encoding of the filehasVariable
- flag, whether variables inside the value should be replacedcache
- Cache in which the raw values will be stored/read from- Returns:
- the constructed object
-