Class EmailExport
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,SizeOfHandler
,Serializable
public class EmailExport extends AbstractMultiObjectExportWithPreferredExtensions
Sends the outputs via email.- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected BaseText
m_Body
the body.protected String
m_Prefix
the prefix for the files.protected EmailAddress[]
m_Recipients
the recipients.protected AbstractSendEmail
m_SendEmail
for sending the emails.protected EmailAddress
m_Sender
the sender.protected String
m_Subject
the subject.-
Fields inherited from class adams.gui.visualization.multiobjectexport.AbstractMultiObjectExportWithPreferredExtensions
m_PreferredExtensions
-
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 EmailExport()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
bodyTipText()
Returns the tip text for this property.void
defineOptions()
Adds options to the internal list of options.protected String
doExport(String[] names, Object[] objects)
Performs the actual export of the objects using the given names.BaseText
getBody()
Returns the body of the email.String
getPrefix()
Returns the optional prefix for the file names.EmailAddress[]
getRecipients()
Returns the email addresses to send the output to.AbstractSendEmail
getSendEmail()
Returns the object for sending emails.EmailAddress
getSender()
Returns the email address of the sender.String
getSubject()
Returns the subject for the email.String
globalInfo()
Returns a string describing the object.String
prefixTipText()
Returns the tip text for this property.String
recipientsTipText()
Returns the tip text for this property.String
sendEmailTipText()
Returns the tip text for this property.String
senderTipText()
Returns the tip text for this property.void
setBody(BaseText value)
Sets the body of the email.void
setPrefix(String value)
Sets the optional prefix for the file names.void
setRecipients(EmailAddress[] value)
Sets the email addresses to send the output to.void
setSendEmail(AbstractSendEmail value)
Sets the object for sending emails.void
setSender(EmailAddress value)
Sets the email address of the sender.void
setSubject(String value)
Sets the subject for the email.String
subjectTipText()
Returns the tip text for this property.-
Methods inherited from class adams.gui.visualization.multiobjectexport.AbstractMultiObjectExportWithPreferredExtensions
determineExporters, determineExtension, getDefaultPreferredExtensions, getPreferredExtensions, preferredExtensionsTipText, setPreferredExtensions
-
Methods inherited from class adams.gui.visualization.multiobjectexport.AbstractMultiObjectExport
check, disambiguateNames, export, pruneExporters
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
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.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
m_Prefix
protected String m_Prefix
the prefix for the files.
-
m_Sender
protected EmailAddress m_Sender
the sender.
-
m_Recipients
protected EmailAddress[] m_Recipients
the recipients.
-
m_Subject
protected String m_Subject
the subject.
-
m_Body
protected BaseText m_Body
the body.
-
m_SendEmail
protected AbstractSendEmail m_SendEmail
for sending the emails.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractMultiObjectExportWithPreferredExtensions
-
setPrefix
public void setPrefix(String value)
Sets the optional prefix for the file names.- Parameters:
value
- the prefix
-
getPrefix
public String getPrefix()
Returns the optional prefix for the file names.- Returns:
- the prefix
-
prefixTipText
public String prefixTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setSender
public void setSender(EmailAddress value)
Sets the email address of the sender.- Parameters:
value
- the address
-
getSender
public EmailAddress getSender()
Returns the email address of the sender.- Returns:
- the address
-
senderTipText
public String senderTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setRecipients
public void setRecipients(EmailAddress[] value)
Sets the email addresses to send the output to.- Parameters:
value
- the addresses
-
getRecipients
public EmailAddress[] getRecipients()
Returns the email addresses to send the output to.- Returns:
- the addresses
-
recipientsTipText
public String recipientsTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setSubject
public void setSubject(String value)
Sets the subject for the email.- Parameters:
value
- the subject
-
getSubject
public String getSubject()
Returns the subject for the email.- Returns:
- the subject
-
subjectTipText
public String subjectTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setBody
public void setBody(BaseText value)
Sets the body of the email.- Parameters:
value
- the body
-
getBody
public BaseText getBody()
Returns the body of the email.- Returns:
- the body
-
bodyTipText
public String bodyTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setSendEmail
public void setSendEmail(AbstractSendEmail value)
Sets the object for sending emails.- Parameters:
value
- the object
-
getSendEmail
public AbstractSendEmail getSendEmail()
Returns the object for sending emails.- Returns:
- the object
-
sendEmailTipText
public String sendEmailTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
doExport
protected String doExport(String[] names, Object[] objects)
Performs the actual export of the objects using the given names.- Specified by:
doExport
in classAbstractMultiObjectExport
- Parameters:
names
- the names for the objectsobjects
- the objects- Returns:
- null if successful, otherwise error message
-
-