james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdon...@apache.org
Subject svn commit: r714232 - in /james/jsieve/trunk: ./ mailet/ mailet/src/main/java/org/apache/james/transport/mailets/sieve/ mailet/src/main/java/org/apache/james/util/mail/mdn/ stage/org.apache.james/ stage/org.apache.james/jars/
Date Sat, 15 Nov 2008 11:02:06 GMT
Author: rdonkin
Date: Sat Nov 15 03:02:05 2008
New Revision: 714232

URL: http://svn.apache.org/viewvc?rev=714232&view=rev
Log:
Upgrade to new mailet base including references.

Added:
    james/jsieve/trunk/stage/org.apache.james/
    james/jsieve/trunk/stage/org.apache.james/jars/
    james/jsieve/trunk/stage/org.apache.james/jars/apache-mailet-base-1.0-SNAPSHOT-tests.jar
  (with props)
    james/jsieve/trunk/stage/org.apache.james/jars/apache-mailet-base-1.0-SNAPSHOT.jar   (with
props)
    james/jsieve/trunk/stage/org.apache.james/jars/apache-mime4j-0.5.jar   (with props)
Removed:
    james/jsieve/trunk/mailet/src/main/java/org/apache/james/util/mail/mdn/
Modified:
    james/jsieve/trunk/include.properties
    james/jsieve/trunk/mailet/build.xml
    james/jsieve/trunk/mailet/src/main/java/org/apache/james/transport/mailets/sieve/Actions.java
    james/jsieve/trunk/mailet/src/main/java/org/apache/james/transport/mailets/sieve/SieveToMultiMailbox.java

Modified: james/jsieve/trunk/include.properties
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/include.properties?rev=714232&r1=714231&r2=714232&view=diff
==============================================================================
--- james/jsieve/trunk/include.properties (original)
+++ james/jsieve/trunk/include.properties Sat Nov 15 03:02:05 2008
@@ -59,6 +59,8 @@
 # ----- Mailet API ---
 
 mailet.jar=${lib.dir}/org.apache.mailet/jars/apache-mailet-2.4-SNAPSHOT.jar
+mailet-base.jar=${lib.dir}/org.apache.james/jars/apache-mailet-base-1.0-SNAPSHOT.jar
+mime4j.jar=${lib.dir}/org.apache.james/jars/apache-mime4j-0.5.jar
 
 # --------------------------------------------------
 #                LIBRARIES REQUIRED FOR TESTING

Modified: james/jsieve/trunk/mailet/build.xml
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/mailet/build.xml?rev=714232&r1=714231&r2=714232&view=diff
==============================================================================
--- james/jsieve/trunk/mailet/build.xml (original)
+++ james/jsieve/trunk/mailet/build.xml Sat Nov 15 03:02:05 2008
@@ -52,6 +52,8 @@
         <pathelement location="${junit.jar}"/>
     	<pathelement location='${lib.jsieve.dir}/${name}-${version}.jar'/>
     	<pathelement location="${mailet.jar}"/>
+    	<pathelement location="${mailet-base.jar}"/>
+    	<pathelement location="${mime4j.jar}"/>
     	<path refid="mail.class.path"/>
         <pathelement path="${java.class.path}" />
         <pathelement path="${build.classes}" />

Modified: james/jsieve/trunk/mailet/src/main/java/org/apache/james/transport/mailets/sieve/Actions.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/mailet/src/main/java/org/apache/james/transport/mailets/sieve/Actions.java?rev=714232&r1=714231&r2=714232&view=diff
==============================================================================
--- james/jsieve/trunk/mailet/src/main/java/org/apache/james/transport/mailets/sieve/Actions.java
(original)
+++ james/jsieve/trunk/mailet/src/main/java/org/apache/james/transport/mailets/sieve/Actions.java
Sat Nov 15 03:02:05 2008
@@ -30,13 +30,13 @@
 import javax.mail.internet.MimeMessage;
 import javax.mail.internet.MimeMultipart;
 
-import org.apache.james.util.mail.mdn.ActionModeAutomatic;
-import org.apache.james.util.mail.mdn.Disposition;
-import org.apache.james.util.mail.mdn.DispositionModifier;
-import org.apache.james.util.mail.mdn.MDNFactory;
-import org.apache.james.util.mail.mdn.ModifierError;
-import org.apache.james.util.mail.mdn.SendingModeAutomatic;
-import org.apache.james.util.mail.mdn.TypeDeleted;
+import org.apache.mailet.base.mail.mdn.ActionModeAutomatic;
+import org.apache.mailet.base.mail.mdn.Disposition;
+import org.apache.mailet.base.mail.mdn.DispositionModifier;
+import org.apache.mailet.base.mail.mdn.MDNFactory;
+import org.apache.mailet.base.mail.mdn.ModifierError;
+import org.apache.mailet.base.mail.mdn.SendingModeAutomatic;
+import org.apache.mailet.base.mail.mdn.TypeDeleted;
 import org.apache.jsieve.mail.ActionFileInto;
 import org.apache.jsieve.mail.ActionKeep;
 import org.apache.jsieve.mail.ActionRedirect;

