com.partnersoft.v3x.util
Class ReportLib

java.lang.Object
  extended by com.partnersoft.v3x.util.ReportLib

public class ReportLib
extends java.lang.Object

An excessively lazy set of library functions for generating reports.


Constructor Summary
ReportLib()
           
 
Method Summary
static void launchWebBrowser(java.io.File filet)
          Launches a web browser to view a local file.
static void launchWebBrowser(java.lang.String url)
          This launches a webbrowser on the given URL.
static void spewReport(java.lang.String reportConfigPath, java.io.File destination, java.lang.Object source)
          OK.
static void spewReport(java.lang.String reportConfigPath, java.lang.String destinationPath, java.lang.Object source)
          This simply creates the File object for you, and calls spewReport(String, File, Object).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReportLib

public ReportLib()
Method Detail

spewReport

public static void spewReport(java.lang.String reportConfigPath,
                              java.io.File destination,
                              java.lang.Object source)
                       throws java.io.IOException
OK. This takes an object path, a File and an object. The object path is the path in the default current-directory StructuredStore (i.e., if the file is in directory "config/bonk/Foo.tof", pass the path "/config/bonk/Foo"). The method tries to load a TextReportEngine from the structured store, and generates a report to the given file using the object as datasource.

Best of all is this: if an exception occurs, the method attempts to write a stack trace to the file (presumably you'll be looking at it and see this). Only if all else fails will it throw an IOException.

Throws:
java.io.IOException

spewReport

public static void spewReport(java.lang.String reportConfigPath,
                              java.lang.String destinationPath,
                              java.lang.Object source)
                       throws java.io.IOException
This simply creates the File object for you, and calls spewReport(String, File, Object). Only for the truly, unrepentantly lazy.

Throws:
java.io.IOException

launchWebBrowser

public static void launchWebBrowser(java.lang.String url)
This launches a webbrowser on the given URL. Config for this is in config/WebBrowser.tof.


launchWebBrowser

public static void launchWebBrowser(java.io.File filet)
Launches a web browser to view a local file.