Package com.redwood.scheduler.api.model
Class ReportScript
- java.lang.Object
-
- com.redwood.scheduler.api.model.ReportScript
-
public final class ReportScript extends Object
Easy interface to reports from scripting.
-
-
Constructor Summary
Constructors Constructor Description ReportScript()
Create a new ReportScript using the implicit session (jcsSession), and the standard output stream (jcsOut).ReportScript(com.redwood.scheduler.api.model.SchedulerSession newSession, Writer newWriter)
Create a new ReportScript using a specific session and writer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
endHTML()
End HTML output, emits everything from and including the closing body tag.void
runCSV(String reportName)
Run a report with CSV output.void
runHTML(String reportName)
Run a report with HTML output.void
runXML(String reportName)
Run a report with XML output.void
startHTML(String title)
Start HTML output, emits everything up to and including the opening body tag.
-
-
-
Constructor Detail
-
ReportScript
public ReportScript()
Create a new ReportScript using the implicit session (jcsSession), and the standard output stream (jcsOut).
-
ReportScript
public ReportScript(com.redwood.scheduler.api.model.SchedulerSession newSession, Writer newWriter)
Create a new ReportScript using a specific session and writer.- Parameters:
newSession
- the session to use.newWriter
- the writer to use.
-
-
Method Detail
-
startHTML
public void startHTML(String title) throws IOException
Start HTML output, emits everything up to and including the opening body tag.- Parameters:
title
- the title.- Throws:
IOException
- if writing fails.
-
endHTML
public void endHTML() throws IOException
End HTML output, emits everything from and including the closing body tag.- Throws:
IOException
- if writing fails.
-
runHTML
public void runHTML(String reportName)
Run a report with HTML output.- Parameters:
reportName
- the name of the report to run.
-
runCSV
public void runCSV(String reportName)
Run a report with CSV output.- Parameters:
reportName
- the name of the report to run.
-
runXML
public void runXML(String reportName)
Run a report with XML output.- Parameters:
reportName
- the name of the report to run.
-
-