public abstract class AbstractMacro extends Object implements Macro
Constructor and Description |
---|
AbstractMacro(String name) |
AbstractMacro(String name,
List<String> parameterNames,
List<EvaluateExpression> parameterDefaultValues) |
AbstractMacro(String name,
Macro bodyContentMacro) |
public AbstractMacro(String name)
public AbstractMacro(String name, List<String> parameterNames, List<EvaluateExpression> parameterDefaultValues)
protected Macro getMacro(TemplateContext $context)
public Macro getBodyContentMacro()
protected void addParameter(String parameterName, EvaluateExpression defaultValue)
public TemplateEngine getTemplateEngine()
Macro
getTemplateEngine
in interface Macro
public void setTemplateEngine(TemplateEngine templateEngine)
Macro
setTemplateEngine
in interface Macro
public List<EvaluateExpression> getParameterDefaultValues()
Macro
getParameterDefaultValues
in interface Macro
public void setParameterDefaultValues(List<EvaluateExpression> parameterDefaultValues)
protected void init(String name)
public void render(Template template, TemplateContext pageContext, TemplateContext context, OutputStream outputStream) throws TemplateException
Macro
render
in interface Macro
TemplateException
protected abstract void renderMacro(Template template, TemplateContext pageContext, TemplateContext context, OutputStream outputStream) throws IOException, TemplateException
IOException
TemplateException
public List<String> getParameterNames()
Macro
getParameterNames
in interface Macro
public String getParameterName(int index)
Macro
getParameterName
in interface Macro
public String getMacroPath()
Macro
getMacroPath
in interface Macro
public void setMacroPath(String macroPath)
Macro
setMacroPath
in interface Macro
public long getLastModifiedTime()
getLastModifiedTime
in interface Updatable
public void setLastModifiedTime(long time)
setLastModifiedTime
in interface Updatable
public String getAbsolutePath()
getAbsolutePath
in interface Updatable
public void setAbsolutePath(String path)
setAbsolutePath
in interface Updatable
Copyright © 2006–2018 TinyGroup. All rights reserved.