james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-james/src/org/apache/james/transport/mailets RemoteDelivery.java ToRepository.java
Date Mon, 05 Mar 2001 15:19:40 GMT
donaldp     01/03/05 07:19:39

  Modified:    src/org/apache/james/transport JamesSpoolManager.java
                        MailetLoader.java MatchLoader.java
               src/org/apache/james/transport/mailets RemoteDelivery.java
                        ToRepository.java
  Log:
  Updated to non-deprecated Configuration
  
  Submitted By: "Eung-ju Park" <colus@isoft.co.kr>
  
  Revision  Changes    Path
  1.25      +20 -5     jakarta-james/src/org/apache/james/transport/JamesSpoolManager.java
  
  Index: JamesSpoolManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/org/apache/james/transport/JamesSpoolManager.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- JamesSpoolManager.java	2001/02/18 05:42:39	1.24
  +++ JamesSpoolManager.java	2001/03/05 15:19:19	1.25
  @@ -11,7 +11,18 @@
   import java.net.*;
   import java.util.*;
   import javax.mail.MessagingException;
  -import org.apache.avalon.*;
  +import org.apache.avalon.AbstractLoggable;
  +import org.apache.avalon.Contextualizable;
  +import org.apache.avalon.Context;
  +import org.apache.avalon.DefaultContext;
  +import org.apache.avalon.Composer;
  +import org.apache.avalon.ComponentManager;
  +import org.apache.avalon.DefaultComponentManager;
  +import org.apache.avalon.configuration.Configurable;
  +import org.apache.avalon.configuration.Configuration;
  +import org.apache.avalon.configuration.ConfigurationException;
  +import org.apache.avalon.Initializable;
  +import org.apache.avalon.Stoppable;
   import org.apache.james.*;
   import org.apache.james.core.*;
   import org.apache.james.services.*;
  @@ -65,8 +76,10 @@
           //A processor is a Collection of
           processors = new HashMap();
   
  -        for (Iterator it = conf.getChildren("processor"); it.hasNext(); ) {
  -            Configuration processorConf = (Configuration) it.next();
  +        final Configuration[] processorConfs = conf.getChildren( "processor" );
  +        for ( int i = 0; i < processorConfs.length; i++ )
  +        {
  +            Configuration processorConf = processorConfs[i];
               String processorName = processorConf.getAttribute("name");
               try {
                   LinearProcessor processor = new LinearProcessor();
  @@ -83,8 +96,10 @@
                       processor.add(matcher, mailet);
                   }
   
  -                for (Iterator mailetConfs = processorConf.getChildren("mailet"); mailetConfs.hasNext();
) {
  -                    Configuration c = (Configuration) mailetConfs.next();
  +                final Configuration[] mailetConfs = processorConf.getChildren( "mailet"
);
  +                for ( int j = 0; j < mailetConfs.length; j++ )
  +                {
  +                    Configuration c = mailetConfs[j];
                       String mailetClassName = c.getAttribute("class");
                       String matcherName = c.getAttribute("match");
                       Mailet mailet = null;
  
  
  
  1.11      +7 -5      jakarta-james/src/org/apache/james/transport/MailetLoader.java
  
  Index: MailetLoader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/org/apache/james/transport/MailetLoader.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- MailetLoader.java	2001/02/03 18:21:30	1.10
  +++ MailetLoader.java	2001/03/05 15:19:21	1.11
  @@ -10,9 +10,9 @@
   import java.util.*;
   import javax.mail.*;
   import org.apache.avalon.Component;
  -import org.apache.avalon.Configurable;
  -import org.apache.avalon.Configuration;
  -import org.apache.avalon.ConfigurationException;
  +import org.apache.avalon.configuration.Configurable;
  +import org.apache.avalon.configuration.Configuration;
  +import org.apache.avalon.configuration.ConfigurationException;
   
   import org.apache.mailet.*;
   import org.apache.james.core.*;
  @@ -29,8 +29,10 @@
       public void configure(Configuration conf) throws ConfigurationException {
           mailetPackages = new Vector();
           mailetPackages.addElement("");
  -        for (Iterator it = conf.getChildren("mailetpackage"); it.hasNext(); ) {
  -            Configuration c = (Configuration) it.next();
  +        final Configuration[] pkgConfs = conf.getChildren( "mailetpackage" );
  +        for ( int i = 0; i < pkgConfs.length; i++ )
  +        {
  +            Configuration c = pkgConfs[i];
               String packageName = c.getValue();
               if (!packageName.endsWith(".")) {
                   packageName += ".";
  
  
  
  1.10      +7 -5      jakarta-james/src/org/apache/james/transport/MatchLoader.java
  
  Index: MatchLoader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/org/apache/james/transport/MatchLoader.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- MatchLoader.java	2001/02/03 18:21:30	1.9
  +++ MatchLoader.java	2001/03/05 15:19:22	1.10
  @@ -12,9 +12,9 @@
   import org.apache.mailet.*;
   import org.apache.james.core.*;
   import org.apache.avalon.Component;
  -import org.apache.avalon.Configurable;
  -import org.apache.avalon.Configuration;
  -import org.apache.avalon.ConfigurationException;
  +import org.apache.avalon.configuration.Configurable;
  +import org.apache.avalon.configuration.Configuration;
  +import org.apache.avalon.configuration.ConfigurationException;
   
   
   /**
  @@ -29,8 +29,10 @@
       public void configure(Configuration conf) throws ConfigurationException {
           matcherPackages = new Vector();
           matcherPackages.addElement("");
  -        for (Iterator it = conf.getChildren("matcherpackage"); it.hasNext(); ) {
  -            Configuration c = (Configuration) it.next();
  +        final Configuration[] pkgConfs = conf.getChildren( "matcherpackage" );
  +        for ( int i = 0; i < pkgConfs.length; i++ )
  +        {
  +            Configuration c = pkgConfs[i];
               String packageName = c.getValue();
               if (!packageName.endsWith(".")) {
                   packageName += ".";
  
  
  
  1.18      +4 -1      jakarta-james/src/org/apache/james/transport/mailets/RemoteDelivery.java
  
  Index: RemoteDelivery.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/org/apache/james/transport/mailets/RemoteDelivery.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- RemoteDelivery.java	2001/01/09 12:42:32	1.17
  +++ RemoteDelivery.java	2001/03/05 15:19:31	1.18
  @@ -12,7 +12,10 @@
   import java.util.*;
   import java.net.*;
   
  -import org.apache.avalon.*;
  +import org.apache.avalon.ComponentManager;
  +import org.apache.avalon.ComponentNotFoundException;
  +import org.apache.avalon.ComponentNotAccessibleException;
  +import org.apache.avalon.configuration.DefaultConfiguration;
   //import org.apache.avalon.services.Store;
   
   import org.apache.james.*;
  
  
  
  1.7       +4 -1      jakarta-james/src/org/apache/james/transport/mailets/ToRepository.java
  
  Index: ToRepository.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/org/apache/james/transport/mailets/ToRepository.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ToRepository.java	2001/01/09 12:42:32	1.6
  +++ ToRepository.java	2001/03/05 15:19:33	1.7
  @@ -11,7 +11,10 @@
   
   import java.util.*;
   
  -import org.apache.avalon.*;
  +import org.apache.avalon.ComponentManager;
  +import org.apache.avalon.ComponentNotFoundException;
  +import org.apache.avalon.ComponentNotAccessibleException;
  +import org.apache.avalon.configuration.DefaultConfiguration;
   //import org.apache.avalon.services.Store;
   
   import org.apache.james.*;
  
  
  

Mime
View raw message