org.enableit.db.darrt
Class PlainFormatter

java.lang.Object
  |
  +--org.enableit.db.darrt.PlainFormatter
All Implemented Interfaces:
DarrtListener, DiffFormatter, ReportListener

public class PlainFormatter
extends java.lang.Object
implements DiffFormatter, ReportListener

Author:
default

Field Summary
protected static org.apache.log4j.Logger logger
          The Log4J Logger doing the logging.
 
Fields inherited from interface org.enableit.db.darrt.ReportListener
ABOUT
 
Constructor Summary
PlainFormatter()
          Default constructor.
PlainFormatter(org.enableit.db.beans.Provider provider)
          Constructor that also sets database provider.
 
Method Summary
 java.lang.String format(org.enableit.db.darrt.beans.DiffData diff)
          Format a difference for another class to control the writing of.
 org.enableit.db.beans.Provider getProvider()
           
 void handle(org.enableit.db.darrt.DarrtEvent event)
           
 void setProvider(org.enableit.db.beans.Provider provider)
           
 void setWriter(java.io.Writer out)
          Set the writer for the report.
 void writeDiffs(java.util.List diffsList, java.io.Writer writer)
          Formats the differences and writes them to the writer provided.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static org.apache.log4j.Logger logger
The Log4J Logger doing the logging.

Constructor Detail

PlainFormatter

public PlainFormatter()
Default constructor.

Required for dynamic instantiation, but provider MUST be set before the formatter meay be used.


PlainFormatter

public PlainFormatter(org.enableit.db.beans.Provider provider)
Constructor that also sets database provider.

Method Detail

handle

public void handle(org.enableit.db.darrt.DarrtEvent event)
Specified by:
handle in interface DarrtListener
Parameters:
event -

setWriter

public void setWriter(java.io.Writer out)
Set the writer for the report.

Specified by:
setWriter in interface ReportListener

writeDiffs

public void writeDiffs(java.util.List diffsList,
                       java.io.Writer writer)
Formats the differences and writes them to the writer provided.

Specified by:
writeDiffs in interface DiffFormatter
Parameters:
diffsList -
writer -

format

public java.lang.String format(org.enableit.db.darrt.beans.DiffData diff)
                        throws ConfigurationException
Format a difference for another class to control the writing of.

Specified by:
format in interface DiffFormatter
Parameters:
diff - bean containing the differences.
ConfigurationException

getProvider

public org.enableit.db.beans.Provider getProvider()
Returns:
The provider for which to generate DDL from reported differences.

setProvider

public void setProvider(org.enableit.db.beans.Provider provider)
Specified by:
setProvider in interface ReportListener
Parameters:
provider - The provider for which to generate DDL from reported differences.


Copyright © 1999-2004 enableIT.org. All Rights Reserved.