Class TemplateModel

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,​java.lang.Object>

    public class TemplateModel
    extends java.util.HashMap<java.lang.String,​java.lang.Object>
    The freemarker template model.
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.util.AbstractMap

        java.util.AbstractMap.SimpleEntry<K extends java.lang.Object,​V extends java.lang.Object>, java.util.AbstractMap.SimpleImmutableEntry<K extends java.lang.Object,​V extends java.lang.Object>
      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K extends java.lang.Object,​V extends java.lang.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
      void addMap​(java.util.Map<java.lang.String,​java.lang.Object> map)
      Adds a map to the model.
      Keys are translated to camel case.
      void addProperties​(java.util.Properties properties)
      Adds the properties to the model.
      Keys are translated to camel case.
      void putValue​(java.lang.String key, java.lang.Object value)
      Adds a key-value pair to the model.
      The value is converted to a string.
      null is 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
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Map

        equals, hashCode
    • Constructor Detail

      • TemplateModel

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

      • addProperties

        public void addProperties​(java.util.Properties properties)
        Adds the properties to the model.
        Keys are translated to camel case.
        Parameters:
        properties - the properties
      • addMap

        public void addMap​(java.util.Map<java.lang.String,​java.lang.Object> map)
        Adds a map to the model.
        Keys are translated to camel case.
        Parameters:
        map - the properties
      • putValue

        public void putValue​(java.lang.String key,
                             java.lang.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