james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nor...@apache.org
Subject svn commit: r940216 - in /james/mailet/standard/trunk: ./ src/main/java/org/apache/james/transport/mailets/ src/main/java/org/apache/james/transport/matchers/
Date Sun, 02 May 2010 13:22:32 GMT
Author: norman
Date: Sun May  2 13:22:31 2010
New Revision: 940216

URL: http://svn.apache.org/viewvc?rev=940216&view=rev
Log:
Remove usage of deprecated methods, fix assembly config, fix javadocs

Modified:
    james/mailet/standard/trunk/pom.xml
    james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/LogMessage.java
    james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/MailAttributesToMimeHeaders.java
    james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/PostmasterAlias.java
    james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/RemoveMimeHeader.java
    james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/CommandForListserv.java
    james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/CommandListservMatcher.java
    james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/HostIs.java
    james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/HostIsLocal.java
    james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/SenderHostIsLocal.java
    james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/UserIs.java

Modified: james/mailet/standard/trunk/pom.xml
URL: http://svn.apache.org/viewvc/james/mailet/standard/trunk/pom.xml?rev=940216&r1=940215&r2=940216&view=diff
==============================================================================
--- james/mailet/standard/trunk/pom.xml (original)
+++ james/mailet/standard/trunk/pom.xml Sun May  2 13:22:31 2010
@@ -270,9 +270,9 @@
       </plugin>
       <plugin>
         <artifactId>maven-assembly-plugin</artifactId>
-        <version>2.2-beta-2</version>
         <configuration>
           <descriptorSourceDirectory>${basedir}/src/assemble/</descriptorSourceDirectory>
+          <tarLongFileMode>gnu</tarLongFileMode> 
         </configuration>
         <executions>
           <execution>

Modified: james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/LogMessage.java
URL: http://svn.apache.org/viewvc/james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/LogMessage.java?rev=940216&r1=940215&r2=940216&view=diff
==============================================================================
--- james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/LogMessage.java
(original)
+++ james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/LogMessage.java
Sun May  2 13:22:31 2010
@@ -68,7 +68,7 @@ public class LogMessage extends GenericM
     /**
      * Log a particular message
      *
-     * @param genericmail the mail to process
+     * @param mail the mail to process
      */
     public void service(Mail mail) {
         log(new StringBuffer(160).append("Logging mail ").append(mail.getName()).toString());
@@ -101,6 +101,8 @@ public class LogMessage extends GenericM
     /**
      * Utility method for obtaining a string representation of a
      * Message's headers
+     * 
+     * @param message
      */
     private String getMessageHeaders(MimeMessage message) throws MessagingException {
         Enumeration heads = message.getAllHeaderLines();

Modified: james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/MailAttributesToMimeHeaders.java
URL: http://svn.apache.org/viewvc/james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/MailAttributesToMimeHeaders.java?rev=940216&r1=940215&r2=940216&view=diff
==============================================================================
--- james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/MailAttributesToMimeHeaders.java
(original)
+++ james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/MailAttributesToMimeHeaders.java
Sun May  2 13:22:31 2010
@@ -50,8 +50,9 @@ public class MailAttributesToMimeHeaders
      */
     private HashMap map = new HashMap();
 
-    /**
-     * @see org.apache.mailet.GenericMailet#init()
+    /*
+     * (non-Javadoc)
+     * @see org.apache.mailet.base.GenericMailet#init()
      */
     public void init() throws MessagingException {
         String simplemappings = getInitParameter("simplemapping");
@@ -77,8 +78,9 @@ public class MailAttributesToMimeHeaders
         }
     }
 
-    /**
-     * @see org.apache.mailet.GenericMailet#service(Mail)
+    /*
+     * (non-Javadoc)
+     * @see org.apache.mailet.base.GenericMailet#service(org.apache.mailet.Mail)
      */
     public void service(Mail mail) {
         MimeMessage message;

Modified: james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/PostmasterAlias.java
URL: http://svn.apache.org/viewvc/james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/PostmasterAlias.java?rev=940216&r1=940215&r2=940216&view=diff
==============================================================================
--- james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/PostmasterAlias.java
(original)
+++ james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/PostmasterAlias.java
Sun May  2 13:22:31 2010
@@ -56,8 +56,8 @@ public class PostmasterAlias extends Gen
 
         for (Iterator i = recipients.iterator(); i.hasNext(); ) {
             MailAddress addr = (MailAddress)i.next();
-            if (addr.getUser().equalsIgnoreCase("postmaster") &&
-                mailetContext.isLocalServer(addr.getHost())) {
+            if (addr.getLocalPart().equalsIgnoreCase("postmaster") &&
+                mailetContext.isLocalServer(addr.getDomain())) {
                 //Should remove this address... we want to replace it with
                 //  the server's postmaster address
                 if (recipientsToRemove == null) {

Modified: james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/RemoveMimeHeader.java
URL: http://svn.apache.org/viewvc/james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/RemoveMimeHeader.java?rev=940216&r1=940215&r2=940216&view=diff
==============================================================================
--- james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/RemoveMimeHeader.java
(original)
+++ james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/RemoveMimeHeader.java
Sun May  2 13:22:31 2010
@@ -51,8 +51,9 @@ public class RemoveMimeHeader extends Ge
      */
     ArrayList headers = new ArrayList();
 
-    /**
-     * @see org.apache.mailet.GenericMailet#init()
+    /*
+     * (non-Javadoc)
+     * @see org.apache.mailet.base.GenericMailet#init()
      */
     public void init() throws MailetException {
         String header = getInitParameter("name");
@@ -67,8 +68,10 @@ public class RemoveMimeHeader extends Ge
         }
     }
     
-    /**
-     * @see org.apache.mailet.GenericMailet#service(Mail)
+
+    /*
+     * (non-Javadoc)
+     * @see org.apache.mailet.base.GenericMailet#service(org.apache.mailet.Mail)
      */
     public void service(Mail mail) {
         try {

Modified: james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/CommandForListserv.java
URL: http://svn.apache.org/viewvc/james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/CommandForListserv.java?rev=940216&r1=940215&r2=940216&view=diff
==============================================================================
--- james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/CommandForListserv.java
(original)
+++ james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/CommandForListserv.java
Sun May  2 13:22:31 2010
@@ -47,9 +47,9 @@ public class CommandForListserv extends 
      * @see org.apache.mailet.GenericRecipientMatcher#matchRecipient(MailAddress)
      */
     public boolean matchRecipient(MailAddress recipient) {
-        if (recipient.getHost().equals(listservAddress.getHost())) {
-            if (recipient.getUser().equals(listservAddress.getUser() + "-on")
-                || recipient.getUser().equals(listservAddress.getUser() + "-off")) {
+        if (recipient.getDomain().equals(listservAddress.getDomain())) {
+            if (recipient.getLocalPart().equals(listservAddress.getLocalPart() + "-on")
+                || recipient.getLocalPart().equals(listservAddress.getLocalPart() + "-off"))
{
                 return true;
             }
         }

Modified: james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/CommandListservMatcher.java
URL: http://svn.apache.org/viewvc/james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/CommandListservMatcher.java?rev=940216&r1=940215&r2=940216&view=diff
==============================================================================
--- james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/CommandListservMatcher.java
(original)
+++ james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/CommandListservMatcher.java
Sun May  2 13:22:31 2010
@@ -56,8 +56,8 @@ public class CommandListservMatcher exte
      * @return true if matches, false otherwise
      */
     public boolean matchRecipient(MailAddress recipient) {
-        if (recipient.getHost().equals(listservAddress.getHost())) {
-            if (recipient.getUser().startsWith(listservAddress.getUser() + "-")) {
+        if (recipient.getDomain().equals(listservAddress.getDomain())) {
+            if (recipient.getLocalPart().startsWith(listservAddress.getLocalPart() + "-"))
{
                 return true;
             }
         }

Modified: james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/HostIs.java
URL: http://svn.apache.org/viewvc/james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/HostIs.java?rev=940216&r1=940215&r2=940216&view=diff
==============================================================================
--- james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/HostIs.java
(original)
+++ james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/HostIs.java
Sun May  2 13:22:31 2010
@@ -30,13 +30,16 @@ import java.util.StringTokenizer;
 import java.util.Vector;
 
 /**
- * Matches mail from given hosts.
- * @version 1.0.0, 24/04/1999
+ * Matches mail to given hosts.
  */
 public class HostIs extends GenericRecipientMatcher {
 
     private Collection hosts;
 
+    /*
+     * (non-Javadoc)
+     * @see org.apache.mailet.base.GenericMatcher#init()
+     */
     public void init() {
         StringTokenizer st = new StringTokenizer(getCondition(), ", ", false);
         hosts = new Vector();
@@ -45,7 +48,11 @@ public class HostIs extends GenericRecip
         }
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.apache.mailet.base.GenericRecipientMatcher#matchRecipient(org.apache.mailet.MailAddress)
+     */
     public boolean matchRecipient(MailAddress recipient) {
-        return hosts.contains(recipient.getHost().toLowerCase(Locale.US));
+        return hosts.contains(recipient.getDomain().toLowerCase(Locale.US));
     }
 }

Modified: james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/HostIsLocal.java
URL: http://svn.apache.org/viewvc/james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/HostIsLocal.java?rev=940216&r1=940215&r2=940216&view=diff
==============================================================================
--- james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/HostIsLocal.java
(original)
+++ james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/HostIsLocal.java
Sun May  2 13:22:31 2010
@@ -25,12 +25,16 @@ import org.apache.mailet.base.GenericRec
 import org.apache.mailet.MailAddress;
 
 /**
- * Matches mail from localhost.
- * @version 1.0.0, 24/04/1999
+ * Matches mail to Domains which are local
+ * .
  */
 public class HostIsLocal extends GenericRecipientMatcher {
 
+    /*
+     * (non-Javadoc)
+     * @see org.apache.mailet.base.GenericRecipientMatcher#matchRecipient(org.apache.mailet.MailAddress)
+     */
     public boolean matchRecipient(MailAddress recipient) {
-        return getMailetContext().isLocalServer(recipient.getHost());
+        return getMailetContext().isLocalServer(recipient.getDomain());
     }
 }

Modified: james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/SenderHostIsLocal.java
URL: http://svn.apache.org/viewvc/james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/SenderHostIsLocal.java?rev=940216&r1=940215&r2=940216&view=diff
==============================================================================
--- james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/SenderHostIsLocal.java
(original)
+++ james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/SenderHostIsLocal.java
Sun May  2 13:22:31 2010
@@ -39,7 +39,7 @@ public class SenderHostIsLocal extends G
     public Collection match(Mail mail) {
         if (mail.getSender() != null
                 && this.getMailetContext().isLocalServer(
-                        mail.getSender().getHost().toLowerCase())) {
+                        mail.getSender().getDomain().toLowerCase())) {
             return mail.getRecipients();
         }
         return null;

Modified: james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/UserIs.java
URL: http://svn.apache.org/viewvc/james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/UserIs.java?rev=940216&r1=940215&r2=940216&view=diff
==============================================================================
--- james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/UserIs.java
(original)
+++ james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/UserIs.java
Sun May  2 13:22:31 2010
@@ -34,6 +34,10 @@ import java.util.Vector;
 public class UserIs extends GenericRecipientMatcher {
     Vector users = null;
 
+    /*
+     * (non-Javadoc)
+     * @see org.apache.mailet.base.GenericMatcher#init()
+     */
     public void init() {
         StringTokenizer st = new StringTokenizer(getCondition(), ", ", false);
         users = new Vector();
@@ -42,8 +46,12 @@ public class UserIs extends GenericRecip
         }
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.apache.mailet.base.GenericRecipientMatcher#matchRecipient(org.apache.mailet.MailAddress)
+     */
     public boolean matchRecipient(MailAddress recipient) {
-        return users.contains(recipient.getUser());
+        return users.contains(recipient.getLocalPart());
     }
 }
 



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


Mime
View raw message