Package adams.data.io.output
Class PropertiesEmailFileWriter
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.io.output.AbstractEmailWriter<T>
-
- adams.data.io.output.AbstractEmailFileWriter<Email>
-
- adams.data.io.output.PropertiesEmailFileWriter
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,FileFormatHandler,LoggingLevelHandler,LoggingSupporter,OptionHandler,SizeOfHandler,EmailFileWriter<Email>,EmailWriter<Email>,Serializable
public class PropertiesEmailFileWriter extends AbstractEmailFileWriter<Email>
Writes emails to properties files.
Valid options are:
-D <int> (property: debugLevel) The greater the number the more additional info the scheme may output to the console (0 = off). default: 0 minimum: 0
-output <adams.core.io.PlaceholderFile> (property: output) The file to write the email to. default: ${CWD}- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class adams.data.io.output.AbstractEmailFileWriter
m_Output
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description PropertiesEmailFileWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Classaccepts()Returns the type of email that is written.protected StringdoWrite(Email email)Performs the actual writing.StringgetFormatDescription()Returns the description of the file format.String[]getFormatExtensions()Returns the extension(s) of the file format (without dot).StringglobalInfo()Returns a string describing the object.protected StringtoBlankSeparated(Object[] obj)Turns the object array into a blank-separated string.-
Methods inherited from class adams.data.io.output.AbstractEmailFileWriter
defineOptions, getDefaultFormatExtension, getOutput, outputTipText, setOutput
-
Methods inherited from class adams.data.io.output.AbstractEmailWriter
check, write
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, toCommandLine, toString
-
Methods inherited from class adams.core.logging.CustomLoggingLevelObject
setLoggingLevel
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.data.io.output.EmailWriter
write
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceGlobalInfoSupporter- Specified by:
globalInfoin classAbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
getFormatDescription
public String getFormatDescription()
Returns the description of the file format.- Returns:
- the description
-
getFormatExtensions
public String[] getFormatExtensions()
Returns the extension(s) of the file format (without dot).- Returns:
- the extensions (no dot!)
-
accepts
public Class accepts()
Returns the type of email that is written.- Returns:
- the type of email
-
toBlankSeparated
protected String toBlankSeparated(Object[] obj)
Turns the object array into a blank-separated string.- Parameters:
obj- the objects to turn into string- Returns:
- the generated string
-
doWrite
protected String doWrite(Email email)
Performs the actual writing.- Specified by:
doWritein classAbstractEmailWriter<Email>- Parameters:
email- the email to write- Returns:
- the error message, null if everything OK
-
-