1 16 package org.apache.cocoon.mail.command; 17 18 import java.util.ArrayList ; 19 import java.util.Iterator ; 20 import java.util.List ; 21 import javax.mail.MessagingException ; 22 import org.apache.avalon.framework.logger.AbstractLogEnabled; 23 24 31 public abstract class AbstractMailCommand extends AbstractLogEnabled 32 implements MailCommand { 33 34 37 private List result; 38 39 40 43 public AbstractMailCommand() { 44 result = new ArrayList (); 45 } 46 47 48 53 public List getResults() { 54 return result; 55 } 56 57 58 63 public void addResult(Object o) { 64 result.add(o); 65 } 66 67 68 73 public void addResults(List list) { 74 result.addAll(list); 75 } 76 77 78 83 public Iterator iterator() { 84 return result.iterator(); 85 } 86 87 88 93 public abstract void execute() throws MessagingException ; 94 } 95 96 97 | Popular Tags |