Class EmailFilter


  • public class EmailFilter
    extends java.lang.Object
    Configuration for the various filters to change the behavior of the forwarder.
    Author:
    Alejandro Galue
    • Constructor Summary

      Constructors 
      Constructor Description
      EmailFilter()
      Instantiates a new Email filter.
      EmailFilter​(java.lang.String name, java.lang.String rule)
      Instantiates a new Email filter.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean accepts​(NorthboundAlarm alarm)
      Checks if the alarm is accepted by the filter.
      java.lang.String getBody()
      Gets the template of the email message field: body.
      java.lang.String getFrom()
      Gets the email message field: from.
      java.lang.String getName()
      Gets the filter name.
      java.lang.String getRule()
      Gets the filter rule.
      java.lang.String getSubject()
      Gets the template of the email message field: subject.
      java.lang.String getTo()
      Gets the email message field: to.
      java.lang.Boolean isEnabled()
      Checks if the rule is enabled.
      void setBody​(java.lang.String body)
      Sets the body.
      void setEnabled​(java.lang.Boolean enabled)
      Sets the enabled flag.
      void setFrom​(java.lang.String from)
      Sets the from.
      void setName​(java.lang.String name)
      Sets the filter name.
      void setRule​(java.lang.String rule)
      Sets the filter rule.
      void setSubject​(java.lang.String subject)
      Sets the subject.
      void setTo​(java.lang.String to)
      Sets the to.
      void update​(SendmailMessage message)
      Updates the sendmail message object
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EmailFilter

        public EmailFilter()
        Instantiates a new Email filter.
      • EmailFilter

        public EmailFilter​(java.lang.String name,
                           java.lang.String rule)
        Instantiates a new Email filter.
        Parameters:
        name - the name
        rule - the rule
    • Method Detail

      • isEnabled

        public java.lang.Boolean isEnabled()
        Checks if the rule is enabled.
        Returns:
        true, if is enabled
      • getName

        public java.lang.String getName()
        Gets the filter name.
        Returns:
        the filter name
      • getRule

        public java.lang.String getRule()
        Gets the filter rule.
        Returns:
        the filter rule
      • getFrom

        public java.lang.String getFrom()
        Gets the email message field: from.
        Returns:
        the from field
      • getTo

        public java.lang.String getTo()
        Gets the email message field: to.
        Returns:
        the to field
      • getSubject

        public java.lang.String getSubject()
        Gets the template of the email message field: subject.
        Returns:
        the subject field template
      • getBody

        public java.lang.String getBody()
        Gets the template of the email message field: body.
        Returns:
        the body field template
      • setEnabled

        public void setEnabled​(java.lang.Boolean enabled)
        Sets the enabled flag.
        Parameters:
        enabled - the new enabled
      • setName

        public void setName​(java.lang.String name)
        Sets the filter name.
        Parameters:
        name - the new name
      • setRule

        public void setRule​(java.lang.String rule)
        Sets the filter rule.
        Parameters:
        rule - the rule
      • setFrom

        public void setFrom​(java.lang.String from)
        Sets the from.
        Parameters:
        from - the new from
      • setTo

        public void setTo​(java.lang.String to)
        Sets the to.
        Parameters:
        to - the new to
      • setSubject

        public void setSubject​(java.lang.String subject)
        Sets the subject.
        Parameters:
        subject - the new subject
      • setBody

        public void setBody​(java.lang.String body)
        Sets the body.
        Parameters:
        body - the new body
      • accepts

        public boolean accepts​(NorthboundAlarm alarm)
        Checks if the alarm is accepted by the filter.
        Parameters:
        alarm - the northbound alarm
        Returns:
        true, if successful
      • update

        public void update​(SendmailMessage message)
        Updates the sendmail message object
        Parameters:
        message - the message object