Class TemplateModel

All Implemented Interfaces:
Serializable, Cloneable, Map<String,Object>

public class TemplateModel extends HashMap<String,Object>
The freemarker template model.
See Also:
  • Constructor Details

    • TemplateModel

      public TemplateModel(org.apache.maven.plugin.logging.Log logger)
      Creates the template model.
      Parameters:
      logger - the maven logger
  • Method Details

    • 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
    • putValue

      public void putValue(String key, Object value)
      Adds a key-value pair to the model.
      The value is converted to a string.
      null is mapped to the empty string.
      Parameters:
      key - the key
      value - the value