Uses of Class
freemarker.template.Template
-
Packages that use Template 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.) -
-
Uses of Template in freemarker.cache
Methods in freemarker.cache that return Template Modifier and Type Method Description TemplateTemplateCache. getTemplate(java.lang.String name, java.util.Locale locale, java.lang.String encoding, boolean parseAsFTL)Deprecated.UseTemplateCache.getTemplate(String, Locale, Object, String, boolean), which can return more detailed result when the template is missing.TemplateTemplateCache.MaybeMissingTemplate. getTemplate()TheTemplateif it wasn't missing, otherwisenull. -
Uses of Template in freemarker.core
Methods in freemarker.core that return Template Modifier and Type Method Description TemplateEnvironment. getCurrentTemplate()Returns theTemplatethat we are "lexically" inside at the moment.TemplateEnvironment. getMainTemplate()Returns the topmostTemplate, with other words, the one for which thisEnvironmentwas created.TemplateDirectiveCallPlace. getTemplate()The template that contains this call;nullif the call is not from a template (but directly from user Java code, for example).TemplateEnvironment. getTemplate()Deprecated.UseEnvironment.getMainTemplate()instead (orEnvironment.getCurrentNamespace()and thenEnvironment.Namespace.getTemplate()); the value returned by this method is often not what you expect when it comes to macro/function invocations.TemplateEnvironment.Namespace. getTemplate()TemplateEnvironment. getTemplateForImporting(java.lang.String name)Gets a template for importing; used withEnvironment.importLib(Template importedTemplate, String namespace).TemplateEnvironment. getTemplateForInclusion(java.lang.String name, java.lang.String encoding, boolean parse)Same asEnvironment.getTemplateForInclusion(String, String, boolean, boolean)withfalseignoreMissingargument.TemplateEnvironment. getTemplateForInclusion(java.lang.String name, java.lang.String encoding, boolean parseAsFTL, boolean ignoreMissing)Gets a template for inclusion; used for implementingEnvironment.include(Template includedTemplate).Methods in freemarker.core with parameters of type Template Modifier and Type Method Description voidTemplateConfiguration. apply(Template template)Sets those settings of theTemplatewhich aren't yet set in theTemplateand are set in thisTemplateConfiguration, leaves the other settings as is.java.lang.ObjectCustomAttribute. get(Template template)Environment.NamespaceEnvironment. importLib(Template loadedTemplate, java.lang.String targetNsVarName)Does what the#importdirective does, but with an already loaded template.voidEnvironment. include(Template includedTemplate)Processes a Template in the context of thisEnvironment, including its output in theEnvironment's Writer.java.lang.ClassOptInTemplateClassResolver. resolve(java.lang.String className, Environment env, Template template)java.lang.ClassTemplateClassResolver. resolve(java.lang.String className, Environment env, Template template)Gets aClassbased on the class name.protected java.lang.StringOptInTemplateClassResolver. safeGetTemplateName(Template template)Extract the template name from the template object which will be matched against the trusted template names and pattern.voidCustomAttribute. set(java.lang.Object value, Template template)voidFreeMarkerTree. setTemplate(Template template)Deprecated.Constructors in freemarker.core with parameters of type Template Constructor Description Environment(Template template, TemplateHashModel rootDataModel, java.io.Writer out)FreeMarkerTree(Template template)Deprecated.ParseException(java.lang.String description, Template template, int lineNumber, int columnNumber)Deprecated.UseParseException(String, Template, int, int, int, int)instead, as IDE-s need the end position of the error too.ParseException(java.lang.String description, Template template, int lineNumber, int columnNumber, int endLineNumber, int endColumnNumber)ParseException(java.lang.String description, Template template, int lineNumber, int columnNumber, int endLineNumber, int endColumnNumber, java.lang.Throwable cause)ParseException(java.lang.String description, Template template, int lineNumber, int columnNumber, java.lang.Throwable cause)Deprecated.UseParseException(String, Template, int, int, int, int, Throwable)instead, as IDE-s need the end position of the error too.ParseException(java.lang.String description, Template template, freemarker.core.Token tk)ParseException(java.lang.String description, Template template, freemarker.core.Token tk, java.lang.Throwable cause) -
Uses of Template in freemarker.ext.servlet
Methods in freemarker.ext.servlet with parameters of type Template Modifier and Type Method Description protected voidFreemarkerServlet. postTemplateProcess(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Template template, TemplateModel data)Called after the execution returns fromprocess(Object, java.io.Writer).protected booleanFreemarkerServlet. preTemplateProcess(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Template template, TemplateModel model)Called before the execution is passed toprocess(Object, java.io.Writer). -
Uses of Template in freemarker.template
Methods in freemarker.template that return Template Modifier and Type Method Description static TemplateTemplate. getPlainTextTemplate(java.lang.String name, java.lang.String content, Configuration config)static TemplateTemplate. getPlainTextTemplate(java.lang.String name, java.lang.String sourceName, java.lang.String content, Configuration config)Creates (not "get"-s) aTemplatethat only contains a single block of static text, no dynamic content.TemplateConfiguration. getTemplate(java.lang.String name)Retrieves the template with the given name from the template cache, loading it into the cache first if it's missing/staled.TemplateConfiguration. getTemplate(java.lang.String name, java.lang.String encoding)Shorthand forgetTemplate(name, null, null, encoding, true, false).TemplateConfiguration. getTemplate(java.lang.String name, java.util.Locale locale)Shorthand forgetTemplate(name, locale, null, null, true, false).TemplateConfiguration. getTemplate(java.lang.String name, java.util.Locale locale, java.lang.Object customLookupCondition, java.lang.String encoding, boolean parseAsFTL, boolean ignoreMissing)Retrieves the template with the given name (and according the specified further parameters) from the template cache, loading it into the cache first if it's missing/staled.TemplateConfiguration. getTemplate(java.lang.String name, java.util.Locale locale, java.lang.String encoding)Shorthand forgetTemplate(name, locale, null, encoding, true, false).TemplateConfiguration. getTemplate(java.lang.String name, java.util.Locale locale, java.lang.String encoding, boolean parseAsFTL)Shorthand forgetTemplate(name, locale, null, encoding, parseAsFTL, false).TemplateConfiguration. getTemplate(java.lang.String name, java.util.Locale locale, java.lang.String encoding, boolean parseAsFTL, boolean ignoreMissing)
-