Package | Description |
---|---|
freemarker.cache |
Contains classes and interfaces that deal with template loading and caching.
|
freemarker.core |
This package contains FreeMarker's core parsing/rendering functionality;
most casual users do not need to be aware of the classes in this package,
and can restrict their attention to the
freemarker.template
package. |
freemarker.ext.servlet |
Provides a generic purpose servlet that generates dynamic response using
FreeMarker.
|
freemarker.template |
This package contains the core API's that most users will use.
|
Modifier and Type | Method and Description |
---|---|
Template |
TemplateCache.getTemplate(java.lang.String name,
java.util.Locale locale,
java.lang.String encoding,
boolean parse)
Loads a template with the given name, in the specified locale and
using the specified character encoding.
|
Modifier and Type | Method and Description |
---|---|
Template |
Environment.getTemplate()
Retrieves the currently processed template.
|
Template |
Environment.Namespace.getTemplate() |
Template |
TemplateObject.getTemplate() |
Template |
Environment.getTemplateForImporting(java.lang.String name)
Gets a template for importing; used with
Environment.importLib(Template importedTemplate, String namespace) . |
Template |
Environment.getTemplateForInclusion(java.lang.String name,
java.lang.String encoding,
boolean parse)
Gets a template for inclusion; used with
Environment.include(Template includedTemplate) . |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
CustomAttribute.get(Template t) |
Environment.Namespace |
Environment.importLib(Template loadedTemplate,
java.lang.String namespace)
Emulates
import directive. |
void |
Environment.include(Template includedTemplate)
Processes a Template in the context of this
Environment , including its
output in the Environment 's Writer. |
java.lang.Class |
OptInTemplateClassResolver.resolve(java.lang.String className,
Environment env,
Template template) |
java.lang.Class |
TemplateClassResolver.resolve(java.lang.String className,
Environment env,
Template template)
Gets a
Class based on the class name. |
protected java.lang.String |
OptInTemplateClassResolver.safeGetTemplateName(Template template)
Extract the template name from the template object which will be matched
against the trusted template names and pattern.
|
void |
CustomAttribute.set(java.lang.Object value,
Template t)
Sets the value of a template-scope attribute in the context of the given
template.
|
void |
FreeMarkerTree.setTemplate(Template template) |
Constructor and Description |
---|
Environment(Template template,
TemplateHashModel rootDataModel,
java.io.Writer out) |
FMParser(Template template,
java.io.Reader reader,
boolean strictEscapeSyntax,
boolean stripWhitespace)
Constructs a new parser object.
|
FMParser(Template template,
java.io.Reader reader,
boolean strictEscapeSyntax,
boolean stripWhitespace,
int tagSyntax) |
FMParser(Template template,
java.io.Reader reader,
boolean strictEscapeSyntax,
boolean stripWhitespace,
int tagSyntax,
int incompatibleChanges) |
FreeMarkerTree(Template template) |
Modifier and Type | Method and Description |
---|---|
protected void |
FreemarkerServlet.postTemplateProcess(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Template template,
TemplateModel data)
Called after the execution returns from template.process().
|
protected boolean |
FreemarkerServlet.preTemplateProcess(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Template template,
TemplateModel data)
Called before the execution is passed to template.process().
|
Modifier and Type | Method and Description |
---|---|
static Template |
Template.getPlainTextTemplate(java.lang.String name,
java.lang.String content,
Configuration config)
Returns a trivial template, one that is just a single block of
plain text, no dynamic content.
|
Template |
Configuration.getTemplate(java.lang.String name)
Equivalent to getTemplate(name, thisCfg.getLocale(), thisCfg.getEncoding(thisCfg.getLocale()), true).
|
Template |
Configuration.getTemplate(java.lang.String name,
java.util.Locale locale)
Equivalent to getTemplate(name, locale, thisCfg.getEncoding(locale), true).
|
Template |
Configuration.getTemplate(java.lang.String name,
java.util.Locale locale,
java.lang.String encoding)
Equivalent to getTemplate(name, locale, encoding, true).
|
Template |
Configuration.getTemplate(java.lang.String name,
java.util.Locale locale,
java.lang.String encoding,
boolean parse)
Retrieves a template specified by a name and locale, interpreted using
the specified character encoding, either parsed or unparsed.
|
Template |
Configuration.getTemplate(java.lang.String name,
java.lang.String encoding)
Equivalent to getTemplate(name, thisCfg.getLocale(), encoding, true).
|