Class TemplateDescriptor

java.lang.Object
org.apache.maven.archetype.old.descriptor.TemplateDescriptor

public class TemplateDescriptor extends Object
Contains the attributes of an archetype's template (either a source or resource file). The attributes indicate if the template should be filtered and it's encoding.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new instance of TemplateDescriptor that should be filtered and has the default encoding.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the name of the encoding of the template file (e.g.
    boolean
    Returns true if the template should be filtered and false otherwise.
    void
    setEncoding(String encoding)
    Sets the name of the encoding of the template file.
    void
    setFiltered(boolean filtered)
    Defines whether the template should be filtered (processed by Velocity) or not.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TemplateDescriptor

      public TemplateDescriptor()
      Creates a new instance of TemplateDescriptor that should be filtered and has the default encoding.
  • Method Details

    • isFiltered

      public boolean isFiltered()
      Returns true if the template should be filtered and false otherwise.
      Returns:
      true if the template should be filtered and false otherwise.
    • setFiltered

      public void setFiltered(boolean filtered)
      Defines whether the template should be filtered (processed by Velocity) or not.
      Parameters:
      filtered - true if it should be processed by Velocity and fales otherwise.
    • getEncoding

      public String getEncoding()
      Returns the name of the encoding of the template file (e.g. us-ascci, utf-8, iso-8859-1).
      Returns:
      the name of the encoding of the template file.
    • setEncoding

      public void setEncoding(String encoding) throws IllegalCharsetNameException, UnsupportedCharsetException
      Sets the name of the encoding of the template file.
      Parameters:
      encoding - New value of property encoding.
      Throws:
      IllegalCharsetNameException - if the given charset name is illegal
      UnsupportedCharsetException - if no support for the named encoding is available in this instance of the Java virtual machine