A TemplateEngine that can resolve templates using the configured TemplateResolver
Modifiers | Name | Description |
---|---|---|
protected java.util.Map<java.lang.String, WritableScriptTemplate> |
cachedTemplates |
|
protected org.codehaus.groovy.control.CompilerConfiguration |
compilerConfiguration |
Whether to reload views |
protected java.util.Map<java.util.List, WritableScriptTemplate> |
resolveCache |
Type | Name and description |
---|---|
groovy.lang.GroovyClassLoader |
classLoader The class loader to use |
boolean |
enableReloading Whether to enable reloading |
java.lang.String |
extension The view uri resolver |
boolean |
shouldCache |
TemplateResolver |
templateResolver The TemplateResolver to use |
ViewConfiguration |
viewConfiguration The view config |
ViewUriResolver |
viewUriResolver The configuration to use for compilation |
Constructor and description |
---|
ResolvableGroovyTemplateEngine
(ViewConfiguration configuration) Creates a ResolvableGroovyTemplateEngine for the given base class name and file extension |
Type | Name and description |
---|---|
protected WritableScriptTemplate |
createTemplate(java.lang.Class<? extends groovy.text.Template> cls) Creates a template for the given template class |
protected WritableScriptTemplate |
createTemplate(java.lang.Class<? extends groovy.text.Template> cls, java.io.File sourceFile) Creates a template for the given template class |
WritableScriptTemplate |
createTemplate(java.io.File file) |
WritableScriptTemplate |
createTemplate(java.net.URL url) |
WritableScriptTemplate |
createTemplate(java.lang.String path, java.net.URL url) |
WritableScriptTemplate |
createTemplate(java.io.Reader reader) |
org.codehaus.groovy.control.CompilerConfiguration |
getCompilerConfiguration() |
java.lang.String |
getDynamicTemplatePrefix() |
protected WritableScriptTemplate |
initializeTemplate(GrailsViewTemplate template, java.io.File sourceFile) Initialises a template instance |
protected ViewsTransform |
newViewsTransform() |
protected void |
prepareCustomizers(org.codehaus.groovy.control.CompilerConfiguration compilerConfiguration) |
WritableScriptTemplate |
resolveTemplate(java.lang.Class type, java.util.Locale locale, java.lang.String... qualifiers) Resolves a template for the given object |
WritableScriptTemplate |
resolveTemplate(java.lang.String path) Resolves a template for the given path |
WritableScriptTemplate |
resolveTemplate(java.lang.String path, java.util.Locale locale, java.lang.String... qualifiers) Resolves a template for the given path |
void |
setLinkGenerator(grails.web.mapping.LinkGenerator linkGenerator) |
void |
setMappingContext(org.grails.datastore.mapping.model.MappingContext mappingContext) |
void |
setMessageSource(org.springframework.context.MessageSource messageSource) |
void |
setMimeUtility(MimeUtility mimeUtility) |
void |
setProxyHandler(grails.core.support.proxy.ProxyHandler proxyHandler) |
Methods inherited from class | Name |
---|---|
class groovy.text.TemplateEngine |
groovy.text.TemplateEngine#createTemplate(java.io.File), groovy.text.TemplateEngine#createTemplate(java.net.URL), groovy.text.TemplateEngine#createTemplate(java.io.Reader), groovy.text.TemplateEngine#createTemplate(java.lang.String), groovy.text.TemplateEngine#wait(long, int), groovy.text.TemplateEngine#wait(long), groovy.text.TemplateEngine#wait(), groovy.text.TemplateEngine#equals(java.lang.Object), groovy.text.TemplateEngine#toString(), groovy.text.TemplateEngine#hashCode(), groovy.text.TemplateEngine#getClass(), groovy.text.TemplateEngine#notify(), groovy.text.TemplateEngine#notifyAll() |
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Whether to reload views
The class loader to use
Whether to enable reloading
The view uri resolver
The TemplateResolver to use
The view config
The configuration to use for compilation
Creates a ResolvableGroovyTemplateEngine for the given base class name and file extension
baseClassName
- The base class nameextension
- The file extensionCreates a template for the given template class
cls
- The classCreates a template for the given template class
cls
- The classInitialises a template instance
template
- The created templatesourceFile
- The source fileResolves a template for the given object
object
- The objectqualifiers
- One or many qualifiers to scope the view (for example the locale, the version etc.)Resolves a template for the given path
path
- The path to the templateResolves a template for the given path
path
- The path to the templatequalifiers
- One or many qualifiers to scope the view (for example the locale, the version etc.)Groovy Documentation