Uses of Class
freemarker.core.Environment
-
Packages that use Environment Package Description freemarker.cache Template loading and caching.freemarker.core The seldom used or advanced parts of the fundamental FreeMarker API, compared tofreemarker.template
.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 withConfiguration
(see also the Getting Started in the Manual.)freemarker.template.utility Various classes used by core FreeMarker code but might be useful outside of it too. -
-
Uses of Environment in freemarker.cache
Methods in freemarker.cache with parameters of type Environment Modifier and Type Method Description static java.lang.String
TemplateCache. getFullTemplatePath(Environment env, java.lang.String baseName, java.lang.String targetName)
Deprecated.UsetoFullTemplateName(String, String)
instead, as that can throwMalformedTemplateNameException
, and is on a more logical place anyway. -
Uses of Environment in freemarker.core
Methods in freemarker.core that return Environment Modifier and Type Method Description static Environment
Environment. getCurrentEnvironment()
Retrieves the environment object associated with the current thread, ornull
if there's no template processing going on in this thread.protected Environment
Configurable. getEnvironment()
Methods in freemarker.core with parameters of type Environment Modifier and Type Method Description protected void
Configurable. doAutoImportsAndIncludes(Environment env)
Executes the auto-imports and auto-includes for the main template of this environment.TemplateDateFormat
AliasTemplateDateFormatFactory. get(java.lang.String params, int dateType, java.util.Locale locale, java.util.TimeZone timeZone, boolean zonelessInput, Environment env)
TemplateNumberFormat
AliasTemplateNumberFormatFactory. get(java.lang.String params, java.util.Locale locale, Environment env)
java.lang.Object
CustomAttribute. get(Environment env)
Gets the attribute from the appropriate scope that's accessible through the specifiedEnvironment
.abstract TemplateDateFormat
TemplateDateFormatFactory. get(java.lang.String params, int dateType, java.util.Locale locale, java.util.TimeZone timeZone, boolean zonelessInput, Environment env)
Returns a formatter for the given parameters.abstract TemplateNumberFormat
TemplateNumberFormatFactory. get(java.lang.String params, java.util.Locale locale, Environment env)
Returns a formatter for the given parameters.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 aClass
based on the class name.void
CustomAttribute. set(java.lang.Object value, Environment env)
Sets the attribute inside the appropriate scope that's accessible through the specifiedEnvironment
.TemplateScalarModel
DefaultTruncateBuiltinAlgorithm. truncate(java.lang.String s, int maxLength, TemplateScalarModel terminator, java.lang.Integer terminatorLength, Environment env)
abstract TemplateScalarModel
TruncateBuiltinAlgorithm. truncate(java.lang.String s, int maxLength, TemplateScalarModel terminator, java.lang.Integer terminatorLength, Environment env)
Corresponds to?truncate(...)
in templates.TemplateScalarModel
DefaultTruncateBuiltinAlgorithm. truncateC(java.lang.String s, int maxLength, TemplateScalarModel terminator, java.lang.Integer terminatorLength, Environment env)
abstract TemplateScalarModel
TruncateBuiltinAlgorithm. truncateC(java.lang.String s, int maxLength, TemplateScalarModel terminator, java.lang.Integer terminatorLength, Environment env)
Corresponds to?truncate_c_m(...)
in templates.TemplateModel
DefaultTruncateBuiltinAlgorithm. truncateCM(java.lang.String s, int maxLength, TemplateModel terminator, java.lang.Integer terminatorLength, Environment env)
abstract TemplateModel
TruncateBuiltinAlgorithm. truncateCM(java.lang.String s, int maxLength, TemplateModel terminator, java.lang.Integer terminatorLength, Environment env)
Corresponds to?truncate_c_m(...)
in templates.TemplateModel
DefaultTruncateBuiltinAlgorithm. truncateM(java.lang.String s, int maxLength, TemplateModel terminator, java.lang.Integer terminatorLength, Environment env)
abstract TemplateModel
TruncateBuiltinAlgorithm. truncateM(java.lang.String s, int maxLength, TemplateModel terminator, java.lang.Integer terminatorLength, Environment env)
Corresponds to?truncate_m(...)
in templates.TemplateScalarModel
DefaultTruncateBuiltinAlgorithm. truncateW(java.lang.String s, int maxLength, TemplateScalarModel terminator, java.lang.Integer terminatorLength, Environment env)
abstract TemplateScalarModel
TruncateBuiltinAlgorithm. truncateW(java.lang.String s, int maxLength, TemplateScalarModel terminator, java.lang.Integer terminatorLength, Environment env)
Corresponds to?truncate_w(...)
in templates.TemplateModel
DefaultTruncateBuiltinAlgorithm. truncateWM(java.lang.String s, int maxLength, TemplateModel terminator, java.lang.Integer terminatorLength, Environment env)
abstract TemplateModel
TruncateBuiltinAlgorithm. truncateWM(java.lang.String s, int maxLength, TemplateModel terminator, java.lang.Integer terminatorLength, Environment env)
Corresponds to?truncate_w_m(...)
in templates. -
Uses of Environment in freemarker.ext.servlet
Methods in freemarker.ext.servlet with parameters of type Environment Modifier and Type Method Description void
IncludePage. execute(Environment env, java.util.Map params, TemplateModel[] loopVars, TemplateDirectiveBody body)
protected void
FreemarkerServlet. processEnvironment(Environment env, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
This is the method that actually executes the template. -
Uses of Environment in freemarker.template
Methods in freemarker.template that return Environment Modifier and Type Method 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 aEnvironment
object, using this template, the data-model provided as parameter.Environment
TemplateException. getEnvironment()
Methods in freemarker.template with parameters of type Environment Modifier and Type Method Description 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 aTemplateException
was raised inside a template.void
AttemptExceptionReporter. report(TemplateException te, Environment env)
Called to log or otherwise report the error that has occurred inside an#attempt
block.Constructors in freemarker.template with parameters of type Environment Constructor Description TemplateException(Environment env)
Constructs a TemplateException with no specified detail message or underlying cause.TemplateException(java.lang.Exception cause, Environment env)
The same asTemplateException(Throwable, Environment)
; it's exists only for binary backward-compatibility.TemplateException(java.lang.String description, Environment env)
Constructs a TemplateException with the given detail message, but no underlying cause exception.TemplateException(java.lang.String description, java.lang.Exception cause, Environment env)
The same asTemplateException(String, Throwable, Environment)
; it's exists only for binary backward-compatibility.TemplateException(java.lang.String description, java.lang.Throwable cause, Environment env)
Constructs a TemplateException with both a description of the error that occurred and the underlying Exception that caused this exception to be raised.TemplateException(java.lang.Throwable cause, Environment env)
Constructs a TemplateException with the given underlying Exception, but no detail message.TemplateException(java.lang.Throwable cause, Environment env, freemarker.core.Expression blamedExpr, freemarker.core._ErrorDescriptionBuilder descriptionBuilder)
Don't use this; this is to be used internally by FreeMarker.TemplateModelException(java.lang.Throwable cause, Environment env, freemarker.core._ErrorDescriptionBuilder descriptionBuilder, boolean preventAmbiguity)
Don't use this; this is to be used internally by FreeMarker.TemplateModelException(java.lang.Throwable cause, Environment env, java.lang.String description, boolean preventAmbiguity)
Don't use this; this is to be used internally by FreeMarker. -
Uses of Environment in freemarker.template.utility
Methods in freemarker.template.utility with parameters of type Environment Modifier and Type Method Description static boolean
StringUtil. matchesName(java.lang.String qname, java.lang.String nodeName, java.lang.String nsURI, Environment env)
-