public interface JoriaRuntime
The joria runtime is the central interface that is used to control ReportWeaver when it is integrated in another application. You receive an instance of JoriaRuntime by calling joria.ReportService.create(...)
| Field Summary | |
|---|---|
static java.lang.String |
formatCsv
output format CSV (comma separated values) file |
static java.lang.String |
formatEmail
output format send as email |
static java.lang.String |
formatHtml
output format HTML file |
static java.lang.String |
formatPdf
output format PDF-file |
static java.lang.String |
formatPreview
output format display in preview frame |
static java.lang.String |
formatPrinter
output format send to printer |
static java.lang.String |
formatXhtml
output format XHTML file |
static java.lang.String |
formatXml
output format XML file |
static java.lang.String |
lineSeparatorDefault
platform csv line separation string |
static java.lang.String |
lineSeparatorMac
mac csv line separation string (\r) |
static java.lang.String |
lineSeparatorUnix
unix csv line separation string (\n) |
static java.lang.String |
lineSeparatorWindows
windows csv line seperation string (\r\n) |
static java.lang.String |
propEncoding
csv character encoding. |
static java.lang.String |
propFormat
the secondary property key to specify. |
static java.lang.String |
propIncludeHeaderFooter
to include header and footes in the csv output. |
static java.lang.String |
propLineSeparator
csv line separation string. |
static java.lang.String |
propLocale
The locale to use for this single report run. |
static java.lang.String |
propQuote
csv qoute charater. |
static java.lang.String |
propRoot
The root object to use. |
static java.lang.String |
propSeparator
csv element separator character. |
static java.lang.String |
propTarget
the main property key to specify. |
static java.lang.String |
propVariables
key for preset variable values, the value must be a map. |
static java.lang.String |
variables
|
| Method Summary | |
|---|---|
void |
exportCsv(JoriaTemplate t)
Run the template with the specified entry point and export it as a ascii file with separators. |
void |
exportCsv(JoriaTemplate t,
java.io.File target,
char separator,
char quote)
Run the template with the specified entry point and export it as a ascii file with separators. |
void |
exportCsv(JoriaTemplate t,
java.io.OutputStream target,
char separator,
char quote)
Run the template with the specified entry point and export it as a ascii file with separators. |
void |
exportCsv(JoriaTemplate t,
java.lang.String target,
char separator,
char quote)
Run the template with the specified entry point and export it as a ascii file with separators. |
void |
exportFromViewRoot(JoriaViewRoot r,
java.util.Map<java.lang.String,java.lang.Object> config)
Exports data that is defined in a view. |
void |
exportHtml(JoriaTemplate t)
Run the template with the specified entry point and export it as an html file. |
void |
exportHtml(JoriaTemplate t,
java.io.File target)
Run the template with the specified entry point and export it as an html file |
void |
exportHtml(JoriaTemplate t,
java.io.OutputStream target)
Run the template with the specified entry point and export it as an html file |
void |
exportHtml(JoriaTemplate t,
java.lang.String target)
Run the template with the specified entry point and export it as an html file |
void |
exportPdf(JoriaTemplate t)
Run the template with the specified entry point and print it using the built-in pdf printer driver. |
void |
exportPdf(JoriaTemplate t,
java.io.File out)
Run the template with the specified entry point and print it using the built-in pdf printer driver. |
void |
exportPdf(JoriaTemplate t,
java.io.OutputStream out)
Run the template with the specified entry point and print it using the built-in pdf printer driver. |
void |
exportPdf(JoriaTemplate t,
java.lang.String out)
Run the template with the specified entry point and print it using the built-in pdf printer driver. |
void |
exportXHtml(JoriaTemplate t,
java.io.File target)
Run the template with the specified entry point and export it as an xml file using the xhtml dtd |
void |
exportXHtml(JoriaTemplate t,
java.io.OutputStream out)
Run the template with the specified entry point and export it as an xml file using the xhtml dtd |
void |
exportXHtml(JoriaTemplate t,
java.lang.String target)
Run the template with the specified entry point and export it as an xml file using the xhtml dtd |
void |
exportXml(JoriaTemplate template,
java.io.OutputStream stream)
Run the template and generate a xml file |
JoriaTemplate |
findReportTemplate(java.lang.String name)
Search the list of defined teplates for the specified template name. |
JoriaTemplate |
findReportTemplateId(java.lang.String id)
Search the list of defined teplates for the specified template name. |
JoriaViewRoot |
findUserViewRoot(java.lang.String name)
Return the entry point with this name |
java.util.Locale |
getCurrentLocale()
get the current locale. |
JoriaTemplate[] |
getReportTemplates()
Return the list of templates defined in the currently open template set (rwts file) |
JoriaViewRoot[] |
getUserViewRoots()
Return the list of entry points defined in the currently open template set (rwts file) |
void |
printDefault(JoriaTemplate t)
Run the template with the specified entry point and print it using the defualt printer and settings. |
void |
printDialog(JoriaTemplate t)
Run the template with the specified entry point and print it using the printer dialog to ask for the printer and settings. |
void |
printNamedPrinter(JoriaTemplate t,
java.lang.String printer)
Run the template with the specified entry point and print it to the specified printer. |
void |
run(JoriaTemplate t,
java.util.Map<java.lang.String,java.lang.Object> config)
Run the template with the specified entry point and pass the output target and other configurations via the config map. |
javax.swing.JFrame |
runToPreviewFrame(JoriaTemplate t)
Run the template with the specified entry point and display it in a top level frame |
javax.swing.JFrame |
runToPreviewFrame(JoriaTemplate t,
java.lang.Object rootValue)
Run the template with the specified entry point and display it in a top level frame |
javax.swing.JComponent |
runToPreviewPanel(JoriaTemplate t)
Run the template with the specified entry point and display it in a JComponent which can be added to the application user interface. |
void |
setCurrentLocale(java.util.Locale loc)
set the currently reigning locale. |
void |
setLocalisationDirectory(java.lang.String dir)
Sets the directory where reportweaver searches for localisation files |
void |
setMessageCallback(MessageCallback cb)
register a message callback class that receives logging calls. |
| Field Detail |
|---|
static final java.lang.String formatCsv
static final java.lang.String formatEmail
static final java.lang.String formatHtml
static final java.lang.String formatPdf
static final java.lang.String formatPreview
static final java.lang.String formatPrinter
static final java.lang.String formatXhtml
static final java.lang.String formatXml
static final java.lang.String lineSeparatorDefault
static final java.lang.String lineSeparatorMac
static final java.lang.String lineSeparatorUnix
static final java.lang.String lineSeparatorWindows
static final java.lang.String propEncoding
static final java.lang.String propFormat
static final java.lang.String propIncludeHeaderFooter
static final java.lang.String propLineSeparator
static final java.lang.String propLocale
static final java.lang.String propQuote
static final java.lang.String propRoot
static final java.lang.String propSeparator
static final java.lang.String propTarget
static final java.lang.String propVariables
static final java.lang.String variables
| Method Detail |
|---|
void exportCsv(JoriaTemplate t)
throws JoriaException
t - the template to run
JoriaException - in case of problems
void exportCsv(JoriaTemplate t,
java.io.File target,
char separator,
char quote)
throws JoriaException
t - the template to runtarget - The file where the output will be stored.separator - The character to separate fields, Typically comma, semicolon or tabulator.quote - The character to enclose fields in. Typically single or double quotes ('/").
JoriaException - in case of problems
void exportCsv(JoriaTemplate t,
java.io.OutputStream target,
char separator,
char quote)
throws JoriaException
t - the template to runtarget - An output stream where the output will be stored. You can use a ByteArrayOutputStream to kepp the generated data.separator - The character to separate fields, Typically comma, semicolon or tabulator.quote - The character to enclose fields in. Typically single or double quotes ('/").
JoriaException - in case of problems
void exportCsv(JoriaTemplate t,
java.lang.String target,
char separator,
char quote)
throws JoriaException
t - the template to runtarget - The file where the output will be stored.separator - The character to separate fields, Typically comma, semicolon or tabulator.quote - The character to enclose fields in. Typically single or double quotes ('/").
JoriaException - in case of problems
void exportFromViewRoot(JoriaViewRoot r,
java.util.Map<java.lang.String,java.lang.Object> config)
throws JoriaException
The following keys are available:
Key format="csv":
key separator: Chracter: the character (byte) that shall be uses to separate fields
key quote: Chracter: the character (byte) that shall be uses to quote fields that contain special characters. A quote character within a quoted field is escaped with a backslash
key lineSeparator: String: One of the strings: Default, Mac, Unix, Windows. generates line separators for the specified platform. Default uses the setting of the local platform
key includeHeaderFooter: Boolean: If true the headers and footers will be exported as well.
key encoding: String: The character encoding to be used. At least these are available: Default, Cp1252, ISO-8859-1, UTF-8, UTF-16, US-ASCII
Which encodings are available is specified by the java documentation and more encodings may be provided by different java implementations.
r - the datasource rootconfig - the configuration
JoriaException - in case of problems
void exportHtml(JoriaTemplate t)
throws JoriaException
t - the template to run
JoriaException - in case of problems
void exportHtml(JoriaTemplate t,
java.io.File target)
throws JoriaException
t - the template to runtarget - The file where the output will be stored.
JoriaException - in case of problems
void exportHtml(JoriaTemplate t,
java.io.OutputStream target)
throws JoriaException
t - the template to runtarget - The stream where the output will be stored. You can use a ByteArrayOutputStream to kepp the generated data.
JoriaException - in case of problems
void exportHtml(JoriaTemplate t,
java.lang.String target)
throws JoriaException
t - the template to runtarget - The filename where the output will be stored.
JoriaException - in case of problems
void exportPdf(JoriaTemplate t)
throws JoriaException
t - the template to run
JoriaException - in case of problems
void exportPdf(JoriaTemplate t,
java.io.File out)
throws JoriaException
t - the template to runout - The filename where the output will be stored.
JoriaException - in case of problems
void exportPdf(JoriaTemplate t,
java.io.OutputStream out)
throws JoriaException
t - the template to runout - The stream where the output will be stored. You can use a ByteArrayOutputStream to kepp the generated data.
JoriaException - in case of problems
void exportPdf(JoriaTemplate t,
java.lang.String out)
throws JoriaException
t - the template to runout - The file where the output will be stored.
JoriaException - in case of problems
void exportXHtml(JoriaTemplate t,
java.io.File target)
throws JoriaException
t - the template to runtarget - The file where the output will be stored.
JoriaException - in case of problems
void exportXHtml(JoriaTemplate t,
java.io.OutputStream out)
throws JoriaException
t - the template to runout - The stream where the output will be stored. You can use a ByteArrayOutputStream to kepp the generated data.
JoriaException - in case of problems
void exportXHtml(JoriaTemplate t,
java.lang.String target)
throws JoriaException
t - the template to runtarget - The filename where the output will be stored.
JoriaException - in case of problems
void exportXml(JoriaTemplate template,
java.io.OutputStream stream)
throws JoriaException
template - The template to runstream - The stream to output the xml file to
JoriaException - in case of problems
JoriaTemplate findReportTemplate(java.lang.String name)
throws JoriaException
name - the name of the template
JoriaException - throws a JoriaException if something fundamental is wrong.
JoriaTemplate findReportTemplateId(java.lang.String id)
throws JoriaException
id - the id of the template
JoriaException - throws a JoriaException if something fundamental is wrong.
JoriaViewRoot findUserViewRoot(java.lang.String name)
throws JoriaException
name - of the entry point
JoriaException - throws a JoriaException if something fundamental is wrong.java.util.Locale getCurrentLocale()
JoriaTemplate[] getReportTemplates()
throws JoriaException
JoriaException - in case of problems
JoriaViewRoot[] getUserViewRoots()
throws JoriaException
JoriaException - in case of problems
void printDefault(JoriaTemplate t)
throws JoriaException
t - The template to print
JoriaException - in case of problems
void printDialog(JoriaTemplate t)
throws JoriaException
t - The template to print
JoriaException - in case of problems
void printNamedPrinter(JoriaTemplate t,
java.lang.String printer)
throws JoriaException
t - The template to printprinter - the name of the printer
JoriaException - in case of problems
void run(JoriaTemplate t,
java.util.Map<java.lang.String,java.lang.Object> config)
throws JoriaException
t - the template to runconfig - A number of configuration key vale pairs. See the prop* fields. At least format and
normally target should be set.
JoriaException - in case of problems
javax.swing.JFrame runToPreviewFrame(JoriaTemplate t)
throws JoriaException
t - the template to run
JoriaException - in case of problems
javax.swing.JFrame runToPreviewFrame(JoriaTemplate t,
java.lang.Object rootValue)
throws JoriaException
t - the template to runrootValue - the value for the root object
JoriaException - in case of problems
javax.swing.JComponent runToPreviewPanel(JoriaTemplate t)
throws JoriaException
t - the template to run
JoriaException - in case of problemsvoid setCurrentLocale(java.util.Locale loc)
loc - the localevoid setLocalisationDirectory(java.lang.String dir)
dir - the name of the directory.void setMessageCallback(MessageCallback cb)
cb - the callback