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 (also see
Getting Stared in the Manual.) |
Modifier and Type | Class and Description |
---|---|
class |
freemarker.core._MiscTemplateException |
static class |
Configurable.UnknownSettingException |
class |
InvalidReferenceException
A subclass of TemplateException that says there
is no value associated with a given expression.
|
class |
NonBooleanException
A
TemplateException that
indicates that the internals expected an expression
to evaluate to a boolean value and it didn't. |
class |
NonDateException
Indicates that a date, time or date+time was expected.
|
class |
NonNumericalException
A
TemplateException that
indicates that the internals expected an expression
to evaluate to a numerical value and it didn't. |
class |
NonStringException
A
TemplateException that
indicates that the internals expected an expression
to evaluate to a string or numeric value and it didn't. |
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(java.lang.String name,
java.lang.String value) |
protected TemplateException |
Configurable.unknownSettingException(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
void |
Environment.__setitem__(java.lang.String key,
java.lang.Object o)
A hook that Jython uses.
|
abstract java.lang.Number |
ArithmeticEngine.add(java.lang.Number first,
java.lang.Number second) |
java.lang.Number |
ArithmeticEngine.ConservativeEngine.add(java.lang.Number first,
java.lang.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(java.lang.Number first,
java.lang.Number second) |
int |
ArithmeticEngine.ConservativeEngine.compareNumbers(java.lang.Number first,
java.lang.Number second) |
abstract java.lang.Number |
ArithmeticEngine.divide(java.lang.Number first,
java.lang.Number second) |
java.lang.Number |
ArithmeticEngine.ConservativeEngine.divide(java.lang.Number first,
java.lang.Number second) |
protected void |
Configurable.doAutoImportsAndIncludes(Environment env) |
Environment.Namespace |
Environment.importLib(java.lang.String name,
java.lang.String namespace)
Emulates
import directive, except that name must be tempate
root relative. |
Environment.Namespace |
Environment.importLib(Template loadedTemplate,
java.lang.String namespace)
Emulates
import directive. |
void |
Environment.include(java.lang.String name,
java.lang.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 java.lang.Number |
ArithmeticEngine.modulus(java.lang.Number first,
java.lang.Number second) |
java.lang.Number |
ArithmeticEngine.ConservativeEngine.modulus(java.lang.Number first,
java.lang.Number second) |
abstract java.lang.Number |
ArithmeticEngine.multiply(java.lang.Number first,
java.lang.Number second) |
java.lang.Number |
ArithmeticEngine.ConservativeEngine.multiply(java.lang.Number first,
java.lang.Number second) |
void |
Environment.process()
Processes the template to which this environment belongs.
|
java.lang.Class |
TemplateClassResolver.resolve(java.lang.String className,
Environment env,
Template template)
Gets a
Class based on the class name. |
java.lang.Class |
OptInTemplateClassResolver.resolve(java.lang.String className,
Environment env,
Template template) |
void |
Configurable.setSetting(java.lang.String name,
java.lang.String value)
Sets a FreeMarker setting by a name and string value.
|
void |
Configurable.setSettings(java.io.InputStream propsIn)
Reads a setting list (key and element pairs) from the input stream.
|
void |
Configurable.setSettings(java.util.Properties props)
Set the settings stored in a
Properties object. |
abstract java.lang.Number |
ArithmeticEngine.subtract(java.lang.Number first,
java.lang.Number second) |
java.lang.Number |
ArithmeticEngine.ConservativeEngine.subtract(java.lang.Number first,
java.lang.Number second) |
void |
Environment.visit(freemarker.core.TemplateElement element,
TemplateDirectiveModel directiveModel,
java.util.Map args,
java.util.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,
java.util.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,
java.io.Writer out)
Method called after a
TemplateException was raised inside a template. |
Modifier and Type | Method and Description |
---|---|
Environment |
Template.createProcessingEnvironment(java.lang.Object dataModel,
java.io.Writer out)
|
Environment |
Template.createProcessingEnvironment(java.lang.Object dataModel,
java.io.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,
java.util.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,
java.io.Writer out)
Method called after a
TemplateException was raised inside a template. |
void |
Template.process(java.lang.Object dataModel,
java.io.Writer out)
Executes template, using the data-model provided, writing the generated output
to the supplied
Writer . |
void |
Template.process(java.lang.Object dataModel,
java.io.Writer out,
ObjectWrapper wrapper)
Like
Template.process(Object, Writer) , but overrides the Configurable.getObjectWrapper() . |
void |
Template.process(java.lang.Object dataModel,
java.io.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(java.io.Writer out)
Renders the body of the directive body to the specified writer.
|
void |
Configuration.setSetting(java.lang.String key,
java.lang.String value) |