Expresso 5-6

com.jcorporate.expresso.ext.report
Interface ExpressoReport

All Known Subinterfaces:
MultiFormatReport
All Known Implementing Classes:
ReportPage

public interface ExpressoReport

ExpressoReport is a generic interface for allowing reports to be "printed" An example usage of an ExpressoReport is the ReportPage object as defined in com.jcorporate.expresso.services.html.ReportPage. Although the interfaces provide independence, and thus you can integrate whatever report engine you wish, eContent has built in integration with

For those that are interested in making their own reports and a report driver the general idea is this:

Author:
Michael Rimov

Method Summary
 String getDefaultValue(String parameterName)
          Retrieve the default parameter value for the given parameter name
 List getParameterNames()
          Retrieve a list of parameters that this report supports.
 String getReportFileExtension()
          Retrieve the recommended file extension for the report.
 String getReportMimeType()
          The report engine driver is most likely going to need to know what kind of MimeType to expect the report.
 String getTitle()
          Retrieve the title of the report
 void printReport(OutputStream os)
          All report objects need to implement the printReport method so that the framework can manage the report output.
 void setDataContext(String newDataContext)
          Sets the data context that the report is to work with.
 void setReportCode(String newReportcode)
          This is the unique identifier for the report.
 void setReportParameters(Map parameters)
          Sets the report parameters.
 

Method Detail

printReport

public void printReport(OutputStream os)
                 throws ReportException,
                        IOException
All report objects need to implement the printReport method so that the framework can manage the report output.

Parameters:
os - The OutputStream for the report to print to.
Throws:
ReportException - on error
IOException - upon IO Error

setReportParameters

public void setReportParameters(Map parameters)
Sets the report parameters. Parameters are keyed by String parameter names and the values are of type java.lang.String

Parameters:
parameters - a java.util.Map object with the contents as specified in the function description.

getParameterNames

public List getParameterNames()
Retrieve a list of parameters that this report supports. This function may be blank, in which case, there still could be parameters for the report but the automatic ui functions such as ReportServer won't present them as options.

Returns:
java.util.List of Strings. or null if there are no parameters

getDefaultValue

public String getDefaultValue(String parameterName)
Retrieve the default parameter value for the given parameter name

Parameters:
parameterName - the name of the parameter. Must be listed in the list of parameter names
Returns:
java.lang.String. The default parameter value. May be null.
Throws:
IllegalArgumentException - if the parameter name does not exist in the report's parameter list.

setDataContext

public void setDataContext(String newDataContext)
Sets the data context that the report is to work with.

Parameters:
newDataContext - the new data context

setReportCode

public void setReportCode(String newReportcode)
This is the unique identifier for the report. Not necessarily the

Parameters:
newReportcode - the report definition code

getTitle

public String getTitle()
Retrieve the title of the report

Returns:
java.lang.String

getReportMimeType

public String getReportMimeType()
The report engine driver is most likely going to need to know what kind of MimeType to expect the report.

Returns:
java.lang.String Most likely the report should look up the file type on the MimeTypes table.
See Also:
MimeTypes

getReportFileExtension

public String getReportFileExtension()
Retrieve the recommended file extension for the report. Return the value without the '.'. So an example file extension for an Excel report would be "xls", and XML formatted report would be "xml" [although if you're using special XML languages, of course you have the freedom to specify the extension]

Returns:
java.lang.String in the format specified above.

Expresso 5-6

Please see www.jcorporate.com for information about new Expresso releases.