Uses of Class
freemarker.template.Configuration
Packages that use Configuration
Package
Description
Template loading and caching.
The seldom used or advanced parts of the fundamental FreeMarker API, compared to
freemarker.template
.Servlet for legacy "Model 2" frameworks that allows using FreeMarker
templates instead of JSP as the MVC View
(see in the Manual).
The fundamental, most commonly used API-s of FreeMarker;
start with
Configuration
(see also the
Getting Started in the Manual.)-
Uses of Configuration in freemarker.cache
Methods in freemarker.cache that return ConfigurationModifier and TypeMethodDescriptionTemplateConfigurationFactory.getConfiguration()
Returns the configuration this object belongs to, ornull
if it isn't yet bound to aConfiguration
.Methods in freemarker.cache with parameters of type ConfigurationModifier and TypeMethodDescriptionvoid
TemplateCache.setConfiguration
(Configuration config) Deprecated.final void
TemplateConfigurationFactory.setConfiguration
(Configuration cfg) Binds thisTemplateConfigurationFactory
to aConfiguration
.protected void
ConditionalTemplateConfigurationFactory.setConfigurationOfChildren
(Configuration cfg) protected void
FirstMatchTemplateConfigurationFactory.setConfigurationOfChildren
(Configuration cfg) protected void
MergingTemplateConfigurationFactory.setConfigurationOfChildren
(Configuration cfg) protected abstract void
TemplateConfigurationFactory.setConfigurationOfChildren
(Configuration cfg) CallsTemplateConfiguration.setParentConfiguration(Configuration)
on each enclosedTemplateConfiguration
andTemplateConfigurationFactory.setConfiguration(Configuration)
on each enclosedTemplateConfigurationFactory
objects.Constructors in freemarker.cache with parameters of type ConfigurationModifierConstructorDescriptionTemplateCache
(TemplateLoader templateLoader, CacheStorage cacheStorage, TemplateLookupStrategy templateLookupStrategy, TemplateNameFormat templateNameFormat, TemplateConfigurationFactory templateConfigurations, Configuration config) TemplateCache
(TemplateLoader templateLoader, CacheStorage cacheStorage, TemplateLookupStrategy templateLookupStrategy, TemplateNameFormat templateNameFormat, Configuration config) Same asTemplateCache(TemplateLoader, CacheStorage, TemplateLookupStrategy, TemplateNameFormat, TemplateConfigurationFactory, Configuration)
withnull
fortemplateConfigurations
-s.TemplateCache
(TemplateLoader templateLoader, CacheStorage cacheStorage, Configuration config) TemplateCache
(TemplateLoader templateLoader, Configuration config) Same asTemplateCache(TemplateLoader, CacheStorage, Configuration)
with a newSoftCacheStorage
as the 2nd parameter. -
Uses of Configuration in freemarker.core
Methods in freemarker.core that return ConfigurationModifier and TypeMethodDescriptionEnvironment.getConfiguration()
TemplateConfiguration.getParentConfiguration()
Returns the parentConfiguration
, ornull
if none was associated yet.Methods in freemarker.core with parameters of type ConfigurationModifier and TypeMethodDescriptionfinal Object
CustomAttribute.get
(Configuration cfg) Gets the value of aConfiguration
-scope attribute from the givenConfiguration
.final void
CustomAttribute.set
(Object value, Configuration cfg) Sets the value of aConfiguration
-scope attribute in the givenConfiguration
.void
TemplateConfiguration.setParentConfiguration
(Configuration cfg) Associates this instance with aConfiguration
; usually you don't call this, as it's called internally when this instance is added to aConfiguration
. -
Uses of Configuration in freemarker.ext.servlet
Methods in freemarker.ext.servlet that return ConfigurationModifier and TypeMethodDescriptionprotected Configuration
FreemarkerServlet.createConfiguration()
Creates the FreeMarkerConfiguration
singleton and (when overidden) maybe sets its defaults.protected Configuration
FreemarkerServlet.getConfiguration()
Returns theConfiguration
object used by this servlet. -
Uses of Configuration in freemarker.template
Methods in freemarker.template that return ConfigurationModifier and TypeMethodDescriptionTemplate.getConfiguration()
Returns the Configuration object associated with this template.static Configuration
Configuration.getDefaultConfiguration()
Deprecated.The usage of the static singleton (the "default")Configuration
instance can easily cause erroneous, unpredictable behavior.Methods in freemarker.template with parameters of type ConfigurationModifier and TypeMethodDescriptionstatic Template
Template.getPlainTextTemplate
(String name, String content, Configuration config) Same asTemplate.getPlainTextTemplate(String, String, String, Configuration)
withnull
sourceName
argument.static Template
Template.getPlainTextTemplate
(String name, String sourceName, String content, Configuration config) Creates (not "get"-s) aTemplate
that only contains a single block of static text, no dynamic content.static void
Configuration.setDefaultConfiguration
(Configuration config) Deprecated.Using the "default"Configuration
instance can easily lead to erroneous, unpredictable behaviour.Constructors in freemarker.template with parameters of type ConfigurationModifierConstructorDescriptionTemplate
(String name, Reader reader, Configuration cfg) Template
(String name, Reader reader, Configuration cfg, String encoding) Convenience constructor forTemplate(name, null, reader, cfg, encoding)
.Template
(String name, String sourceCode, Configuration cfg) Convenience constructor forTemplate(name, new StringReader(reader), cfg)
.Template
(String name, String sourceName, Reader reader, Configuration cfg) Constructs a template from a character stream.Template
(String name, String sourceName, Reader reader, Configuration cfg, ParserConfiguration customParserConfiguration, String encoding) Same asTemplate(String, String, Reader, Configuration, String)
, but also specifies aTemplateConfiguration
.Same asTemplate(String, String, Reader, Configuration)
, but also specifies the template's encoding (not recommended).
TemplateCache(TemplateLoader, CacheStorage, Configuration)
constructor.