adams.data.io.output
Class AbstractEmailWriter

java.lang.Object
  extended by adams.core.ConsoleObject
      extended by adams.core.option.AbstractOptionHandler
          extended by adams.data.io.output.AbstractEmailWriter
All Implemented Interfaces:
Debuggable, Destroyable, OptionHandler, SizeOfHandler, EmailWriter, Serializable
Direct Known Subclasses:
AbstractEmailFileWriter

public abstract class AbstractEmailWriter
extends AbstractOptionHandler
implements EmailWriter

Ancestor for classes that write emails.

Version:
$Revision: 7123 $
Author:
fracpete (fracpete at waikato dot ac dot nz)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class adams.core.option.AbstractOptionHandler
m_DebugLevel, m_OptionManager
 
Constructor Summary
AbstractEmailWriter()
           
 
Method Summary
protected  String check(Email email)
          Hook method for performing checks before writing the emails.
protected abstract  String doWrite(Email email)
          Performs the actual writing.
 String write(Email email)
          Writes the email.
 
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, debug, debug, debugLevelTipText, defineOptions, destroy, finishInit, getDebugLevel, getOptionManager, globalInfo, initialize, isDebugOn, newOptionManager, reset, setDebugLevel, toCommandLine, toString
 
Methods inherited from class adams.core.ConsoleObject
getDebugging, getSystemErr, getSystemOut, sizeOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractEmailWriter

public AbstractEmailWriter()
Method Detail

check

protected String check(Email email)
Hook method for performing checks before writing the emails.

Default implementation checks only whether an email has been provided.

Returns:
the error message, null if everything OK

doWrite

protected abstract String doWrite(Email email)
Performs the actual writing.

Parameters:
email - the email to write
Returns:
the error message, null if everything OK

write

public String write(Email email)
Writes the email.

Specified by:
write in interface EmailWriter
Parameters:
email - the email to write
Returns:
the error message, null if everything OK


Copyright © 2013 University of Waikato, Hamilton, NZ. All Rights Reserved.