Class TemplateLine


  • public class TemplateLine
    extends Object
    This class defines a line that may appear in a template or branch. It may contain any number of tags to be evaluated.
    • Constructor Detail

      • TemplateLine

        public TemplateLine​(AttributeType attributeType,
                            int lineNumber,
                            Tag[] tags)
        Creates a new template line with the provided information.
        Parameters:
        attributeType - The attribute type for this template line.
        lineNumber - The line number on which this template line appears in the template file.
        tags - The set of tags for this template line.
      • TemplateLine

        public TemplateLine​(AttributeType attributeType,
                            int lineNumber,
                            Tag[] tags,
                            boolean isURL,
                            boolean isBase64)
        Creates a new template line with the provided information.
        Parameters:
        attributeType - The attribute type for this template line.
        lineNumber - The line number on which this template line appears in the template file.
        tags - The set of tags for this template line.
        isURL - Whether this template line's value is an URL or not.
        isBase64 - Whether this template line's value is Base64 encoded or not.
    • Method Detail

      • getAttributeType

        public AttributeType getAttributeType()
        Retrieves the attribute type for this template line.
        Returns:
        The attribute type for this template line.
      • getLineNumber

        public int getLineNumber()
        Retrieves the line number on which this template line appears in the template file.
        Returns:
        The line number on which this template line appears in the template file.
      • isURL

        public boolean isURL()
        Returns whether the value of this template line corresponds to an URL or not.
        Returns:
        true if the value of this template line corresponds to an URL and false otherwise.
      • isBase64

        public boolean isBase64()
        Returns whether the value of this template line corresponds to a Base64 encoded value or not.
        Returns:
        true if the value of this template line corresponds to a Base64 encoded value and false otherwise.
      • generateLine

        public TagResult generateLine​(TemplateEntry templateEntry)
        Generates the content for this template line and places it in the provided template entry.
        Parameters:
        templateEntry - The template entry being generated.
        Returns:
        The result of generating the template line.