Class EmailFilter


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

      • EmailFilter

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

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

      • isEnabled

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

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

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

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

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

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

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

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

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

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

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

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

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

        public void setBody​(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