Package | Description |
---|---|
freemarker.core |
The seldom used or advanced parts of the fundamental FreeMarker API, compared to
freemarker.template . |
freemarker.ext.beans |
The
default object wrapper of FreeMarker uses
this to expose Java Beans and POJO-s to templates, but it can also be used in itself as a
better alternative ObjectWrapper . |
freemarker.ext.servlet |
Servlet for legacy "Model 2" frameworks that allows using FreeMarker
templates instead of JSP as the MVC View
(see in the Manual).
|
freemarker.template |
The fundamental, most commonly used API-s of FreeMarker;
start with
Configuration (see also the
Getting Stared in the Manual.) |
Modifier and Type | Class and Description |
---|---|
class |
freemarker.core._MiscTemplateException |
static class |
Configurable.SettingValueAssignmentException
The setting name was recognized, but its value couldn't be parsed or the setting couldn't be set for some
other reason.
|
static class |
Configurable.UnknownSettingException
The setting name was not recognized.
|
class |
InvalidReferenceException
A subclass of
TemplateException that says that an FTL expression has evaluated to null or it refers
to something that doesn't exist. |
class |
NonBooleanException
Indicates that a
TemplateBooleanModel value was expected, but the value had a different type. |
class |
NonDateException
Indicates that a
TemplateDateModel value was expected, but the value had a different type. |
class |
NonExtendedHashException
Indicates that a
TemplateHashModelEx value was expected, but the value had a different type. |
class |
NonHashException
Indicates that a
TemplateHashModel value was expected, but the value had a different type. |
class |
NonMethodException
Indicates that a
TemplateMethodModel value was expected, but the value had a different type. |
class |
NonNodeException
Indicates that a
TemplateNodeModel value was expected, but the value had a different type. |
class |
NonNumericalException
Indicates that a
TemplateNumberModel value was expected, but the value had a different type. |
class |
NonSequenceException
Indicates that a
TemplateSequenceModel value was expected, but the value had a different type. |
class |
NonSequenceOrCollectionException
Indicates that a
TemplateSequenceModel or TemplateCollectionModel value was expected, but the value
had a different type. |
class |
NonStringException
Indicates that a
TemplateScalarModel value was expected (or maybe something that can be automatically coerced
to that), but the value had a different type. |
class |
StopException
This exception is thrown when a #stop directive is encountered.
|
class |
UnexpectedTypeException
The type of a value differs from what was expected.
|
Modifier and Type | Method and Description |
---|---|
protected TemplateException |
Configurable.invalidSettingValueException(String name,
String value) |
protected TemplateException |
Configurable.settingValueAssignmentException(String name,
String value,
Throwable cause) |
protected TemplateException |
Configurable.unknownSettingException(String name) |
Modifier and Type | Method and Description |
---|---|
void |
Environment.__setitem__(String key,
Object o)
A hook that Jython uses.
|
abstract Number |
ArithmeticEngine.add(Number first,
Number second) |
Number |
ArithmeticEngine.ConservativeEngine.add(Number first,
Number second) |
boolean |
Environment.applyEqualsOperator(TemplateModel leftValue,
TemplateModel rightValue)
Compares two
TemplateModel -s according the rules of the FTL "==" operator. |
boolean |
Environment.applyEqualsOperatorLenient(TemplateModel leftValue,
TemplateModel rightValue)
Compares two
TemplateModel -s according the rules of the FTL "==" operator, except that if the two types
are incompatible, they are treated as non-equal instead of throwing an exception. |
boolean |
Environment.applyGreaterThanOperator(TemplateModel leftValue,
TemplateModel rightValue)
Compares two
TemplateModel -s according the rules of the FTL ">" operator. |
boolean |
Environment.applyLessThanOperator(TemplateModel leftValue,
TemplateModel rightValue)
Compares two
TemplateModel -s according the rules of the FTL "<" operator. |
boolean |
Environment.applyLessThanOrEqualsOperator(TemplateModel leftValue,
TemplateModel rightValue)
Compares two
TemplateModel -s according the rules of the FTL "<" operator. |
boolean |
Environment.applyWithGreaterThanOrEqualsOperator(TemplateModel leftValue,
TemplateModel rightValue)
Compares two
TemplateModel -s according the rules of the FTL ">=" operator. |
abstract int |
ArithmeticEngine.compareNumbers(Number first,
Number second) |
int |
ArithmeticEngine.ConservativeEngine.compareNumbers(Number first,
Number second) |
abstract Number |
ArithmeticEngine.divide(Number first,
Number second) |
Number |
ArithmeticEngine.ConservativeEngine.divide(Number first,
Number second) |
protected void |
Configurable.doAutoImportsAndIncludes(Environment env) |
Environment.Namespace |
Environment.importLib(String name,
String namespace)
Emulates
import directive, except that name must be tempate
root relative. |
Environment.Namespace |
Environment.importLib(Template loadedTemplate,
String namespace)
Emulates
import directive. |
void |
Environment.include(String name,
String encoding,
boolean parse)
Emulates
include directive, except that name must be tempate
root relative. |
void |
Environment.include(Template includedTemplate)
Processes a Template in the context of this
Environment , including its
output in the Environment 's Writer. |
abstract Number |
ArithmeticEngine.modulus(Number first,
Number second) |
Number |
ArithmeticEngine.ConservativeEngine.modulus(Number first,
Number second) |
abstract Number |
ArithmeticEngine.multiply(Number first,
Number second) |
Number |
ArithmeticEngine.ConservativeEngine.multiply(Number first,
Number second) |
void |
Environment.process()
Processes the template to which this environment belongs to.
|
Class |
TemplateClassResolver.resolve(String className,
Environment env,
Template template)
Gets a
Class based on the class name. |
Class |
OptInTemplateClassResolver.resolve(String className,
Environment env,
Template template) |
void |
Configurable.setSetting(String name,
String value)
Sets a FreeMarker setting by a name and string value.
|
void |
Configurable.setSettings(InputStream propsIn)
Reads a setting list (key and element pairs) from the input stream.
|
void |
Configurable.setSettings(Properties props)
Set the settings stored in a
Properties object. |
abstract Number |
ArithmeticEngine.subtract(Number first,
Number second) |
Number |
ArithmeticEngine.ConservativeEngine.subtract(Number first,
Number second) |
void |
Environment.visit(freemarker.core.TemplateElement element,
TemplateDirectiveModel directiveModel,
Map args,
List bodyParameterNames) |
Modifier and Type | Class and Description |
---|---|
class |
InvalidPropertyException
An exception thrown when there is an attempt to access
an invalid bean property when we are in a "strict bean" mode
|
Modifier and Type | Method and Description |
---|---|
void |
IncludePage.execute(Environment env,
Map params,
TemplateModel[] loopVars,
TemplateDirectiveBody body) |
Modifier and Type | Class and Description |
---|---|
class |
TemplateModelException
TemplateModel methods throw this exception if the requested data can't be retrieved. |
Modifier and Type | Method and Description |
---|---|
void |
TemplateExceptionHandler.handleTemplateException(TemplateException te,
Environment env,
Writer out)
Method called after a
TemplateException was raised inside a template. |
Modifier and Type | Method and Description |
---|---|
Environment |
Template.createProcessingEnvironment(Object dataModel,
Writer out)
|
Environment |
Template.createProcessingEnvironment(Object dataModel,
Writer out,
ObjectWrapper wrapper)
Creates a
Environment object, using this template, the data-model provided as
parameter. |
protected void |
Configuration.doAutoImportsAndIncludes(Environment env) |
void |
TemplateDirectiveModel.execute(Environment env,
Map params,
TemplateModel[] loopVars,
TemplateDirectiveBody body)
Executes this user-defined directive; called by FreeMarker when the user-defined
directive is called in the template.
|
void |
TemplateExceptionHandler.handleTemplateException(TemplateException te,
Environment env,
Writer out)
Method called after a
TemplateException was raised inside a template. |
void |
Template.process(Object dataModel,
Writer out)
Executes template, using the data-model provided, writing the generated output
to the supplied
Writer . |
void |
Template.process(Object dataModel,
Writer out,
ObjectWrapper wrapper)
Like
Template.process(Object, Writer) , but overrides the Configurable.getObjectWrapper() . |
void |
Template.process(Object dataModel,
Writer out,
ObjectWrapper wrapper,
TemplateNodeModel rootNode)
Like
Template.process(Object, Writer) , but also sets a (XML-)node to be recursively processed by the template. |
void |
TemplateDirectiveBody.render(Writer out)
Renders the body of the directive body to the specified writer.
|
void |
Configuration.setSetting(String name,
String value) |