|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object ee.mare.indrek.jtlt.TemplateContext
TemplateContext represents the settings and parameters that are used with working templates derived from given context. Usually you'll be using the default context. The default parameters are: startTag is <!--, endTag is -->. Also only one macro that handles the KEY-s is defined.
Constructor Summary | |
TemplateContext()
Construct a new TemplateContext. |
Method Summary | |
void |
clearShortcutTags(String macro)
Clear shortcut tags for macro. |
void |
complain(String err)
This method is called by templates when an error happens at runtime. |
void |
complain(String err,
Exception ex)
Complain by getting an additional exception to complain about. |
TemplateMacro |
findMacro(String name)
Find a registered macro with given name. |
String |
getCharset()
Get the charset used when opening template files for reading. |
String |
getEndTag()
Get the ending string for template directives. |
String |
getStartTag()
Get the starting string for template directives. |
void |
registerMacro(TemplateMacro m)
Register a macro. |
void |
setCharset(String charset)
Set the charset that is used when opening template files. |
PrintStream |
setComplainTo(PrintStream out)
Set the stream where to complain when unexpected errors happen. |
void |
setEndTag(String ss)
Set the ending tag for template directives. |
void |
setShortcutTags(String macro,
String start,
String end)
Set a shortcut tags for macro. |
void |
setStartTag(String ss)
Set the starting tag for template directives. |
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TemplateContext()
Method Detail |
public void clearShortcutTags(String macro)
public void complain(String err)
setComplainTo(java.io.PrintStream)
.
public void complain(String err, Exception ex)
public TemplateMacro findMacro(String name)
registerMacro(ee.mare.indrek.jtlt.TemplateMacro)
public String getCharset()
public String getEndTag()
setEndTag(java.lang.String)
public String getStartTag()
setStartTag(java.lang.String)
public void registerMacro(TemplateMacro m)
findMacro(java.lang.String)
public void setCharset(String charset)
public PrintStream setComplainTo(PrintStream out)
public void setEndTag(String ss)
getEndTag()
public void setShortcutTags(String macro, String start, String end)
public void setStartTag(String ss)
getStartTag()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |