com.hammurapi.render
Class JxpRenderer
java.lang.Object
com.hammurapi.render.JxpRenderer
- All Implemented Interfaces:
- FileRenderer, RenderingConstants, WriterRenderer
public class JxpRenderer
- extends java.lang.Object
- implements WriterRenderer, FileRenderer, RenderingConstants
JxpRenderer renders using JXP template engine and pages loaded by classloader.
- Author:
- Pavel Vlasov
|
Method Summary |
protected void |
postRender(java.util.Map<java.lang.String,java.lang.Object> environment,
Context context,
java.lang.String profile,
java.util.Locale locale,
java.io.File outputDir)
This method is invoked after successful rendering. |
boolean |
render(java.io.File out,
java.util.Map<java.lang.String,java.lang.Object> environment,
Context context,
java.lang.String profile,
java.util.Locale locale)
Renders to a file. |
boolean |
render(java.io.Writer out,
java.util.Map<java.lang.String,java.lang.Object> environment,
Context context,
java.lang.String profile,
java.util.Locale locale,
java.io.File outputDir)
Renders to a writer. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JxpRenderer
public JxpRenderer(java.lang.Object obj)
render
public boolean render(java.io.File out,
java.util.Map<java.lang.String,java.lang.Object> environment,
Context context,
java.lang.String profile,
java.util.Locale locale)
throws RenderingException
- Renders to a file.
This method does not overwrite existing files if they were created after rendering has started.
It prevents infinite loops in rendering.
- Specified by:
render in interface FileRenderer
environment - Environment.context - Contextprofile - Rendering "profile", e.g. "outline", "embedded". Can be null.locale - Locale. If null then the system default locale is used.
- Returns:
- True if rendering was successful.
- Throws:
RenderingException
render
public boolean render(java.io.Writer out,
java.util.Map<java.lang.String,java.lang.Object> environment,
Context context,
java.lang.String profile,
java.util.Locale locale,
java.io.File outputDir)
throws RenderingException
- Description copied from interface:
WriterRenderer
- Renders to a writer.
- Specified by:
render in interface WriterRenderer
- Parameters:
out - Output writer.environment - Environment.context - Contextprofile - Rendering "profile", e.g. "outline", "embedded". Can be null.locale - Locale. If null then the system default locale is used.outputDir - Directory to output additional files, can be null.
- Returns:
- True if rendering was successful.
- Throws:
RenderingException
postRender
protected void postRender(java.util.Map<java.lang.String,java.lang.Object> environment,
Context context,
java.lang.String profile,
java.util.Locale locale,
java.io.File outputDir)
throws RenderingException
- This method is invoked after successful rendering. This implementation is tailored for report generator -
it renders details and contents if outputDir environment entry is instance of File and profile is outline or
outline_http
- Parameters:
environment - context - profile - locale -
- Throws:
RenderingException