/**
* Runs the configured spam action on this message.
*/
public void runSpamAction() {
FilterAction spamFilter = null;
try {
spamFilter = MessageFilter.generateFilterAction("Pooka.spamAction");
} catch (Exception e) {
int configureNow = Pooka.getUIFactory().showConfirmDialog("Spam action currently not configured. Would you like to configure it now?", "Configure Spam action", javax.swing.JOptionPane.YES_NO_OPTION);
if (configureNow == javax.swing.JOptionPane.YES_OPTION) {
// show configure screen.
Pooka.getUIFactory().showEditorWindow(Pooka.getProperty("Preferences.Spam.label", "Spam"), "Pooka.spamAction");
}
}
if (spamFilter != null) {
List l = new LinkedList();
for (int i = 0; i < messages.length; i++) {
l.add(messages[i].getMessageProxy());
}
java.util.List removed = spamFilter.performFilter(l);
if (removed != null && removed.size() > 0) {
try {
getFolderInfo().expunge();
} catch (OperationCancelledException oce) {
} catch (MessagingException me) {