Class TemplateDescriptor
java.lang.Object
org.apache.maven.archetype.old.descriptor.TemplateDescriptor
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.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance ofTemplateDescriptor
that should be filtered and has the default encoding. -
Method Summary
Modifier and TypeMethodDescriptionprivate static String
Returns the canonical name of the default character encoding of this Java virtual machine.Returns the name of the encoding of the template file (e.g.boolean
Returnstrue
if the template should be filtered andfalse
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.
-
Field Details
-
filtered
private boolean filteredDetermines if the template should be filtered or not. -
encoding
Determines the template's encoding.
-
-
Constructor Details
-
TemplateDescriptor
public TemplateDescriptor()Creates a new instance ofTemplateDescriptor
that should be filtered and has the default encoding.
-
-
Method Details
-
getDefaultEncoding
Returns the canonical name of the default character encoding of this Java virtual machine.- Returns:
- the name of the default character encoding.
-
isFiltered
public boolean isFiltered()Returnstrue
if the template should be filtered andfalse
otherwise.- Returns:
true
if the template should be filtered andfalse
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 andfales
otherwise.
-
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 illegalUnsupportedCharsetException
- if no support for the named encoding is available in this instance of the Java virtual machine
-