Modified: james/jsieve/trunk/mailet/src/main/java/org/apache/james/transport/mailets/sieve/SieveToMultiMailbox.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/mailet/src/main/java/org/apache/james/transport/mailets/sieve/SieveToMultiMailbox.java?rev=714232&r1=714231&r2=714232&view=diff
==============================================================================
--- james/jsieve/trunk/mailet/src/main/java/org/apache/james/transport/mailets/sieve/SieveToMultiMailbox.java
(original)
+++ james/jsieve/trunk/mailet/src/main/java/org/apache/james/transport/mailets/sieve/SieveToMultiMailbox.java
Sat Nov 15 03:02:05 2008
@@ -31,13 +31,16 @@
 import javax.mail.internet.InternetHeaders;
 import javax.mail.internet.MimeMessage;
 
+import org.apache.jsieve.ConfigurationManager;
+import org.apache.jsieve.SieveConfigurationException;
 import org.apache.jsieve.SieveFactory;
 import org.apache.jsieve.mail.MailAdapter;
-import org.apache.mailet.GenericMailet;
+import org.apache.mailet.base.GenericMailet;
 import org.apache.mailet.Mail;
 import org.apache.mailet.MailAddress;
+import org.apache.mailet.MailetConfig;
 import org.apache.mailet.MailetException;
-import org.apache.mailet.RFC2822Headers;
+import org.apache.mailet.base.RFC2822Headers;
 
 /**
  * Receives a Mail from JamesSpoolManager and takes care of delivery of the
@@ -72,6 +75,8 @@
     private boolean resetReturnPath;
     /** Experimental */
     private Poster poster;
+    
+    private SieveFactory factory;
 
     /**
      * For SDI
@@ -83,7 +88,7 @@
      * @param poster not null
      */
     public SieveToMultiMailbox(Poster poster) {
-        super();
+        this();
         this.poster = poster;
     }
 
@@ -99,6 +104,18 @@
         this.poster = poster;
     }
 
+    
+    //@Override
+    public void init(MailetConfig config) throws MessagingException {
+        
+        super.init(config);
+        try {
+            factory = new ConfigurationManager().build();
+        } catch (SieveConfigurationException e) {
+            throw new MessagingException("Failed to load standard Sieve configuration.",
e);
+        }
+    }
+
     /**
      * Delivers a mail to a local mailbox.
      * 
@@ -236,8 +253,8 @@
                     getMailetContext());
             log("Evaluating " + aMailAdapter.toString() + "against \""
                     + sieveFileName + "\"");
-            SieveFactory.getInstance().evaluate(aMailAdapter,
-                    SieveFactory.getInstance().parse(new FileInputStream(sieveFileName)));
+            factory.evaluate(aMailAdapter,
+                    factory.parse(new FileInputStream(sieveFileName)));
         }
         catch (Exception ex)
         {

Added: james/jsieve/trunk/stage/org.apache.james/jars/apache-mailet-base-1.0-SNAPSHOT-tests.jar
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/stage/org.apache.james/jars/apache-mailet-base-1.0-SNAPSHOT-tests.jar?rev=714232&view=auto
==============================================================================
Binary file - no diff available.

Propchange: james/jsieve/trunk/stage/org.apache.james/jars/apache-mailet-base-1.0-SNAPSHOT-tests.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: james/jsieve/trunk/stage/org.apache.james/jars/apache-mailet-base-1.0-SNAPSHOT.jar
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/stage/org.apache.james/jars/apache-mailet-base-1.0-SNAPSHOT.jar?rev=714232&view=auto
==============================================================================
Binary file - no diff available.

Propchange: james/jsieve/trunk/stage/org.apache.james/jars/apache-mailet-base-1.0-SNAPSHOT.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: james/jsieve/trunk/stage/org.apache.james/jars/apache-mime4j-0.5.jar
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/stage/org.apache.james/jars/apache-mime4j-0.5.jar?rev=714232&view=auto
==============================================================================
Binary file - no diff available.

Propchange: james/jsieve/trunk/stage/org.apache.james/jars/apache-mime4j-0.5.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream



---------------------------------------------------------------------
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