public class TemplateDescriptor
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
encoding
Determines the template's encoding.
|
private boolean |
filtered
Determines if the template should be filtered or not.
|
Constructor and Description |
---|
TemplateDescriptor()
Creates a new instance of
TemplateDescriptor that should be filtered
and has the default encoding. |
Modifier and Type | Method and Description |
---|---|
private static java.lang.String |
getDefaultEncoding()
Returns the canonical name of the default character encoding of this Java
virtual machine.
|
java.lang.String |
getEncoding()
Returns the name of the encoding of the template file (e.g.
|
boolean |
isFiltered()
Returns
true if the template should be filtered and
false otherwise. |
void |
setEncoding(java.lang.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.
|
private boolean filtered
private java.lang.String encoding
public TemplateDescriptor()
TemplateDescriptor
that should be filtered
and has the default encoding.private static java.lang.String getDefaultEncoding()
public boolean isFiltered()
true
if the template should be filtered and
false
otherwise.true
if the template should be filtered and
false
otherwise.public void setFiltered(boolean filtered)
filtered
- true
if it should be processed by Velocity and
fales
otherwise.public java.lang.String getEncoding()
us-ascci
, utf-8
, iso-8859-1
).public void setEncoding(java.lang.String encoding) throws java.nio.charset.IllegalCharsetNameException, java.nio.charset.UnsupportedCharsetException
encoding
- New value of property encoding.java.nio.charset.IllegalCharsetNameException
- if the given charset name is illegaljava.nio.charset.UnsupportedCharsetException
- if no support for the named encoding
is available in this instance of the Java virtual machine