jaugment2.mail
Class MailFilterParser

java.lang.Object
  |
  +--jaugment2.mail.MailFilterParser

public class MailFilterParser
extends java.lang.Object

helper-class containing all the mail-filter-code


Inner Class Summary
private static interface MailFilterParser.FilterAction
           
private  class MailFilterParser.FilterAction_debug
           
private  class MailFilterParser.FilterAction_movetofolder
           
private  class MailFilterParser.FilterRule
           
private static interface MailFilterParser.FilterSelector
           
private  class MailFilterParser.FilterSelector_Substring
           
 
Field Summary
private static MailFilterParser.FilterAction[] all_actions
           
private static java.lang.String configexample
           
private static boolean debug
           
private  java.util.LinkedList filterRules
           
private static MailFilterParser.FilterSelector[] selectors
           
protected  JavaMailService service
           
 
Constructor Summary
MailFilterParser(JavaMailService s)
           
 
Method Summary
 boolean filterMessage(javax.mail.Message msg, MailSender.MessageHandle hmsg)
          pass a message through the filter-rules and return true if the message is still in that folder and false if it is deleted/ moved.
 javax.mail.Message[] filterMessages(javax.mail.Message[] msgs, MailSender.FolderHandle hfolder, int start)
          filter all messages and return the ones that are still in their folder.
 void init()
           
private  void parseRule(int rulenr, java.lang.Object ruleo)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

filterRules

private java.util.LinkedList filterRules

debug

private static final boolean debug

selectors

private static MailFilterParser.FilterSelector[] selectors

all_actions

private static MailFilterParser.FilterAction[] all_actions

configexample

private static java.lang.String configexample

service

protected JavaMailService service
Constructor Detail

MailFilterParser

public MailFilterParser(JavaMailService s)
Method Detail

init

public void init()

parseRule

private void parseRule(int rulenr,
                       java.lang.Object ruleo)

filterMessages

public javax.mail.Message[] filterMessages(javax.mail.Message[] msgs,
                                           MailSender.FolderHandle hfolder,
                                           int start)
filter all messages and return the ones that are still in their folder. (moved and deleted ones are not filtered)
Parameters:
start - the number of the first message (e.g. 0 if it is the first message in it's folder)

filterMessage

public boolean filterMessage(javax.mail.Message msg,
                             MailSender.MessageHandle hmsg)
pass a message through the filter-rules and return true if the message is still in that folder and false if it is deleted/ moved.