Folder source = getFolder(folder, Folder.READ_WRITE);
for (Rule rule : rules) {
if ("move".equals(rule.getType())) {
if (rule.getMatchingText() != null) {
SearchTerm st = new FromStringTerm(rule.getMatchingText());
Message[] msgs = source.search(st);
if (msgs != null && msgs.length > 0) {
moveMessages(msgs, source, getFolder(rule.getDestFolder(), Folder.READ_WRITE));
}
} else if (rule.getOlderThan() > 0) {
}
} else if ("delete".equals(rule.getType())) {
if (rule.getMatchingText() != null) {
SearchTerm st = new FromStringTerm(rule.getMatchingText());
Message[] msgs = source.search(st);
if (msgs != null && msgs.length > 0) {
moveMessages(msgs, source, getFolder(rule.getDestFolder(), Folder.READ_WRITE));
}
} else if (rule.getOlderThan() > 0) {