|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjet.servlet.JetRenderer
public class JetRenderer
This class is the base class for every action in jet. Defines how the actions will be executed.
Field Summary | |
---|---|
(package private) static org.apache.log4j.Logger |
log
logger object |
private JetMessages |
messages
stores the messages occur |
private long |
timeInMilis
stores the start time of execution - needed to determine the time needed to do the action in the debug modus |
Constructor Summary | |
---|---|
JetRenderer()
|
Method Summary | |
---|---|
private static java.lang.String |
doColor(java.lang.String data)
This methods formats the keys of the localizer file for bedder visualisation |
private static java.lang.String |
formatTemplateName(java.lang.String templatename)
|
private static java.util.TreeMap |
generateMessages(java.util.List messages)
This method returns a TreeMap with the given messages |
JetMessages |
getMessages()
Returns the messages generated by the action execution |
long |
getTimeInMilis()
Returns the tim in milis usedto render the response |
private void |
processTemplate(java.util.AbstractMap data,
freemarker.template.Template template,
java.io.Writer out)
|
java.lang.String |
processTemplate(JetContext context,
java.util.AbstractMap data,
java.lang.String templatename)
|
void |
processTemplate(JetContext context,
java.util.AbstractMap data,
java.lang.String templatename,
java.io.Writer out)
|
java.lang.String |
processTemplate(JetContext context,
java.util.Locale locale,
java.util.AbstractMap data,
java.lang.String templatename)
|
void |
processTemplate(JetContext context,
java.util.Locale locale,
java.util.AbstractMap data,
java.lang.String templatename,
java.io.Writer out)
|
protected void |
render(JetContext context,
java.util.AbstractMap data,
java.lang.String templatename)
Method to render a template to response |
void |
reset()
|
void |
setMessages(JetMessages messages)
Sets the messages - if you delegate between actions and want to collect all messages you have to set the messages manually on the new action |
protected void |
setTimeInMilis(long secs)
Sets the time |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static org.apache.log4j.Logger log
private JetMessages messages
private long timeInMilis
Constructor Detail |
---|
public JetRenderer()
Method Detail |
---|
protected final void setTimeInMilis(long secs)
secs
- time in milisecsprivate static final java.util.TreeMap generateMessages(java.util.List messages)
messages
- messages to hash
protected final void render(JetContext context, java.util.AbstractMap data, java.lang.String templatename) throws JetActionException, java.io.IOException
data
- the TreeMap with data structure to usetemplatename
- the name of the template to render
JetActionException,IOException
JetActionException
java.io.IOException
private static final java.lang.String doColor(java.lang.String data)
data
- the string containing key to colorize
public long getTimeInMilis()
public final JetMessages getMessages()
public final void setMessages(JetMessages messages)
messages
- messages objectpublic final void reset()
reset
in interface Resetable
Resetable.reset()
public java.lang.String processTemplate(JetContext context, java.util.AbstractMap data, java.lang.String templatename) throws JetActionException, java.io.IOException
JetActionException
java.io.IOException
public java.lang.String processTemplate(JetContext context, java.util.Locale locale, java.util.AbstractMap data, java.lang.String templatename) throws JetActionException, java.io.IOException
JetActionException
java.io.IOException
public void processTemplate(JetContext context, java.util.AbstractMap data, java.lang.String templatename, java.io.Writer out) throws JetActionException, java.io.IOException
JetActionException
java.io.IOException
public void processTemplate(JetContext context, java.util.Locale locale, java.util.AbstractMap data, java.lang.String templatename, java.io.Writer out) throws JetActionException, java.io.IOException
JetActionException
java.io.IOException
private final void processTemplate(java.util.AbstractMap data, freemarker.template.Template template, java.io.Writer out) throws JetActionException, java.io.IOException
JetActionException
java.io.IOException
private static java.lang.String formatTemplateName(java.lang.String templatename)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |