You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by no...@apache.org on 2006/09/22 14:28:39 UTC

svn commit: r448903 - in /james/server/trunk/src/java/org/apache: james/ james/management/ james/services/ mailet/

Author: norman
Date: Fri Sep 22 05:28:38 2006
New Revision: 448903

URL: http://svn.apache.org/viewvc?view=rev&rev=448903
Log:
Fix/Add javadocs. See JAMES-628
Remove some unused imports and code

Modified:
    james/server/trunk/src/java/org/apache/james/James.java
    james/server/trunk/src/java/org/apache/james/management/BayesianAnalyzerManagement.java
    james/server/trunk/src/java/org/apache/james/management/BayesianAnalyzerManagementException.java
    james/server/trunk/src/java/org/apache/james/management/ManagementException.java
    james/server/trunk/src/java/org/apache/james/management/SpoolFilter.java
    james/server/trunk/src/java/org/apache/james/management/SpoolManagement.java
    james/server/trunk/src/java/org/apache/james/services/SpoolManagementService.java
    james/server/trunk/src/java/org/apache/mailet/MailetContext.java

Modified: james/server/trunk/src/java/org/apache/james/James.java
URL: http://svn.apache.org/viewvc/james/server/trunk/src/java/org/apache/james/James.java?view=diff&rev=448903&r1=448902&r2=448903
==============================================================================
--- james/server/trunk/src/java/org/apache/james/James.java (original)
+++ james/server/trunk/src/java/org/apache/james/James.java Fri Sep 22 05:28:38 2006
@@ -410,14 +410,29 @@
         localDeliveryMailet.init(configImpl);
     }
 
+    /**
+     * Set Store to use
+     * 
+     * @param store the Store to use
+     */
     public void setStore(Store store) {
         this.store = store;
     }
 
+    /**
+     * Set the SpoolRepository to use
+     * 
+     * @param spool the SpoleRepository to use
+     */
     public void setSpool(SpoolRepository spool) {
         this.spool = spool;
     }
 
+    /**
+     * Set the UsersRepository to use
+     * 
+     * @param localusers the UserRepository to use
+     */
     public void setLocalusers(UsersRepository localusers) {
         this.localusers = localusers;
     }
@@ -447,14 +462,7 @@
     }
 
     /**
-     * Place a mail on the spool for processing
-     *
-     * @param sender the sender of the mail
-     * @param recipients the recipients of the mail
-     * @param message the message to send
-     *
-     * @throws MessagingException if an exception is caught while placing the mail
-     *                            on the spool
+     * @see org.apache.james.services.MailServer#sendMail(MailAddress, Collection, MimeMessage)
      */
     public void sendMail(MailAddress sender, Collection recipients, MimeMessage message)
             throws MessagingException {
@@ -462,15 +470,7 @@
     }
 
     /**
-     * Place a mail on the spool for processing
-     *
-     * @param sender the sender of the mail
-     * @param recipients the recipients of the mail
-     * @param message the message to send
-     * @param state the state of the message
-     *
-     * @throws MessagingException if an exception is caught while placing the mail
-     *                            on the spool
+     * @see org.apache.mailet.MailetContext#sendMail(MailAddress, Collection, MimeMessage, String)
      */
     public void sendMail(MailAddress sender, Collection recipients, MimeMessage message, String state)
             throws MessagingException {
@@ -484,14 +484,7 @@
     }
 
     /**
-     * Place a mail on the spool for processing
-     *
-     * @param sender the sender of the mail
-     * @param recipients the recipients of the mail
-     * @param msg an <code>InputStream</code> containing the message
-     *
-     * @throws MessagingException if an exception is caught while placing the mail
-     *                            on the spool
+     * @see org.apache.james.services.MailServer#sendMail(MailAddress, Collection, InputStream)
      */
     public void sendMail(MailAddress sender, Collection recipients, InputStream msg)
             throws MessagingException {
@@ -507,12 +500,7 @@
     }
 
     /**
-     * Place a mail on the spool for processing
-     *
-     * @param mail the mail to place on the spool
-     *
-     * @throws MessagingException if an exception is caught while placing the mail
-     *                            on the spool
+     * @see org.apache.james.services.MailServer#sendMail(Mail)
      */
     public void sendMail(Mail mail) throws MessagingException {
         try {
@@ -537,13 +525,7 @@
     }
 
     /**
-     * <p>Retrieve the mail repository for a user</p>
-     *
-     * <p>For POP3 server only - at the moment.</p>
-     *
-     * @param userName the name of the user whose inbox is to be retrieved
-     *
-     * @return the POP3 inbox for the user
+     * @see org.apache.james.services.MailServer#getUserInbox(java.lang.String)
      */
     public synchronized MailRepository getUserInbox(String userName) {
         MailRepository userInbox = null;
@@ -588,9 +570,7 @@
     }
 
     /**
-     * Return a new mail id.
-     *
-     * @return a new mail id
+     * @see org.apache.james.services.MailServer#getId()
      */
     public String getId() {
         long localCount = -1;
@@ -622,28 +602,36 @@
     //Methods for MailetContext
 
     /**
-     * <p>Get the prioritized list of mail servers for a given host.</p>
-     *
-     * <p>TODO: This needs to be made a more specific ordered subtype of Collection.</p>
-     *
-     * @param host
+     * @see org.apache.mailet.MailetContext#getMailServers(String)
      */
     public Collection getMailServers(String host) {
         return lookupDNSServer().findMXRecords(host);
     }
 
+    /**
+     * @see org.apache.mailet.MailetContext#getAttribute(java.lang.String)
+     */
     public Object getAttribute(String key) {
         return attributes.get(key);
     }
 
+    /**
+     * @see org.apache.mailet.MailetContext#setAttribute(java.lang.String, java.lang.Object)
+     */
     public void setAttribute(String key, Object object) {
         attributes.put(key, object);
     }
 
+    /**
+     * @see org.apache.mailet.MailetContext#removeAttribute(java.lang.String)
+     */
     public void removeAttribute(String key) {
         attributes.remove(key);
     }
 
+    /**
+     * @see org.apache.mailet.MailetContext#getAttributeNames()
+     */
     public Iterator getAttributeNames() {
         Vector names = new Vector();
         for (Enumeration e = attributes.keys(); e.hasMoreElements(); ) {
@@ -658,6 +646,8 @@
      * this is different than a mail-client's reply, which would use the
      * Reply-To or From header. This will send the bounce with the server's
      * postmaster as the sender.
+     * 
+     * @see org.apache.mailet.MailetContext#bounce(Mail, String)
      */
     public void bounce(Mail mail, String message) throws MessagingException {
         bounce(mail, message, getPostmaster());
@@ -685,6 +675,7 @@
      *           part (body) = message
      *     part (body) = original
      *
+     * @see org.apache.mailet.MailetContext#bounce(Mail, String, MailAddress) 
      */
 
     public void bounce(Mail mail, String message, MailAddress bouncer) throws MessagingException {
@@ -738,11 +729,7 @@
     }
 
     /**
-     * Returns whether that account has a local inbox on this server
-     *
-     * @param name the name to be checked
-     *
-     * @return whether the account has a local inbox
+     * @see org.apache.mailet.MailetContext#isLocalUser(String)
      */
     public boolean isLocalUser(String name) {
         if (name == null) {
@@ -775,38 +762,28 @@
     }
 
     /**
-     * Returns the address of the postmaster for this server.
-     *
-     * @return the <code>MailAddress</code> for the postmaster
+     * @see org.apache.mailet.MailetContext#getPostmaster()
      */
     public MailAddress getPostmaster() {
         return postmaster;
     }
 
     /**
-     * Return the major version number for the server
-     *
-     * @return the major vesion number for the server
+     * @see org.apache.mailet.MailetContext#getMajorVersion()
      */
     public int getMajorVersion() {
         return 2;
     }
 
     /**
-     * Return the minor version number for the server
-     *
-     * @return the minor vesion number for the server
+     * @see org.apache.mailet.MailetContext#getMinorVersion()
      */
     public int getMinorVersion() {
         return 4;
     }
 
     /**
-     * Check whether the mail domain in question is to be
-     * handled by this server.
-     *
-     * @param serverName the name of the server to check
-     * @return whether the server is local
+     * @see org.apache.james.services.MailServer#isLocalServer(java.lang.String)
      */
     public boolean isLocalServer( final String serverName ) {
         String lowercase = serverName.toLowerCase(Locale.US);
@@ -814,9 +791,7 @@
     }
 
     /**
-     * Return the type of the server
-     *
-     * @return the type of the server
+     * @see org.apache.mailet.MailetContext#getServerInfo()
      */
     public String getServerInfo() {
         return "Apache JAMES";
@@ -835,19 +810,14 @@
     }
 
     /**
-     * Log a message to the Mailet logger
-     *
-     * @param message the message to pass to the Mailet logger
+     * @see org.apache.mailet.MailetContext#log(java.lang.String)
      */
     public void log(String message) {
         getMailetLogger().info(message);
     }
 
     /**
-     * Log a message and a Throwable to the Mailet logger
-     *
-     * @param message the message to pass to the Mailet logger
-     * @param t the <code>Throwable</code> to be logged
+     * @see org.apache.mailet.MailetContext#log(java.lang.String, java.lang.Throwable)
      */
     public void log(String message, Throwable t) {
         getMailetLogger().info(message,t);

Modified: james/server/trunk/src/java/org/apache/james/management/BayesianAnalyzerManagement.java
URL: http://svn.apache.org/viewvc/james/server/trunk/src/java/org/apache/james/management/BayesianAnalyzerManagement.java?view=diff&rev=448903&r1=448902&r2=448903
==============================================================================
--- james/server/trunk/src/java/org/apache/james/management/BayesianAnalyzerManagement.java (original)
+++ james/server/trunk/src/java/org/apache/james/management/BayesianAnalyzerManagement.java Fri Sep 22 05:28:38 2006
@@ -33,7 +33,6 @@
 import java.io.InputStream;
 import java.sql.SQLException;
 import java.sql.Connection;
-import java.util.HashMap;
 import java.util.Map;
 
 import net.fortuna.mstor.data.MboxFile;
@@ -392,9 +391,17 @@
     private static class BayesianAnalyzerXml {
         private int hamMessageCount = 0;
         private int spamMessageCount = 0;
-        private Map hamTokenCounts = new HashMap();
-        private Map spamTokenCounts = new HashMap();
+        private Map hamTokenCounts;
+        private Map spamTokenCounts;
     
+        /**
+         * Default Constructer
+         * 
+         * @param hamMessageCount the count of trained ham messages
+         * @param spamMessageCount the count of trained spam messages
+         * @param hamTokenCounts the count and tokens of trained ham  
+         * @param spamTokenCounts the count and tokens of trained spam
+         */
         public BayesianAnalyzerXml(int hamMessageCount, int spamMessageCount, Map hamTokenCounts, Map spamTokenCounts) {
             this.hamMessageCount = hamMessageCount;
             this.spamMessageCount = spamMessageCount;
@@ -402,18 +409,38 @@
             this.spamTokenCounts = spamTokenCounts;
         }
     
+        /**
+         * Return the count of trained ham messages
+         * 
+         * @return hamMessageCount the count of trained ham messages 
+         */
         public int getHamMessageCount() {
             return hamMessageCount;
         }
     
+        /**
+         * Return the count of trained spam messages
+         * 
+         * @return spamMessageCount the count of trained spam messages
+         */
         public int getSpamMessageCount() {
             return spamMessageCount;
         }
     
+        /**
+         * Return a Map which contains the token as key and the count as value of trained ham messages
+         * 
+         * @return hamTokenCounts a Map which contains the tokens and counts
+         */
         public Map getHamTokenCounts() {
             return hamTokenCounts;
         }
     
+        /**
+         * Return a Map which contains the token as key and the count as value of trained spam messages
+         * 
+         * @return spamTokenCounts a Map which countains the tokens and counts
+         */
         public Map getSpamTokenCounts() {
             return spamTokenCounts;
         }

Modified: james/server/trunk/src/java/org/apache/james/management/BayesianAnalyzerManagementException.java
URL: http://svn.apache.org/viewvc/james/server/trunk/src/java/org/apache/james/management/BayesianAnalyzerManagementException.java?view=diff&rev=448903&r1=448902&r2=448903
==============================================================================
--- james/server/trunk/src/java/org/apache/james/management/BayesianAnalyzerManagementException.java (original)
+++ james/server/trunk/src/java/org/apache/james/management/BayesianAnalyzerManagementException.java Fri Sep 22 05:28:38 2006
@@ -22,20 +22,35 @@
 
 package org.apache.james.management;
 
+/**
+ * The Exception get thrown if an error accour in BayesianAnalyzerManagment
+ */
 public class BayesianAnalyzerManagementException extends ManagementException {
 
+    /**
+     * @see java.lang.Exception#Exception()
+     */
     public BayesianAnalyzerManagementException() {
         super();
     }
 
+    /**
+     * @see java.lang.Exception#Exception(String)
+     */
     public BayesianAnalyzerManagementException(String message) {
         super(message);
     }
 
+    /**
+     * @see java.lang.Exception#Exception(Throwable)
+     */
     public BayesianAnalyzerManagementException(Exception e) {
         super(e);
     }
 
+    /**
+     * @see java.lang.Exception#Exception(String, Throwable)
+     */
     public BayesianAnalyzerManagementException(String message, Exception e) {
         super(message, e);
     }

Modified: james/server/trunk/src/java/org/apache/james/management/ManagementException.java
URL: http://svn.apache.org/viewvc/james/server/trunk/src/java/org/apache/james/management/ManagementException.java?view=diff&rev=448903&r1=448902&r2=448903
==============================================================================
--- james/server/trunk/src/java/org/apache/james/management/ManagementException.java (original)
+++ james/server/trunk/src/java/org/apache/james/management/ManagementException.java Fri Sep 22 05:28:38 2006
@@ -24,18 +24,30 @@
 
 public class ManagementException extends Exception {
 
+    /**
+     * @see java.lang.Exception#Exception()
+     */
     public ManagementException() {
         super();
     }
 
+    /**
+     * @see java.lang.Exception#Exception(String)
+     */
     public ManagementException(String message) {
         super(message);
     }
 
+    /**
+     * @see java.lang.Exception#Exception(Throwable)
+     */
     public ManagementException(Exception e) {
         super(e);
     }
 
+    /**
+     * @see java.lang.Exception#Exception(String, Throwable)
+     */
     public ManagementException(String message, Exception e) {
         super(message, e);
     }

Modified: james/server/trunk/src/java/org/apache/james/management/SpoolFilter.java
URL: http://svn.apache.org/viewvc/james/server/trunk/src/java/org/apache/james/management/SpoolFilter.java?view=diff&rev=448903&r1=448902&r2=448903
==============================================================================
--- james/server/trunk/src/java/org/apache/james/management/SpoolFilter.java (original)
+++ james/server/trunk/src/java/org/apache/james/management/SpoolFilter.java Fri Sep 22 05:28:38 2006
@@ -54,23 +54,43 @@
      */
     private final Map headerFiltersCompiled = new HashMap();
 
+    /**
+     * Construct the SpoolFilter
+     * 
+     * @param state the message state on which message the filter should be used
+     * @param header the headername on which the given regex should be used
+     * @param headerValueRegex the regex to use on the value of the given header
+     */
     public SpoolFilter(String state, String header, String headerValueRegex) {
         this.state = state;
         if (header != null) headerFilters.put(header, headerValueRegex);
     }
 
+    /**
+     * Construct the SpoolFilter
+     * 
+     * @param state the message state on which message the filter should be used
+     */
     public SpoolFilter(String state) {
         this.state = state;
     }
 
+    /**
+     * Construct the SpoolFilter
+     * 
+     * @param header the headername on which the given regex should be used
+     * @param headerValueRegex the regex to use on the value of the given header
+     */
     public SpoolFilter(String header, String headerValueRegex) {
         this.state = null;
         if (header != null) headerFilters.put(header, headerValueRegex);
     }
 
     /**
-     * @param state
-     * @param headerFilters Map<String headerName, String headerValueRegex>
+     * Construct the SpoolFilter
+     * 
+     * @param state the message state on which message the filter should be used
+     * @param headerFilters a Map which contains filters to use
      */
     public SpoolFilter(String state, Map headerFilters) {
         this.state = state;
@@ -82,26 +102,61 @@
         return doFilterHeader() || doFilterState();
     }
 
+    /**
+     * Return true if any state was given on init the SpoolFilter
+     * 
+     * @return true if state was given on init. False otherwise 
+     */
     public boolean doFilterState() {
         return state != null;
     }
 
+    /**
+     * Return true if any filters should be used on the headers
+     * 
+     * @return true if filters should be used. False if not
+     */
     public boolean doFilterHeader() {
         return headerFilters.size() > 0;
     }
 
+    /**
+     * Return the message state on which the filter will be used
+     * 
+     * @return state the message state
+     */
     public String getState() {
         return state;
     }
 
+    /**
+     * Return an Iterator which contains all headers which should be filtered
+     * 
+     * @return headers an Iterator which contains all headers which should be filtered
+     */
     public Iterator getHeaders() {
         return headerFilters.keySet().iterator();
     }
 
+    /**
+     * Return the regex which should be used on the given header. 
+     * Return null if the header not exists in the Map
+     * 
+     * @param header the headername for which the regex should be retrieven. 
+     * @return regex the regex for the given header
+     */
     public String getHeaderValueRegex(String header) {
         return (String) headerFilters.get(header);
     }
 
+    /**
+     * Return the compiled Pattern for the given header. 
+     * Return null if the header not exists in the Map
+     * 
+     * @param header the header for which the pattern should be returned
+     * @return pattern the Pattern which was compiled for the given header
+     * @throws SpoolManagementException get thrown if an invalid regex is used with the given header
+     */
     public Pattern getHeaderValueRegexCompiled(String header) throws SpoolManagementException {
         Perl5Compiler compiler = new Perl5Compiler();
 

Modified: james/server/trunk/src/java/org/apache/james/management/SpoolManagement.java
URL: http://svn.apache.org/viewvc/james/server/trunk/src/java/org/apache/james/management/SpoolManagement.java?view=diff&rev=448903&r1=448902&r2=448903
==============================================================================
--- james/server/trunk/src/java/org/apache/james/management/SpoolManagement.java (original)
+++ james/server/trunk/src/java/org/apache/james/management/SpoolManagement.java Fri Sep 22 05:28:38 2006
@@ -51,10 +51,18 @@
 
     private Store mailStore;
 
+    /**
+     * Set the Store
+     * 
+     * @param mailStore the store
+     */
     public void setStore(Store mailStore) {
         this.mailStore = mailStore;
     }
 
+    /**
+     * @see org.apache.avalon.framework.service.Serviceable#service(ServiceManager)
+     */
     public void service(ServiceManager serviceManager) throws ServiceException {
         Store mailStore = (Store)serviceManager.lookup("org.apache.avalon.cornerstone.services.store.Store" );
         setStore(mailStore);
@@ -62,6 +70,7 @@
 
     /**
      * Lists all mails from the given repository matching the given filter criteria 
+     * 
      * @param spoolRepositoryURL the spool whose item are listed
      * @param state if not NULL, only mails with matching state are returned
      * @param header if not NULL, only mails with at least one header with a value matching headerValueRegex are returned
@@ -76,6 +85,7 @@
 
     /**
      * Lists all mails from the given repository matching the given filter criteria 
+     * 
      * @param spoolRepositoryURL the spool whose item are listed
      * @param filter the criteria against which all mails are matched
      * @return String array, each line describing one matching mail from the spool 
@@ -92,8 +102,10 @@
     }
 
     /**
-     * @param mail
-     * @param filter
+     * Return true if the given Mail match the given SpoolFilter
+     * 
+     * @param mail the Mail which should be checked
+     * @param filter the SpoolFilter which should be used
      * @return TRUE, if given mail matches all given filter criteria
      * @throws SpoolManagementException
      */
@@ -163,10 +175,7 @@
     }
 
     /**
-     * @param spoolRepositoryURL
-     * @param filter
-     * @return List<Mail> all matching mails from the given spool
-     * @throws SpoolManagementException
+     * @see org.apache.james.services.SpoolManagementService#getSpoolItems(String, SpoolFilter)
      */
     public List getSpoolItems(String spoolRepositoryURL, SpoolFilter filter)
             throws ServiceException, MessagingException, SpoolManagementException {
@@ -195,13 +204,17 @@
         return items;
     }
 
+    /**
+     * @see org.apache.james.management.SpoolManagementMBean#removeSpoolItems(String, String, String, String, String)
+     */
     public int removeSpoolItems(String spoolRepositoryURL, String key, String state, String header, String headerValueRegex) 
             throws SpoolManagementException {
         return removeSpoolItems(spoolRepositoryURL, key, new SpoolFilter(state, header, headerValueRegex));
     }
 
     /**
-     * Removes all mails from the given repository matching the filter 
+     * Removes all mails from the given repository matching the filter
+     *  
      * @param spoolRepositoryURL the spool whose item are listed
      * @param key ID of the mail to be removed. if not NULL, all other filters are ignored
      * @param filter the criteria against which all mails are matched. only applied if key is NULL.
@@ -216,14 +229,9 @@
         }
     }
 
+
     /**
-     * Removes all mails from the given repository matching the filter 
-     * @param spoolRepositoryURL the spool whose item are listed
-     * @param key ID of the mail to be removed. if not NULL, all other filters are ignored
-     * @param lockingFailures is populated with a list of mails which could not be processed because
-     * a lock could not be obtained
-     * @param filter the criteria against which all mails are matched. only applied if key is NULL.
-     * @return number of removed mails
+     * @see org.apache.james.services.SpoolManagementService#removeSpoolItems(String, String, List, SpoolFilter)
      */
     public int removeSpoolItems(String spoolRepositoryURL, String key, List lockingFailures, SpoolFilter filter) throws ServiceException, MessagingException {
         int count = 0;
@@ -253,6 +261,15 @@
         return count;
     }
 
+    /**
+     * Tries to resend all mails from the given repository matching the given filter criteria 
+     * 
+     * @param spoolRepositoryURL the spool whose item are about to be resend
+     * @param key ID of the mail to be resend. if not NULL, all other filters are ignored
+     * @param filter the SpoolFilter to use
+     * @return int the number of resent mails
+     * @throws SpoolManagementException
+     */
     public int resendSpoolItems(String spoolRepositoryURL, String key, SpoolFilter filter) throws SpoolManagementException {
         try {
             return resendSpoolItems(spoolRepositoryURL, key, null, filter);
@@ -275,15 +292,9 @@
         return resendSpoolItems(spoolRepositoryURL, key, new SpoolFilter(state, header, headerValueRegex));
     }
 
+
     /**
-     * Tries to resend all mails from the given repository matching the given filter criteria 
-     * @param spoolRepositoryURL the spool whose item are about to be resend
-     * @param key ID of the mail to be resend. if not NULL, all other filters are ignored
-     * @param lockingFailures is populated with a list of mails which could not be processed because
-     * a lock could not be obtained
-     * @param filter the criteria against which all mails are matched. only applied if key is NULL.
-     * @return int number of resent mails 
-     * @throws SpoolManagementException
+     * @see org.apache.james.services.SpoolManagementService#resendSpoolItems(String, String, List, SpoolFilter)
      */
     public int resendSpoolItems(String spoolRepositoryURL, String key, List lockingFailures, SpoolFilter filter)
             throws ServiceException, MessagingException, SpoolManagementException {
@@ -350,6 +361,7 @@
 
     /**
      * Remove the mail that belongs to the given key and spoolRepository 
+     * 
      * @param spoolRepository The spoolRepository
      * @param key The message key
      * @param filter

Modified: james/server/trunk/src/java/org/apache/james/services/SpoolManagementService.java
URL: http://svn.apache.org/viewvc/james/server/trunk/src/java/org/apache/james/services/SpoolManagementService.java?view=diff&rev=448903&r1=448902&r2=448903
==============================================================================
--- james/server/trunk/src/java/org/apache/james/services/SpoolManagementService.java (original)
+++ james/server/trunk/src/java/org/apache/james/services/SpoolManagementService.java Fri Sep 22 05:28:38 2006
@@ -32,12 +32,48 @@
 public interface SpoolManagementService {
     String ROLE = "org.apache.james.services.SpoolManagementService";
 
+    /**
+     * Removes all mails from the given repository matching the filter
+     *  
+     * @param spoolRepositoryURL the spool whose item are listed
+     * @param key ID of the mail to be removed. if not NULL, all other filters are ignored
+     * @param lockingFailures is populated with a list of mails which could not be processed because
+     * a lock could not be obtained
+     * @param filter the criteria against which all mails are matched. only applied if key is NULL.
+     * @return number of removed mails
+     * @throws ServiceException
+     * @trhows MessagingException
+     */
     public int removeSpoolItems(String spoolRepositoryURL, String key, List lockingFailures, SpoolFilter filter) 
             throws ServiceException, MessagingException;
     
+    /**
+     * Tries to resend all mails from the given repository matching the given filter criteria 
+     * 
+     * @param spoolRepositoryURL the spool whose item are about to be resend
+     * @param key ID of the mail to be resend. if not NULL, all other filters are ignored
+     * @param lockingFailures is populated with a list of mails which could not be processed because
+     *                        a lock could not be obtained
+     * @param filter the criteria against which all mails are matched. only applied if key is NULL.
+     * @return int number of resent mails 
+     * @throws ServiceException
+     * @throws MessagingException
+     * @throws SpoolManagementException
+     */
     public int resendSpoolItems(String spoolRepositoryURL, String key, List lockingFailures, SpoolFilter filter) 
             throws ServiceException, MessagingException, SpoolManagementException;
 
+    /**
+     * Return a List which contains all mails which can accessed by given spoolRepositoryUrl and matched
+     * the given SpoolFilter
+     * 
+     * @param spoolRepositoryURL the url under which a spool can be accessed
+     * @param filter the SpoolFilter to use
+     * @return List<Mail> all matching mails from the given spool
+     * @throws ServiceException
+     * @throws MessagingException
+     * @throws SpoolManagementException
+     */
     public List getSpoolItems(String spoolRepositoryURL, SpoolFilter filter) 
             throws ServiceException, MessagingException, SpoolManagementException;
 }

Modified: james/server/trunk/src/java/org/apache/mailet/MailetContext.java
URL: http://svn.apache.org/viewvc/james/server/trunk/src/java/org/apache/mailet/MailetContext.java?view=diff&rev=448903&r1=448902&r2=448903
==============================================================================
--- james/server/trunk/src/java/org/apache/mailet/MailetContext.java (original)
+++ james/server/trunk/src/java/org/apache/mailet/MailetContext.java Fri Sep 22 05:28:38 2006
@@ -66,6 +66,8 @@
      * This is done using MX records, and the hostnames or ip addresses
      * are returned sorted by MX priority.
      *
+     * <p>TODO: This needs to be made a more specific ordered subtype of Collection.</p>
+     *     
      * @param host - the domain name for which to find mail servers
      * @return a Collection of Strings of hostnames, sorted by priority
      */



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org