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" );
    An implementation of the PropertiesChecker should be in a plugin. The i-net Clear Reports SDK contains a sample plugin called PropertiesChecker.
    • 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 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(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 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(Properties prop, Object req)
      • checkHtmlPageProperties

        @Deprecated
        default void checkHtmlPageProperties​(java.util.Properties props)
                                      throws ReportException
        Deprecated.
        As of i-net Clear Reports 20.4
        This callback is called before the report server creates and sends back a HTML page with the Java 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.
        Since:
        6.0
        See Also:
        checkProperties(Engine engine, Properties prop, Object req), checkProperties(Properties prop, Object req)