Jacson

de.spieleck.app.jacson.report
Class MultiReport

java.lang.Object
  extended byde.spieleck.app.jacson.report.MultiReport
All Implemented Interfaces:
JacsonPrintReport, JacsonReport, JacsonStately
Direct Known Subclasses:
CascadableReport

public class MultiReport
extends java.lang.Object
implements JacsonPrintReport

An report which dispatches a message to all contained (possible multiple) reports.
This class might not be directly usable in applications, but is an important helper class anyway.

Author:
fsn, Patrick Carl

Field Summary
protected  java.util.List reports
           
 
Constructor Summary
MultiReport()
           
 
Method Summary
 void addReport(JacsonReport report)
          Add another (completely initialized) report to the list
 void begin(java.lang.String id)
          Begin a subsection within report
 void clear()
           
 int countReports()
          Count the registered Reports
 void end()
          Close a subsection within a report
 void finish()
          Finish and close underlying resources
 void finish(boolean close)
          Finish and optionally close the underlying resources
 JacsonState getRegState()
          returns the set JacsonState
 void init(ConfigNode config)
          Initialize the report.
 void registerState(JacsonState state)
          Give the class access to an appropriate state.
 void report(java.lang.String localName, java.lang.String value)
          Report a single name value pair within a report
 void setOutputStream(java.io.OutputStream os)
          Or consume an OutputStream directly
 void setPrintWriter(java.io.PrintWriter pw)
          XXX Sometimes (most of the time) mangling different reports into one file makes no sense and might cause unpredictable behaviour.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

reports

protected java.util.List reports
Constructor Detail

MultiReport

public MultiReport()
Method Detail

clear

public void clear()

addReport

public void addReport(JacsonReport report)
Add another (completely initialized) report to the list


countReports

public int countReports()
Count the registered Reports


init

public void init(ConfigNode config)
          throws JacsonConfigException
Description copied from interface: JacsonReport
Initialize the report. The passed ConfigNode can be used to obtain configuration information of the report from the global config xml.

Specified by:
init in interface JacsonReport
Throws:
JacsonConfigException

registerState

public void registerState(JacsonState state)
Description copied from interface: JacsonStately
Give the class access to an appropriate state.

Specified by:
registerState in interface JacsonStately

getRegState

public JacsonState getRegState()
Description copied from interface: JacsonReport
returns the set JacsonState

Specified by:
getRegState in interface JacsonReport

finish

public void finish(boolean close)
Description copied from interface: JacsonReport
Finish and optionally close the underlying resources

Specified by:
finish in interface JacsonReport
Parameters:
close - flag whether to close resources or not.

finish

public void finish()
Description copied from interface: JacsonReport
Finish and close underlying resources

Specified by:
finish in interface JacsonReport

begin

public void begin(java.lang.String id)
Description copied from interface: JacsonReport
Begin a subsection within report

Specified by:
begin in interface JacsonReport

report

public void report(java.lang.String localName,
                   java.lang.String value)
Description copied from interface: JacsonReport
Report a single name value pair within a report

Specified by:
report in interface JacsonReport

end

public void end()
Description copied from interface: JacsonReport
Close a subsection within a report

Specified by:
end in interface JacsonReport

setPrintWriter

public void setPrintWriter(java.io.PrintWriter pw)
                    throws JacsonConfigException
XXX Sometimes (most of the time) mangling different reports into one file makes no sense and might cause unpredictable behaviour.

Specified by:
setPrintWriter in interface JacsonPrintReport
Throws:
JacsonConfigException

setOutputStream

public void setOutputStream(java.io.OutputStream os)
                     throws JacsonConfigException
Description copied from interface: JacsonPrintReport
Or consume an OutputStream directly

Specified by:
setOutputStream in interface JacsonPrintReport
Throws:
JacsonConfigException

Spieleck

Copyleft 2002 spieleck.de.