Package com.inet.report
Interface PropertiesChecker
public interface PropertiesChecker
This is the PropertiesChecker interface. Any client that wants to
examine the engine's properties must implement this interface.
- You can register this in a plugin with: spm.register( PropertiesChecker.class, new MyPropertiesChecker() );
- Setup your class name in the configuration manager GUI.
- Setup it at runtime with: ConfigurationManager.getInstance().getCurrent().put( "PropertyChecker", "com.foo.MyPropertiesChecker" );
-
Method Summary
Modifier and TypeMethodDescriptionvoid
checkProperties
(Engine engine, Properties props, Object req) This callback is called right after the engine has examined the report file.void
checkProperties
(Properties props, Object req) This callback is called right before the engine examines the report file.
-
Method Details
-
checkProperties
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 server.
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 javax.servlet.http.HttpServletRequest or null if not in a server.- 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.- Since:
- 6.0
- See Also:
-
checkProperties
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 javax.servlet.http.HttpServletRequest or null if not in a server.- 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.- Since:
- 6.0
- See Also:
-