Class CreateEmail

  • All Implemented Interfaces:
    AdditionalInformationHandler, CleanUpHandler, Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, QuickInfoSupporter, ShallowCopySupporter<Actor>, SizeOfHandler, Stoppable, StoppableWithFeedback, VariablesInspectionHandler, VariableChangeListener, Actor, ErrorHandler, InputConsumer, OutputProducer, Serializable, Comparable

    public class CreateEmail
    extends AbstractTransformer
    Actor for creating emails to be sent. The (optional) attachments are taken from the input.
    Variables in 'subject', 'body' and 'signature' are automatically replaced whenever the actor is executed.


    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -name <java.lang.String> (property: name)
        The name of the actor.
        default: CreateEmail
     
    -annotation <adams.core.base.BaseAnnotation> (property: annotations)
        The annotations to attach to this actor.
        default:
     
    -skip <boolean> (property: skip)
        If set to true, transformation is skipped and the input token is just forwarded
        as it is.
        default: false
     
    -stop-flow-on-error <boolean> (property: stopFlowOnError)
        If set to true, the flow execution at this level gets stopped in case this
        actor encounters an error; the error gets propagated; useful for critical
        actors.
        default: false
     
    -silent <boolean> (property: silent)
        If enabled, then no errors are output in the console; Note: the enclosing
        actor handler must have this enabled as well.
        default: false
     
    -sender <adams.core.net.EmailAddress> (property: sender)
        The sender address to use.
     
    -recipient <adams.core.net.EmailAddress> [-recipient ...] (property: recipients)
        The recipients to send the email to.
        default:
     
    -cc <adams.core.net.EmailAddress> [-cc ...] (property: CC)
        The CC recipients to send the email to.
        default:
     
    -bcc <adams.core.net.EmailAddress> [-bcc ...] (property: BCC)
        The BCC recipients to send the email to.
        default:
     
    -subject <java.lang.String> (property: subject)
        The subject of the email, can contain variables.
        default:
     
    -body <adams.core.base.BaseText> (property: body)
        The body of the email, can contain variables.
        default:
     
    -signature <adams.core.base.BaseText> (property: signature)
        The signature of the email, gets separated by an extra line consisting of
        '--', can contain variables.
        default:
     
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_Recipients

        protected EmailAddress[] m_Recipients
        the recipients.
      • m_BCC

        protected EmailAddress[] m_BCC
        the recipients (BCC).
      • m_Subject

        protected String m_Subject
        the subject.
      • m_Body

        protected BaseText m_Body
        the body.
      • m_Signature

        protected BaseText m_Signature
        the signature.
    • Constructor Detail

      • CreateEmail

        public CreateEmail()
    • Method Detail

      • setSender

        public void setSender​(EmailAddress value)
        Sets the sender.
        Parameters:
        value - the sender
      • getSender

        public EmailAddress getSender()
        Returns the sender.
        Returns:
        the sender
      • 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 recipients.
        Parameters:
        value - the recipients
      • getRecipients

        public EmailAddress[] getRecipients()
        Returns the recipients.
        Returns:
        the recipients
      • 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.
      • setCC

        public void setCC​(EmailAddress[] value)
        Sets the CC recipients.
        Parameters:
        value - the recipients
      • getCC

        public EmailAddress[] getCC()
        Returns the CC recipients.
        Returns:
        the recipients
      • CCTipText

        public String CCTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setBCC

        public void setBCC​(EmailAddress[] value)
        Sets the BCC recipients.
        Parameters:
        value - the recipients
      • getBCC

        public EmailAddress[] getBCC()
        Returns the BCC recipients.
        Returns:
        the recipients
      • BCCTipText

        public String BCCTipText()
        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.
        Parameters:
        value - the subject
      • getSubject

        public String getSubject()
        Returns the subject.
        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.
      • setSignature

        public void setSignature​(BaseText value)
        Sets the body of the email.
        Parameters:
        value - the body
      • getSignature

        public BaseText getSignature()
        Returns the body of the email.
        Returns:
        the body
      • signatureTipText

        public String signatureTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • accepts

        public Class[] accepts()
        Returns the class that the consumer accepts.
        Returns:
        java.lang.String.class, java.lang.String[].class, java.io.File.class, java.io.File[].class
      • generates

        public Class[] generates()
        Returns the class of objects that it generates.
        Returns:
        adams.core.net.Email.class
      • doExecute

        protected String doExecute()
        Executes the flow item.
        Specified by:
        doExecute in class AbstractActor
        Returns:
        null if everything is fine, otherwise error message