Package org.tentackle.maven
Class TemplateModel
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<String,Object>
-
- org.tentackle.maven.TemplateModel
-
- All Implemented Interfaces:
Serializable,Cloneable,Map<String,Object>
public class TemplateModel extends HashMap<String,Object>
The freemarker template model.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Constructor Summary
Constructors Constructor Description TemplateModel(org.apache.maven.plugin.logging.Log logger)Creates the template model.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddMap(Map<String,Object> map)Adds a map to the model.
Keys are translated to camel case.voidaddProperties(Properties properties)Adds the properties to the model.
Keys are translated to camel case.voidputValue(String key, Object value)Adds a key-value pair to the model.
The value is converted to a string.
nullis mapped to the empty string.-
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
-
-
-
Method Detail
-
addProperties
public void addProperties(Properties properties)
Adds the properties to the model.
Keys are translated to camel case.- Parameters:
properties- the properties
-
addMap
public void addMap(Map<String,Object> map)
Adds a map to the model.
Keys are translated to camel case.- Parameters:
map- the properties
-
-