i-net Clear Reports

com.inet.report
Interface PropertiesChecker

All Known Implementing Classes:
Listener, ReportServlet, ReportServletJSP

public interface PropertiesChecker

This is the PropertiesChecker interface. Any client that wants to examine or change HTML page properties or the engine's properties must implement this interface. Since version 6.1, it is possible to create a class (must be called PropertyChecker) which implements this interface and place it in a jar file in the i-net Clear Reports directory. If this class is found, it will be used as the default property checker at run-time. This enables users who use only the Listener to still be able to add and handle custom properties, for example.


Method Summary
 void checkHtmlPageProperties(java.util.Properties props)
          This callback is called before the report server creates and sends back a HTML page with the viewer embedded.
 void checkProperties(java.util.Properties props, java.lang.Object req)
          This callback is called right before the engine examines the report file.
 void checkProperties(Engine engine, java.util.Properties props, java.lang.Object req)
          This callback is called right after the engine has examined the report file.
 

Method Detail

checkProperties

void checkProperties(java.util.Properties props,
                     java.lang.Object req)
                     throws ReportException
This callback is called right before the engine examines the report file. The properties object contains the values that the viewer has passed to the report servlet.
If you override this method, you can change or examine the user properties.
Example
if(...) props.put("report", "file:///c:/my-report.rpt");
Please note: The property "report" is initialized with the full qualified report name if the report has been found on the disc (via file:// or file:///context/) or via http://. If not, then the property will contain the original value.

Parameters:
props - The user properties. All keys are lowercase.
req - The HTTP servlet request, either null or HttpServlet
Throws:
ReportException - If an error occurred during checking the supplied properties with the current PropertiesChecker. The ReportException will be send to the client and displayed in the Java viewer.
See Also:
checkProperties(Engine engine, Properties prop, Object req)

checkProperties

void checkProperties(Engine engine,
                     java.util.Properties props,
                     java.lang.Object req)
                     throws ReportException
This callback is called right after the engine has examined the report file. The properties object still contains only the user properties, but you can use the engine API to examine and change the properties red from the report file.
If you override this method, you can change or examine the properties from the report file.

Example:
engine.setSchema(...);
engine.setProperty(...);

Parameters:
engine - The initialized engine that have parsed the rpt file already.
props - The user properties. All keys are lowercase.
req - The HTTP servlet request, either null or HttpServlet
Throws:
ReportException - If an error occurred during checking the supplied properties with the current PropertiesChecker. The ReportException will be send to the client and displayed in the Java viewer.
See Also:


checkHtmlPageProperties

void checkHtmlPageProperties(java.util.Properties props)
                             throws ReportException
This callback is called before the report server creates and sends back a HTML page with the viewer embedded. The properties object contains the default properties for the HTML page.
If you override this method, you can change or examine the default HTML page properties.

Parameters:
props - The properties of the html page. Any change to this properties object itself has absolutely no effect. All keys are lowercase. See Example MyReportServlet_withMyHTMLProperties.java.
Throws:
ReportException - If an error occurred during checking the supplied properties with the current PropertiesChecker.
See Also:
checkProperties(Engine engine, Properties prop, Object req), checkProperties(Properties prop, Object req)

i-net Clear Reports

Copyright © 1999-2015 by i-net software GmbH