public class TemplateProcessor
extends java.lang.Object
ManagementContext
brooklyn.properties
and Entity
, EntityDriver
, and Location
methods and config.
See #processTemplateContents(String, ManagementContextInternal, Map)
for
a description of how management access is done.
Modifier and Type | Class and Description |
---|---|
static class |
TemplateProcessor.DotSplittingTemplateModel
A Freemarker
TemplateHashModel which will correctly handle entries of the form "a.b" in this map,
matching against template requests for "${a.b}". |
Constructor and Description |
---|
TemplateProcessor() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
processTemplate(java.lang.String templateFileName,
EntityDriver driver,
java.util.Map<java.lang.String,? extends java.lang.Object> extraSubstitutions)
Deprecated.
since 0.7.0 use
processTemplateFile(String, EntityDriver, Map) |
static java.lang.String |
processTemplate(java.lang.String templateFileName,
java.util.Map<java.lang.String,? extends java.lang.Object> substitutions)
Deprecated.
since 0.7.0 use
processTemplateFile(String, Map) |
static java.lang.String |
processTemplateContents(java.lang.String templateContents,
EntityDriver driver,
java.util.Map<java.lang.String,? extends java.lang.Object> extraSubstitutions)
Processes template contents according to
EntityAndMapTemplateModel . |
static java.lang.String |
processTemplateContents(java.lang.String templateContents,
EntityInternal entity,
java.util.Map<java.lang.String,? extends java.lang.Object> extraSubstitutions)
Processes template contents with the given items in scope as per
EntityAndMapTemplateModel . |
static java.lang.String |
processTemplateContents(java.lang.String templateContents,
ManagementContext managementContext,
java.util.Map<java.lang.String,? extends java.lang.Object> extraSubstitutions)
Processes template contents according to
EntityAndMapTemplateModel . |
static java.lang.String |
processTemplateContents(java.lang.String templateContents,
java.util.Map<java.lang.String,? extends java.lang.Object> substitutions)
Processes template contents using the given map, passed to freemarker,
with dot handling as per
TemplateProcessor.DotSplittingTemplateModel . |
static java.lang.String |
processTemplateContents(java.lang.String templateContents,
freemarker.template.TemplateHashModel substitutions)
Processes template contents against the given
TemplateHashModel . |
static java.lang.String |
processTemplateFile(java.lang.String templateFileName,
EntityDriver driver,
java.util.Map<java.lang.String,? extends java.lang.Object> extraSubstitutions)
Processes template contents according to
EntityAndMapTemplateModel . |
static java.lang.String |
processTemplateFile(java.lang.String templateFileName,
java.util.Map<java.lang.String,? extends java.lang.Object> substitutions)
As per
processTemplateContents(String, Map) , but taking a file. |
@Deprecated public static java.lang.String processTemplate(java.lang.String templateFileName, java.util.Map<java.lang.String,? extends java.lang.Object> substitutions)
processTemplateFile(String, Map)
public static java.lang.String processTemplateFile(java.lang.String templateFileName, java.util.Map<java.lang.String,? extends java.lang.Object> substitutions)
processTemplateContents(String, Map)
, but taking a file.@Deprecated public static java.lang.String processTemplate(java.lang.String templateFileName, EntityDriver driver, java.util.Map<java.lang.String,? extends java.lang.Object> extraSubstitutions)
processTemplateFile(String, EntityDriver, Map)
public static java.lang.String processTemplateFile(java.lang.String templateFileName, EntityDriver driver, java.util.Map<java.lang.String,? extends java.lang.Object> extraSubstitutions)
EntityAndMapTemplateModel
.public static java.lang.String processTemplateContents(java.lang.String templateContents, EntityDriver driver, java.util.Map<java.lang.String,? extends java.lang.Object> extraSubstitutions)
EntityAndMapTemplateModel
.public static java.lang.String processTemplateContents(java.lang.String templateContents, ManagementContext managementContext, java.util.Map<java.lang.String,? extends java.lang.Object> extraSubstitutions)
EntityAndMapTemplateModel
.public static java.lang.String processTemplateContents(java.lang.String templateContents, EntityInternal entity, java.util.Map<java.lang.String,? extends java.lang.Object> extraSubstitutions)
EntityAndMapTemplateModel
.public static java.lang.String processTemplateContents(java.lang.String templateContents, java.util.Map<java.lang.String,? extends java.lang.Object> substitutions)
TemplateProcessor.DotSplittingTemplateModel
.public static java.lang.String processTemplateContents(java.lang.String templateContents, freemarker.template.TemplateHashModel substitutions)
TemplateHashModel
.