@groovy.transform.CompileStatic class TemplateRendererImpl extends java.lang.Object implements ProfileRepositoryAware, TemplateRenderer
Interface for classes that can render templates
Modifiers | Name | Description |
---|---|---|
private ExecutionContext |
executionContext |
|
private grails.dev.commands.io.FileSystemInteraction |
fileSystemInteraction |
|
private Profile |
profile |
|
private ProfileRepository |
profileRepository |
|
private java.util.Map<java.lang.String, groovy.text.Template> |
templateCache |
Type | Name and description |
---|---|
ExecutionContext |
executionContext |
grails.dev.commands.io.FileSystemInteraction |
fileSystemInteraction |
Profile |
profile |
ProfileRepository |
profileRepository |
Constructor and description |
---|
TemplateRendererImpl
(ExecutionContext executionContext, ProfileRepository profileRepository, ResourceLoader resourceLoader) |
TemplateRendererImpl
(ExecutionContext executionContext, Profile profile, ProfileRepository profileRepository, ResourceLoader resourceLoader) |
Type Params | Return Type | Name and description |
---|---|---|
|
void |
render(java.util.Map<java.lang.String, java.lang.Object> namedArguments) Render with the given named arguments |
|
void |
render(java.lang.CharSequence template, java.io.File destination, Model model) Render the given template to the give destination for the given model |
|
void |
render(java.lang.CharSequence template, java.io.File destination, java.util.Map model, boolean overwrite) Render the given template to the given destination |
|
void |
render(java.io.File template, java.io.File destination, Model model) Render the given template to the give destination for the given model |
|
void |
render(java.io.File template, java.io.File destination, java.util.Map model, boolean overwrite) Render the given template to the given destination |
|
void |
render(Resource template, java.io.File destination, Model model, boolean overwrite) Render the given template to the give destination for the given model |
|
void |
render(Resource template, java.io.File destination, java.util.Map model, boolean overwrite) Render the given template to the given destination |
|
Resource |
template(java.lang.Object location) Find a template at the given location |
|
java.lang.Iterable<Resource> |
templates(java.lang.String pattern) Find templates matching the given pattern |
|
private static void |
writeTemplateToDestination(groovy.text.Template template, java.util.Map model, java.io.File destination) |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#wait(long), 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() |
Render with the given named arguments
namedArguments
- The named arguments are 'template', 'destination' and 'model'Render the given template to the give destination for the given model
template
- The contents templatedestination
- The destinationmodel
- The modelRender the given template to the given destination
template
- The contents of the templatedestination
- The destinationmodel
- The modelRender the given template to the give destination for the given model
template
- The templatedestination
- The destinationmodel
- The modelRender the given template to the given destination
template
- The templatedestination
- The destinationmodel
- The modelRender the given template to the give destination for the given model
template
- The contents templatedestination
- The destinationmodel
- The modelRender the given template to the given destination
template
- The templatedestination
- The destinationmodel
- The modelFind a template at the given location
location
- The locationFind templates matching the given pattern
pattern
- The patternGroovy Documentation