|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.peaseplate.internal.model.AbstractRenderContext org.peaseplate.internal.model.DefaultBuildContext
public class DefaultBuildContext
An abstract implementation of the execution context
Constructor Summary | |
---|---|
|
DefaultBuildContext(TemplateEngine engine,
java.util.Locale locale,
LineSeparator lineSeparator)
|
protected |
DefaultBuildContext(TemplateEngine engine,
Template template,
java.util.Locale locale,
LineSeparator lineSeparator)
|
|
DefaultBuildContext(Template template,
java.util.Locale locale,
LineSeparator lineSeparator)
|
Method Summary | |
---|---|
MacroReference |
getMacroReference(java.lang.String qualifiedName)
Returns the macro reference with the specified name and the specified extension |
java.lang.String |
getMessage(java.lang.String key,
java.lang.Object... values)
|
Messages |
getMessages()
Returns the current messages object from the stack |
java.lang.Object |
getVariable(java.lang.String name)
Returns the variable with the specified name or null if not set |
java.lang.Object |
getWorkingObject()
Gets the top most working object from the stack without popping it |
Messages |
popMessages()
Pops the messages from the stack |
java.lang.Object |
popWorkingObject()
Pops the working object from the stack |
void |
pushMessages(Messages messages)
Pushes the messages to the stack |
void |
pushWorkingObject(java.lang.Object object)
Pushes the working object to the stack |
void |
releaseVariable(java.lang.String name)
Releases the variable with the specified name |
void |
setVariable(java.lang.String name,
java.lang.Object value)
Sets the variable with the specified name |
Methods inherited from class org.peaseplate.internal.model.AbstractRenderContext |
---|
getEngine, getLineSeparator, getLocale, getTemplate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.peaseplate.RenderContext |
---|
getEngine, getLineSeparator, getLocale, getTemplate |
Constructor Detail |
---|
public DefaultBuildContext(TemplateEngine engine, java.util.Locale locale, LineSeparator lineSeparator) throws TemplateException
TemplateException
public DefaultBuildContext(Template template, java.util.Locale locale, LineSeparator lineSeparator) throws TemplateException
TemplateException
protected DefaultBuildContext(TemplateEngine engine, Template template, java.util.Locale locale, LineSeparator lineSeparator) throws TemplateException
TemplateException
Method Detail |
---|
public void pushWorkingObject(java.lang.Object object)
BuildContext
pushWorkingObject
in interface BuildContext
object
- the working objectBuildContext.pushWorkingObject(java.lang.Object)
public java.lang.Object popWorkingObject() throws java.lang.IllegalStateException
BuildContext
popWorkingObject
in interface BuildContext
java.lang.IllegalStateException
- if there is no working object on the stackBuildContext.popWorkingObject()
public java.lang.Object getWorkingObject() throws java.lang.IllegalStateException
BuildContext
getWorkingObject
in interface BuildContext
java.lang.IllegalStateException
- if there is no working object on the stackBuildContext.getWorkingObject()
public void pushMessages(Messages messages)
BuildContext
pushMessages
in interface BuildContext
messages
- the messagesBuildContext.pushMessages(org.peaseplate.Messages)
public Messages popMessages() throws java.lang.IllegalStateException
BuildContext
popMessages
in interface BuildContext
java.lang.IllegalStateException
- if there is no messages object on the stackBuildContext.popMessages()
public Messages getMessages() throws java.lang.IllegalStateException
BuildContext
getMessages
in interface BuildContext
java.lang.IllegalStateException
- if there is no messages object on the stackBuildContext.getMessages()
public java.lang.String getMessage(java.lang.String key, java.lang.Object... values)
getMessage
in interface RenderContext
RenderContext.getMessage(java.lang.String, java.lang.Object[])
public MacroReference getMacroReference(java.lang.String qualifiedName)
BuildContext
getMacroReference
in interface BuildContext
qualifiedName
- the qualifiedName of the macro
BuildContext.getMacroReference(java.lang.String)
public java.lang.Object getVariable(java.lang.String name)
BuildContext
getVariable
in interface BuildContext
name
- the name
BuildContext.getVariable(java.lang.String)
public void setVariable(java.lang.String name, java.lang.Object value)
BuildContext
setVariable
in interface BuildContext
name
- the name of the variablevalue
- the value of the variableBuildContext.setVariable(java.lang.String, java.lang.Object)
public void releaseVariable(java.lang.String name)
BuildContext
releaseVariable
in interface BuildContext
name
- the name of the variableBuildContext.releaseVariable(java.lang.String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |