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 da...@apache.org on 2003/01/27 05:05:09 UTC

cvs commit: jakarta-james/proposals/imap2/java/org/apache/james/imapserver/store ImapMailbox.java SimpleMessageAttributes.java

darrell     2003/01/26 20:05:09

  Modified:    proposals/imap2/java/org/apache/james James.java
               proposals/imap2/java/org/apache/james/imapserver
                        ImapHandler.java ImapHandlerConfigurationData.java
                        ImapHost.java ImapServer.java ImapSession.java
                        ImapSessionImpl.java JamesImapHost.java
               proposals/imap2/java/org/apache/james/imapserver/commands
                        LoginCommand.java
               proposals/imap2/java/org/apache/james/imapserver/store
                        ImapMailbox.java SimpleMessageAttributes.java
  Log:
  Imap2 proposal updates:
  Various fixes to synch the proposal with changes
  in the main tree. Proposal source code now compiles,
  but tests still don't.
  
  patch supplied by Kenny Smith (journalscape.com)
  
  Revision  Changes    Path
  1.2       +344 -341  jakarta-james/proposals/imap2/java/org/apache/james/James.java
  
  Index: James.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/proposals/imap2/java/org/apache/james/James.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- James.java	22 Nov 2002 02:09:50 -0000	1.1
  +++ James.java	27 Jan 2003 04:05:08 -0000	1.2
  @@ -7,6 +7,30 @@
    */
   package org.apache.james;
   
  +import java.io.ByteArrayInputStream;
  +import java.io.IOException;
  +import java.io.InputStream;
  +import java.io.SequenceInputStream;
  +import java.net.InetAddress;
  +import java.net.UnknownHostException;
  +import java.util.Collection;
  +import java.util.Date;
  +import java.util.Enumeration;
  +import java.util.HashMap;
  +import java.util.HashSet;
  +import java.util.Hashtable;
  +import java.util.Iterator;
  +import java.util.Locale;
  +import java.util.Map;
  +import java.util.Vector;
  +
  +import javax.mail.Address;
  +import javax.mail.MessagingException;
  +import javax.mail.internet.InternetAddress;
  +import javax.mail.internet.MimeBodyPart;
  +import javax.mail.internet.MimeMessage;
  +import javax.mail.internet.MimeMultipart;
  +
   import org.apache.avalon.framework.activity.Initializable;
   import org.apache.avalon.framework.component.Component;
   import org.apache.avalon.framework.component.ComponentException;
  @@ -24,46 +48,23 @@
   import org.apache.avalon.framework.logger.Logger;
   import org.apache.james.core.MailHeaders;
   import org.apache.james.core.MailImpl;
  -import org.apache.james.imapserver.ImapHost;
  -import org.apache.james.imapserver.store.ImapMailbox;
  -import org.apache.james.imapserver.store.MailboxException;
  +import org.apache.james.imapserver.ImapHost ;
  +import org.apache.james.imapserver.store.ImapMailbox ;
  +import org.apache.james.imapserver.store.MailboxException ;
   import org.apache.james.services.DNSServer;
   import org.apache.james.services.JamesUser;
  -import org.apache.james.services.MailRepository;
   import org.apache.james.services.MailServer;
   import org.apache.james.services.MailStore;
  -import org.apache.james.services.SpoolRepository;
  -import org.apache.james.services.UsersRepository;
   import org.apache.james.services.UsersStore;
   import org.apache.james.userrepository.DefaultJamesUser;
  -import org.apache.james.util.RFC2822Headers;
  -import org.apache.james.util.RFC822DateFormat;
   import org.apache.mailet.Mail;
   import org.apache.mailet.MailAddress;
  +import org.apache.mailet.MailRepository;
   import org.apache.mailet.MailetContext;
  -
  -import javax.mail.Address;
  -import javax.mail.MessagingException;
  -import javax.mail.internet.InternetAddress;
  -import javax.mail.internet.MimeBodyPart;
  -import javax.mail.internet.MimeMessage;
  -import javax.mail.internet.MimeMultipart;
  -import java.io.ByteArrayInputStream;
  -import java.io.IOException;
  -import java.io.InputStream;
  -import java.io.SequenceInputStream;
  -import java.net.InetAddress;
  -import java.net.UnknownHostException;
  -import java.util.Collection;
  -import java.util.Date;
  -import java.util.Enumeration;
  -import java.util.HashMap;
  -import java.util.HashSet;
  -import java.util.Hashtable;
  -import java.util.Iterator;
  -import java.util.Locale;
  -import java.util.Map;
  -import java.util.Vector;
  +import org.apache.mailet.RFC2822Headers;
  +import org.apache.mailet.SpoolRepository;
  +import org.apache.mailet.UsersRepository;
  +import org.apache.mailet.dates.RFC822DateFormat;
   
   /**
    * Core class for JAMES. Provides three primary services:
  @@ -72,18 +73,14 @@
    * <br> 2) Handles interactions between components
    * <br> 3) Provides container services for Mailets
    *
  - * @author  Federico Barbieri <sc...@pop.systemy.it>
  - * @author Serge
  - * @author <a href="mailto:charles@benett1.demon.co.uk">Charles Benett</a>
    *
    * @version This is $Revision$
   
    */
   public class James
  -        extends AbstractLogEnabled
  -        implements Contextualizable, Composable, Configurable, JamesMBean,
  -        Initializable, MailServer, MailetContext, Component
  -{
  +    extends AbstractLogEnabled
  +    implements Contextualizable, Composable, Configurable, JamesMBean,
  +               Initializable, MailServer, MailetContext, Component {
   
       /**
        * The software name and version
  @@ -189,7 +186,7 @@
       /**
        * The Avalon context used by the instance
        */
  -    protected Context myContext;
  +    protected Context           myContext;
   
       /**
        * An RFC822 date formatter used to format dates in mail headers
  @@ -206,89 +203,83 @@
        */
       private ImapHost imapHost;
   
  +
       /**
  -     * @see Contextualizable#contextualize(Context)
  +     * @see org.apache.avalon.framework.context.Contextualizable#contextualize(Context)
        */
  -    public void contextualize( final Context context )
  -    {
  +    public void contextualize(final Context context) {
           this.myContext = context;
       }
   
       /**
  -     * @see Composable#compose(ComponentManager)
  +     * @see org.apache.avalon.framework.component.Composable#compose(ComponentManager)
        */
  -    public void compose( ComponentManager comp )
  -    {
  -        compMgr = new DefaultComponentManager( comp );
  -        mailboxes = new HashMap( 31 );
  +    public void compose(ComponentManager comp) {
  +        compMgr = new DefaultComponentManager(comp);
  +        mailboxes = new HashMap(31);
       }
   
       /**
  -     * @see Configurable#configure(Configuration)
  +     * @see org.apache.avalon.framework.configuration.Configurable#configure(Configuration)
        */
  -    public void configure( Configuration conf )
  -    {
  +    public void configure(Configuration conf) {
           this.conf = conf;
       }
   
       /**
  -     * @see Initializable#initialize()
  +     * @see org.apache.avalon.framework.activity.Initializable#initialize()
        */
  -    public void initialize() throws Exception
  -    {
  +    public void initialize() throws Exception {
   
  -        getLogger().info( "JAMES init..." );
  +        getLogger().info("JAMES init...");
   
           // TODO: This should retrieve a more specific named thread pool from
           // Context that is set up in server.xml
           try {
  -            mailstore = ( MailStore ) compMgr.lookup( MailStore.ROLE );
  -        }
  -        catch ( Exception e ) {
  -            if ( getLogger().isWarnEnabled() ) {
  -                getLogger().warn( "Can't get Store: " + e );
  +            mailstore = (MailStore) compMgr.lookup( MailStore.ROLE );
  +        } catch (Exception e) {
  +            if (getLogger().isWarnEnabled()) {
  +                getLogger().warn("Can't get Store: " + e);
               }
           }
  -        if ( getLogger().isDebugEnabled() ) {
  -            getLogger().debug( "Using MailStore: " + mailstore.toString() );
  +        if (getLogger().isDebugEnabled()) {
  +            getLogger().debug("Using MailStore: " + mailstore.toString());
           }
           try {
  -            usersStore = ( UsersStore ) compMgr.lookup( UsersStore.ROLE );
  -        }
  -        catch ( Exception e ) {
  -            if ( getLogger().isWarnEnabled() ) {
  -                getLogger().warn( "Can't get Store: " + e );
  +            usersStore = (UsersStore) compMgr.lookup( UsersStore.ROLE );
  +        } catch (Exception e) {
  +            if (getLogger().isWarnEnabled()) {
  +                getLogger().warn("Can't get Store: " + e);
               }
           }
  -        if ( getLogger().isDebugEnabled() ) {
  -            getLogger().debug( "Using UsersStore: " + usersStore.toString() );
  +        if (getLogger().isDebugEnabled()) {
  +            getLogger().debug("Using UsersStore: " + usersStore.toString());
           }
   
           String hostName = null;
           try {
               hostName = InetAddress.getLocalHost().getHostName();
  -        }
  -        catch ( UnknownHostException ue ) {
  +        } catch  (UnknownHostException ue) {
               hostName = "localhost";
           }
   
           context = new DefaultContext();
  -        context.put( "HostName", hostName );
  -        getLogger().info( "Local host is: " + hostName );
  +        context.put("HostName", hostName);
  +        getLogger().info("Local host is: " + hostName);
   
           // Get the domains and hosts served by this instance
           serverNames = new HashSet();
  -        Configuration serverConf = conf.getChild( "servernames" );
  -        if ( serverConf.getAttributeAsBoolean( "autodetect" ) && ( !hostName.equals( "localhost" ) ) ) {
  -            serverNames.add( hostName.toLowerCase( Locale.US ) );
  +        Configuration serverConf = conf.getChild("servernames");
  +        if (serverConf.getAttributeAsBoolean("autodetect") && (!hostName.equals("localhost"))) {
  +            serverNames.add(hostName.toLowerCase(Locale.US));
           }
   
           final Configuration[] serverNameConfs =
  -                conf.getChild( "servernames" ).getChildren( "servername" );
  +            conf.getChild( "servernames" ).getChildren( "servername" );
           for ( int i = 0; i < serverNameConfs.length; i++ ) {
  -            serverNames.add( serverNameConfs[i].getValue().toLowerCase( Locale.US ) );
  +            serverNames.add( serverNameConfs[i].getValue().toLowerCase(Locale.US));
   
  -            if ( serverConf.getAttributeAsBoolean( "autodetectIP", true ) ) {
  +            if (serverConf.getAttributeAsBoolean("autodetectIP", true)) {
                   try {
                       /* This adds the IP address(es) for each host to support
                        * support <us...@address-literal> - RFC 2821, sec 4.1.3.
  @@ -299,74 +290,73 @@
                        * this to keep hostname and IP associated, rather than
                        * just both in the set.
                        */
  -                    InetAddress[] addrs = InetAddress.getAllByName( serverNameConfs[i].getValue() );
  -                    for ( int j = 0; j < addrs.length; j++ ) {
  -                        serverNames.add( addrs[j].getHostAddress() );
  +                    InetAddress[] addrs = InetAddress.getAllByName(serverNameConfs[i].getValue());
  +                    for (int j = 0; j < addrs.length ; j++) {
  +                        serverNames.add(addrs[j].getHostAddress());
                       }
                   }
  -                catch ( Exception genericException ) {
  -                    getLogger().error( "Cannot get IP address(es) for " + serverNameConfs[i].getValue() );
  +                catch(Exception genericException) {
  +                    getLogger().error("Cannot get IP address(es) for " + serverNameConfs[i].getValue());
                   }
               }
           }
  -        if ( serverNames.isEmpty() ) {
  -            throw new ConfigurationException( "Fatal configuration error: no servernames specified!" );
  +        if (serverNames.isEmpty()) {
  +            throw new ConfigurationException( "Fatal configuration error: no servernames specified!");
           }
   
  -        if ( getLogger().isInfoEnabled() ) {
  -            for ( Iterator i = serverNames.iterator(); i.hasNext(); ) {
  -                getLogger().info( "Handling mail for: " + i.next() );
  +        if (getLogger().isInfoEnabled()) {
  +            for (Iterator i = serverNames.iterator(); i.hasNext(); ) {
  +                getLogger().info("Handling mail for: " + i.next());
               }
           }
  -        context.put( Constants.SERVER_NAMES, this.serverNames );
  -        attributes.put( Constants.SERVER_NAMES, this.serverNames );
  +        context.put(Constants.SERVER_NAMES, this.serverNames);
  +        attributes.put(Constants.SERVER_NAMES, this.serverNames);
   
   
           // Get postmaster
  -        String postMasterAddress = conf.getChild( "postmaster" ).getValue( "postmaster" );
  +        String postMasterAddress = conf.getChild("postmaster").getValue("postmaster");
           // if there is no @domain part, then add the first one from the
           // list of supported domains that isn't localhost.  If that
           // doesn't work, use the hostname, even if it is localhost.
  -        if ( postMasterAddress.indexOf( '@' ) < 0 ) {
  +        if (postMasterAddress.indexOf('@') < 0) {
               String domainName = null;    // the domain to use
               // loop through candidate domains until we find one or exhaust the list
  -            for ( int i = 0; domainName == null && i < serverNameConfs.length; i++ ) {
  -                String serverName = serverNameConfs[i].getValue().toLowerCase( Locale.US );
  -                if ( !( "localhost".equals( serverName ) ) ) {
  +            for ( int i = 0; domainName == null && i < serverNameConfs.length ; i++ ) {
  +                String serverName = serverNameConfs[i].getValue().toLowerCase(Locale.US);
  +                if (!("localhost".equals(serverName))) {
                       domainName = serverName;    // ok, not localhost, so use it
                   }
               }
               // if we found a suitable domain, use it.  Otherwise fallback to the host name.
  -            postMasterAddress = postMasterAddress + "@" + ( domainName != null ? domainName : hostName );
  +            postMasterAddress = postMasterAddress + "@" + (domainName != null ? domainName : hostName);
           }
           this.postmaster = new MailAddress( postMasterAddress );
           context.put( Constants.POSTMASTER, postmaster );
   
  -        if ( !isLocalServer( postmaster.getHost() ) ) {
  +        if (!isLocalServer(postmaster.getHost())) {
               StringBuffer warnBuffer
  -                    = new StringBuffer( 320 )
  -                    .append( "The specified postmaster address ( " )
  -                    .append( postmaster )
  -                    .append( " ) is not a local address.  This is not necessarily a problem, but it does mean that emails addressed to the postmaster will be routed to another server.  For some configurations this may cause problems." );
  -            getLogger().warn( warnBuffer.toString() );
  +                = new StringBuffer(320)
  +                        .append("The specified postmaster address ( ")
  +                        .append(postmaster)
  +                        .append(" ) is not a local address.  This is not necessarily a problem, but it does mean that emails addressed to the postmaster will be routed to another server.  For some configurations this may cause problems.");
  +            getLogger().warn(warnBuffer.toString());
           }
   
  -        Configuration userNamesConf = conf.getChild( "usernames" );
  -        ignoreCase = userNamesConf.getAttributeAsBoolean( "ignoreCase", false );
  -        enableAliases = userNamesConf.getAttributeAsBoolean( "enableAliases", false );
  -        enableForwarding = userNamesConf.getAttributeAsBoolean( "enableForwarding", false );
  +        Configuration userNamesConf = conf.getChild("usernames");
  +        ignoreCase = userNamesConf.getAttributeAsBoolean("ignoreCase", false);
  +        enableAliases = userNamesConf.getAttributeAsBoolean("enableAliases", false);
  +        enableForwarding = userNamesConf.getAttributeAsBoolean("enableForwarding", false);
   
           //Get localusers
           try {
  -            localusers = ( UsersRepository ) usersStore.getRepository( "LocalUsers" );
  -        }
  -        catch ( Exception e ) {
  -            getLogger().error( "Cannot open private UserRepository" );
  +            localusers = (UsersRepository) usersStore.getRepository("LocalUsers");
  +        } catch (Exception e) {
  +            getLogger().error("Cannot open private UserRepository");
               throw e;
           }
           //}
  -        compMgr.put( UsersRepository.ROLE, ( Component ) localusers );
  -        getLogger().info( "Local users repository opened" );
  +        compMgr.put( "org.apache.mailet.UsersRepository", (Component)localusers);
  +        getLogger().info("Local users repository opened");
   
           try {
               // Get storage config param
  @@ -391,35 +381,36 @@
               }
           }
           else {
  -            Configuration inboxConf = conf.getChild( "inboxRepository" );
  -            Configuration inboxRepConf = inboxConf.getChild( "repository" );
  +            Configuration inboxConf = conf.getChild("inboxRepository");
  +            Configuration inboxRepConf = inboxConf.getChild("repository");
               try {
  -                localInbox = ( MailRepository ) mailstore.select( inboxRepConf );
  -            }
  -            catch ( Exception e ) {
  -                getLogger().error( "Cannot open private MailRepository" );
  +                localInbox = (MailRepository) mailstore.select(inboxRepConf);
  +            } catch (Exception e) {
  +                getLogger().error("Cannot open private MailRepository");
                   throw e;
               }
  -            inboxRootURL = inboxRepConf.getAttribute( "destinationURL" );
  +            inboxRootURL = inboxRepConf.getAttribute("destinationURL");
           }
  -        getLogger().info( "Private Repository LocalInbox opened" );
  +        getLogger().info("Private Repository LocalInbox opened");
   
           // Add this to comp
  -        compMgr.put( MailServer.ROLE, this );
  +        compMgr.put( MailServer.ROLE, this);
   
           spool = mailstore.getInboundSpool();
  -        if ( getLogger().isDebugEnabled() ) {
  -            getLogger().debug( "Got spool" );
  +        if (getLogger().isDebugEnabled()) {
  +            getLogger().debug("Got spool");
           }
   
           // For mailet engine provide MailetContext
           //compMgr.put("org.apache.mailet.MailetContext", this);
           // For AVALON aware mailets and matchers, we put the Component object as
           // an attribute
  -        attributes.put( Constants.AVALON_COMPONENT_MANAGER, compMgr );
   
  -        System.out.println( SOFTWARE_NAME_VERSION );
  -        getLogger().info( "JAMES ...init end" );
  +        //TODO NOT unless specifically required by conf
  +        attributes.put(Constants.AVALON_COMPONENT_MANAGER, compMgr);
  +
  +        System.out.println(SOFTWARE_NAME_VERSION);
  +        getLogger().info("JAMES ...init end");
       }
   
       /**
  @@ -430,15 +421,14 @@
        * @throws MessagingException if an exception is caught while placing the mail
        *                            on the spool
        */
  -    public void sendMail( MimeMessage message ) throws MessagingException
  -    {
  -        MailAddress sender = new MailAddress( ( InternetAddress ) message.getFrom()[0] );
  +    public void sendMail(MimeMessage message) throws MessagingException {
  +        MailAddress sender = new MailAddress((InternetAddress)message.getFrom()[0]);
           Collection recipients = new HashSet();
           Address addresses[] = message.getAllRecipients();
  -        for ( int i = 0; i < addresses.length; i++ ) {
  -            recipients.add( new MailAddress( ( InternetAddress ) addresses[i] ) );
  +        for (int i = 0; i < addresses.length; i++) {
  +            recipients.add(new MailAddress((InternetAddress)addresses[i]));
           }
  -        sendMail( sender, recipients, message );
  +        sendMail(sender, recipients, message);
       }
   
       /**
  @@ -451,10 +441,9 @@
        * @throws MessagingException if an exception is caught while placing the mail
        *                            on the spool
        */
  -    public void sendMail( MailAddress sender, Collection recipients, MimeMessage message )
  -            throws MessagingException
  -    {
  -        sendMail( sender, recipients, message, Mail.DEFAULT );
  +    public void sendMail(MailAddress sender, Collection recipients, MimeMessage message)
  +            throws MessagingException {
  +        sendMail(sender, recipients, message, Mail.DEFAULT);
       }
   
       /**
  @@ -468,12 +457,11 @@
        * @throws MessagingException if an exception is caught while placing the mail
        *                            on the spool
        */
  -    public void sendMail( MailAddress sender, Collection recipients, MimeMessage message, String state )
  -            throws MessagingException
  -    {
  -        MailImpl mail = new MailImpl( getId(), sender, recipients, message );
  -        mail.setState( state );
  -        sendMail( mail );
  +    public void sendMail(MailAddress sender, Collection recipients, MimeMessage message, String state)
  +            throws MessagingException {
  +        MailImpl mail = new MailImpl(getId(), sender, recipients, message);
  +        mail.setState(state);
  +        sendMail(mail);
       }
   
       /**
  @@ -486,18 +474,17 @@
        * @throws MessagingException if an exception is caught while placing the mail
        *                            on the spool
        */
  -    public void sendMail( MailAddress sender, Collection recipients, InputStream msg )
  -            throws MessagingException
  -    {
  +    public void sendMail(MailAddress sender, Collection recipients, InputStream msg)
  +            throws MessagingException {
           // parse headers
  -        MailHeaders headers = new MailHeaders( msg );
  +        MailHeaders headers = new MailHeaders(msg);
   
           // if headers do not contains minimum REQUIRED headers fields throw Exception
  -        if ( !headers.isValid() ) {
  -            throw new MessagingException( "Some REQURED header field is missing. Invalid Message" );
  +        if (!headers.isValid()) {
  +            throw new MessagingException("Some REQURED header field is missing. Invalid Message");
           }
  -        ByteArrayInputStream headersIn = new ByteArrayInputStream( headers.toByteArray() );
  -        sendMail( new MailImpl( getId(), sender, recipients, new SequenceInputStream( headersIn, msg ) ) );
  +        ByteArrayInputStream headersIn = new ByteArrayInputStream(headers.toByteArray());
  +        sendMail(new MailImpl(getId(), sender, recipients, new SequenceInputStream(headersIn, msg)));
       }
   
       /**
  @@ -508,27 +495,24 @@
        * @throws MessagingException if an exception is caught while placing the mail
        *                            on the spool
        */
  -    public void sendMail( Mail mail ) throws MessagingException
  -    {
  -        MailImpl mailimpl = ( MailImpl ) mail;
  +    public void sendMail(Mail mail) throws MessagingException {
  +
           try {
  -            spool.store( mailimpl );
  -        }
  -        catch ( Exception e ) {
  +            spool.store(mail);
  +        } catch (Exception e) {
               try {
  -                spool.remove( mailimpl );
  -            }
  -            catch ( Exception ignored ) {
  +                spool.remove(mail);
  +            } catch (Exception ignored) {
               }
  -            throw new MessagingException( "Exception spooling message: " + e.getMessage(), e );
  +            throw new MessagingException("Exception spooling message: " + e.getMessage(), e);
           }
  -        if ( getLogger().isDebugEnabled() ) {
  +        if (getLogger().isDebugEnabled()) {
               StringBuffer logBuffer =
  -                    new StringBuffer( 64 )
  -                    .append( "Mail " )
  -                    .append( mailimpl.getName() )
  -                    .append( " pushed in spool" );
  -            getLogger().debug( logBuffer.toString() );
  +                new StringBuffer(64)
  +                        .append("Mail ")
  +                        .append(mail.getName())
  +                        .append(" pushed in spool");
  +            getLogger().debug(logBuffer.toString());
           }
       }
   
  @@ -541,45 +525,42 @@
        *
        * @return the POP3 inbox for the user
        */
  -    public synchronized MailRepository getUserInbox( String userName )
  -    {
  -        MailRepository userInbox = ( MailRepository ) null;
  +    public synchronized MailRepository getUserInbox(String userName) {
  +        MailRepository userInbox = (MailRepository) null;
   
  -        userInbox = ( MailRepository ) mailboxes.get( userName );
  +        userInbox = (MailRepository) mailboxes.get(userName);
   
  -        if ( userInbox != null ) {
  +        if (userInbox != null) {
               return userInbox;
  -        }
  -        else if ( mailboxes.containsKey( userName ) ) {
  +        } else if (mailboxes.containsKey(userName)) {
               // we have a problem
  -            getLogger().error( "Null mailbox for non-null key" );
  -            throw new RuntimeException( "Error in getUserInbox." );
  -        }
  -        else {
  +            getLogger().error("Null mailbox for non-null key");
  +            throw new RuntimeException("Error in getUserInbox.");
  +        } else {
               // need mailbox object
  -            if ( getLogger().isDebugEnabled() ) {
  -                getLogger().debug( "Retrieving and caching inbox for " + userName );
  +            if (getLogger().isDebugEnabled()) {
  +                getLogger().debug("Retrieving and caching inbox for " + userName );
               }
               StringBuffer destinationBuffer =
  -                    new StringBuffer( 192 )
  -                    .append( inboxRootURL )
  -                    .append( userName )
  -                    .append( "/" );
  +                new StringBuffer(192)
  +                        .append(inboxRootURL)
  +                        .append(userName)
  +                        .append("/");
               String destination = destinationBuffer.toString();
               DefaultConfiguration mboxConf
  -                    = new DefaultConfiguration( "repository", "generated:AvalonFileRepository.compose()" );
  -            mboxConf.setAttribute( "destinationURL", destination );
  -            mboxConf.setAttribute( "type", "MAIL" );
  +                = new DefaultConfiguration("repository", "generated:AvalonFileRepository.compose()");
  +            mboxConf.setAttribute("destinationURL", destination);
  +            mboxConf.setAttribute("type", "MAIL");
               try {
  -                userInbox = ( MailRepository ) mailstore.select( mboxConf );
  -                mailboxes.put( userName, userInbox );
  -            }
  -            catch ( Exception e ) {
  +                userInbox = (MailRepository) mailstore.select(mboxConf);
  +                mailboxes.put(userName, userInbox);
  +            } catch (Exception e) {
                   e.printStackTrace();
  -                if ( getLogger().isErrorEnabled() ) {
  -                    getLogger().error( "Cannot open user Mailbox" + e );
  +                if (getLogger().isErrorEnabled())
  +                {
  +                    getLogger().error("Cannot open user Mailbox" + e);
                   }
  -                throw new RuntimeException( "Error in getUserInbox." + e );
  +                throw new RuntimeException("Error in getUserInbox." + e);
               }
               return userInbox;
           }
  @@ -590,18 +571,17 @@
        *
        * @return a new mail id
        */
  -    public String getId()
  -    {
  +    public String getId() {
           long localCount = -1;
  -        synchronized ( James.class ) {
  +        synchronized (James.class) {
               localCount = count++;
           }
           StringBuffer idBuffer =
  -                new StringBuffer( 64 )
  -                .append( "Mail" )
  -                .append( System.currentTimeMillis() )
  -                .append( "-" )
  -                .append( count++ );
  +            new StringBuffer(64)
  +                    .append("Mail")
  +                    .append(System.currentTimeMillis())
  +                    .append("-")
  +                    .append(count++);
           return idBuffer.toString();
       }
   
  @@ -611,12 +591,11 @@
        *
        * @param args the command line arguments
        */
  -    public static void main( String[] args )
  -    {
  -        System.out.println( "ERROR!" );
  -        System.out.println( "Cannot execute James as a stand alone application." );
  -        System.out.println( "To run James, you need to have the Avalon framework installed." );
  -        System.out.println( "Please refer to the Readme file to know how to run James." );
  +    public static void main(String[] args) {
  +        System.out.println("ERROR!");
  +        System.out.println("Cannot execute James as a stand alone application.");
  +        System.out.println("To run James, you need to have the Avalon framework installed.");
  +        System.out.println("Please refer to the Readme file to know how to run James.");
       }
   
       //Methods for MailetContext
  @@ -628,39 +607,33 @@
        *
        * @param host
        */
  -    public Collection getMailServers( String host )
  -    {
  +    public Collection getMailServers(String host) {
           DNSServer dnsServer = null;
           try {
  -            dnsServer = ( DNSServer ) compMgr.lookup( DNSServer.ROLE );
  -        }
  -        catch ( final ComponentException cme ) {
  -            getLogger().error( "Fatal configuration error - DNS Servers lost!", cme );
  -            throw new RuntimeException( "Fatal configuration error - DNS Servers lost!" );
  +            dnsServer = (DNSServer) compMgr.lookup( DNSServer.ROLE );
  +        } catch ( final ComponentException cme ) {
  +            getLogger().error("Fatal configuration error - DNS Servers lost!", cme );
  +            throw new RuntimeException("Fatal configuration error - DNS Servers lost!");
           }
  -        return dnsServer.findMXRecords( host );
  +        return dnsServer.findMXRecords(host);
       }
   
  -    public Object getAttribute( String key )
  -    {
  -        return attributes.get( key );
  +    public Object getAttribute(String key) {
  +        return attributes.get(key);
       }
   
  -    public void setAttribute( String key, Object object )
  -    {
  -        attributes.put( key, object );
  +    public void setAttribute(String key, Object object) {
  +        attributes.put(key, object);
       }
   
  -    public void removeAttribute( String key )
  -    {
  -        attributes.remove( key );
  +    public void removeAttribute(String key) {
  +        attributes.remove(key);
       }
   
  -    public Iterator getAttributeNames()
  -    {
  +    public Iterator getAttributeNames() {
           Vector names = new Vector();
  -        for ( Enumeration e = attributes.keys(); e.hasMoreElements(); ) {
  -            names.add( e.nextElement() );
  +        for (Enumeration e = attributes.keys(); e.hasMoreElements(); ) {
  +            names.add(e.nextElement());
           }
           return names.iterator();
       }
  @@ -672,9 +645,8 @@
        * Reply-To or From header. This will send the bounce with the server's
        * postmaster as the sender.
        */
  -    public void bounce( Mail mail, String message ) throws MessagingException
  -    {
  -        bounce( mail, message, getPostmaster() );
  +    public void bounce(Mail mail, String message) throws MessagingException {
  +        bounce(mail, message, getPostmaster());
       }
   
       /**
  @@ -683,47 +655,45 @@
        * this is different than a mail-client's reply, which would use the
        * Reply-To or From header.
        */
  -    public void bounce( Mail mail, String message, MailAddress bouncer ) throws MessagingException
  -    {
  +    public void bounce(Mail mail, String message, MailAddress bouncer) throws MessagingException {
           MimeMessage orig = mail.getMessage();
           //Create the reply message
  -        MimeMessage reply = ( MimeMessage ) orig.reply( false );
  +        MimeMessage reply = (MimeMessage) orig.reply(false);
           //If there is a Return-Path header,
  -        if ( orig.getHeader( RFC2822Headers.RETURN_PATH ) != null ) {
  +        if (orig.getHeader(RFC2822Headers.RETURN_PATH) != null) {
               //Return the message to that address, not to the Reply-To address
  -            reply.setRecipient( MimeMessage.RecipientType.TO, new InternetAddress( orig.getHeader( RFC2822Headers.RETURN_PATH )[0] ) );
  +            reply.setRecipient(MimeMessage.RecipientType.TO, new InternetAddress(orig.getHeader(RFC2822Headers.RETURN_PATH)[0]));
           }
           //Create the list of recipients in our MailAddress format
           Collection recipients = new HashSet();
           Address addresses[] = reply.getAllRecipients();
  -        for ( int i = 0; i < addresses.length; i++ ) {
  -            recipients.add( new MailAddress( ( InternetAddress ) addresses[i] ) );
  +        for (int i = 0; i < addresses.length; i++) {
  +            recipients.add(new MailAddress((InternetAddress)addresses[i]));
           }
           //Change the sender...
  -        reply.setFrom( bouncer.toInternetAddress() );
  +        reply.setFrom(bouncer.toInternetAddress());
           try {
               //Create the message body
               MimeMultipart multipart = new MimeMultipart();
               //Add message as the first mime body part
               MimeBodyPart part = new MimeBodyPart();
  -            part.setContent( message, "text/plain" );
  -            part.setHeader( RFC2822Headers.CONTENT_TYPE, "text/plain" );
  -            multipart.addBodyPart( part );
  +            part.setContent(message, "text/plain");
  +            part.setHeader(RFC2822Headers.CONTENT_TYPE, "text/plain");
  +            multipart.addBodyPart(part);
   
               //Add the original message as the second mime body part
               part = new MimeBodyPart();
  -            part.setContent( orig.getContent(), orig.getContentType() );
  -            part.setHeader( RFC2822Headers.CONTENT_TYPE, orig.getContentType() );
  -            multipart.addBodyPart( part );
  -            reply.setHeader( RFC2822Headers.DATE, rfc822DateFormat.format( new Date() ) );
  -            reply.setContent( multipart );
  -            reply.setHeader( RFC2822Headers.CONTENT_TYPE, multipart.getContentType() );
  -        }
  -        catch ( IOException ioe ) {
  -            throw new MessagingException( "Unable to create multipart body", ioe );
  +            part.setContent(orig.getContent(), orig.getContentType());
  +            part.setHeader(RFC2822Headers.CONTENT_TYPE, orig.getContentType());
  +            multipart.addBodyPart(part);
  +            reply.setHeader(RFC2822Headers.DATE, rfc822DateFormat.format(new Date()));
  +            reply.setContent(multipart);
  +            reply.setHeader(RFC2822Headers.CONTENT_TYPE, multipart.getContentType());
  +        } catch (IOException ioe) {
  +            throw new MessagingException("Unable to create multipart body", ioe);
           }
           //Send it off...
  -        sendMail( bouncer, recipients, reply );
  +        sendMail(bouncer, recipients, reply);
       }
   
       /**
  @@ -733,13 +703,11 @@
        *
        * @return whether the account has a local inbox
        */
  -    public boolean isLocalUser( String name )
  -    {
  -        if ( ignoreCase ) {
  -            return localusers.containsCaseInsensitive( name );
  -        }
  -        else {
  -            return localusers.contains( name );
  +    public boolean isLocalUser(String name) {
  +        if (ignoreCase) {
  +            return localusers.containsCaseInsensitive(name);
  +        } else {
  +            return localusers.contains(name);
           }
       }
   
  @@ -748,76 +716,72 @@
        *
        * @return the <code>MailAddress</code> for the postmaster
        */
  -    public MailAddress getPostmaster()
  -    {
  +    public MailAddress getPostmaster() {
           return postmaster;
       }
   
  -    public void storeMail( MailAddress sender, MailAddress recipient, MimeMessage message )
  -            throws MessagingException
  -    {
  +    public void storeMail(MailAddress sender, MailAddress recipient, MimeMessage message)
  +        throws MessagingException {
           String username;
  -        if ( recipient == null ) {
  -            throw new IllegalArgumentException( "Recipient for mail to be spooled cannot be null." );
  +        if (recipient == null) {
  +            throw new IllegalArgumentException("Recipient for mail to be spooled cannot be null.");
           }
  -        if ( message == null ) {
  -            throw new IllegalArgumentException( "Mail message to be spooled cannot be null." );
  +        if (message == null) {
  +            throw new IllegalArgumentException("Mail message to be spooled cannot be null.");
           }
  -        if ( ignoreCase ) {
  +        if (ignoreCase) {
               String originalUsername = recipient.getUser();
  -            username = localusers.getRealName( originalUsername );
  -            if ( username == null ) {
  +            username = localusers.getRealName(originalUsername);
  +            if (username == null) {
                   StringBuffer errorBuffer =
  -                        new StringBuffer( 128 )
  -                        .append( "The inbox for user " )
  -                        .append( originalUsername )
  -                        .append( " was not found on this server." );
  -                throw new MessagingException( errorBuffer.toString() );
  +                    new StringBuffer(128)
  +                        .append("The inbox for user ")
  +                        .append(originalUsername)
  +                        .append(" was not found on this server.");
  +                throw new MessagingException(errorBuffer.toString());
               }
  -        }
  -        else {
  +        } else {
               username = recipient.getUser();
           }
           JamesUser user;
  -        if ( enableAliases || enableForwarding ) {
  -            user = ( JamesUser ) localusers.getUserByName( username );
  -            if ( enableAliases && user.getAliasing() ) {
  +        if (enableAliases || enableForwarding) {
  +            user = (JamesUser) localusers.getUserByName(username);
  +            if (enableAliases && user.getAliasing()) {
                   username = user.getAlias();
               }
               // Forwarding takes precedence over local aliases
  -            if ( enableForwarding && user.getForwarding() ) {
  +            if (enableForwarding && user.getForwarding()) {
                   MailAddress forwardTo = user.getForwardingDestination();
  -                if ( forwardTo == null ) {
  +                if (forwardTo == null) {
                       StringBuffer errorBuffer =
  -                            new StringBuffer( 128 )
  -                            .append( "Forwarding was enabled for " )
  -                            .append( username )
  -                            .append( " but no forwarding address was set for this account." );
  -                    throw new MessagingException( errorBuffer.toString() );
  +                        new StringBuffer(128)
  +                            .append("Forwarding was enabled for ")
  +                            .append(username)
  +                            .append(" but no forwarding address was set for this account.");
  +                    throw new MessagingException(errorBuffer.toString());
                   }
                   Collection recipients = new HashSet();
  -                recipients.add( forwardTo );
  +                recipients.add(forwardTo);
                   try {
  -                    sendMail( sender, recipients, message );
  -                    if ( getLogger().isInfoEnabled() ) {
  +                    sendMail(sender, recipients, message);
  +                    if (getLogger().isInfoEnabled()) {
                           StringBuffer logBuffer =
  -                                new StringBuffer( 128 )
  -                                .append( "Mail for " )
  -                                .append( username )
  -                                .append( " forwarded to " )
  -                                .append( forwardTo.toString() );
  -                        getLogger().info( logBuffer.toString() );
  +                            new StringBuffer(128)
  +                                    .append("Mail for ")
  +                                    .append(username)
  +                                    .append(" forwarded to ")
  +                                    .append(forwardTo.toString());
  +                        getLogger().info(logBuffer.toString());
                       }
                       return;
  -                }
  -                catch ( MessagingException me ) {
  -                    if ( getLogger().isErrorEnabled() ) {
  +                } catch (MessagingException me) {
  +                    if (getLogger().isErrorEnabled()) {
                           StringBuffer logBuffer =
  -                                new StringBuffer( 128 )
  -                                .append( "Error forwarding mail to " )
  -                                .append( forwardTo.toString() )
  -                                .append( "attempting local delivery" );
  -                        getLogger().error( logBuffer.toString() );
  +                            new StringBuffer(128)
  +                                    .append("Error forwarding mail to ")
  +                                    .append(forwardTo.toString())
  +                                    .append("attempting local delivery");
  +                        getLogger().error(logBuffer.toString());
                       }
                       throw me;
                   }
  @@ -847,18 +811,18 @@
           }
           else {
               Collection recipients = new HashSet();
  -            recipients.add( recipient );
  -            MailImpl mailImpl = new MailImpl( getId(), sender, recipients, message );
  -            MailRepository userInbox = getUserInbox( username );
  -            if ( userInbox == null ) {
  +            recipients.add(recipient);
  +            MailImpl mailImpl = new MailImpl(getId(), sender, recipients, message);
  +            MailRepository userInbox = getUserInbox(username);
  +            if (userInbox == null) {
                   StringBuffer errorBuffer =
  -                        new StringBuffer( 128 )
  -                        .append( "The inbox for user " )
  -                        .append( username )
  -                        .append( " was not found on this server." );
  -                throw new MessagingException( errorBuffer.toString() );
  +                    new StringBuffer(128)
  +                        .append("The inbox for user ")
  +                        .append(username)
  +                        .append(" was not found on this server.");
  +                throw new MessagingException(errorBuffer.toString());
               }
  -            userInbox.store( mailImpl );
  +            userInbox.store(mailImpl);
           }
       }
   
  @@ -867,8 +831,7 @@
        *
        * @return the major vesion number for the server
        */
  -    public int getMajorVersion()
  -    {
  +    public int getMajorVersion() {
           return 2;
       }
   
  @@ -877,8 +840,7 @@
        *
        * @return the minor vesion number for the server
        */
  -    public int getMinorVersion()
  -    {
  +    public int getMinorVersion() {
           return 1;
       }
   
  @@ -889,9 +851,8 @@
        * @param serverName the name of the server to check
        * @return whether the server is local
        */
  -    public boolean isLocalServer( final String serverName )
  -    {
  -        return serverNames.contains( serverName.toLowerCase( Locale.US ) );
  +    public boolean isLocalServer( final String serverName ) {
  +        return serverNames.contains(serverName.toLowerCase(Locale.US));
       }
   
       /**
  @@ -899,8 +860,7 @@
        *
        * @return the type of the server
        */
  -    public String getServerInfo()
  -    {
  +    public String getServerInfo() {
           return "Apache Jakarta JAMES";
       }
   
  @@ -909,10 +869,9 @@
        *
        * @return the logger for the Mailet API
        */
  -    private Logger getMailetLogger()
  -    {
  -        if ( mailetLogger == null ) {
  -            mailetLogger = getLogger().getChildLogger( "Mailet" );
  +    private Logger getMailetLogger() {
  +        if (mailetLogger == null) {
  +            mailetLogger = getLogger().getChildLogger("Mailet");
           }
           return mailetLogger;
       }
  @@ -922,9 +881,8 @@
        *
        * @param message the message to pass to the Mailet logger
        */
  -    public void log( String message )
  -    {
  -        getMailetLogger().info( message );
  +    public void log(String message) {
  +        getMailetLogger().info(message);
       }
   
       /**
  @@ -933,9 +891,8 @@
        * @param message the message to pass to the Mailet logger
        * @param t the <code>Throwable</code> to be logged
        */
  -    public void log( String message, Throwable t )
  -    {
  -        getMailetLogger().info( message, t );
  +    public void log(String message, Throwable t) {
  +        getMailetLogger().info(message,t);
       }
   
       /**
  @@ -945,17 +902,16 @@
        * access control lists.
        *
        * @param userName String representing user name, that is the portion of
  -     * an email address before the '@<domain>'.
  +     * an email address before the '@&lt;domain&gt;'.
        * @param password String plaintext password
        * @return boolean true if user added succesfully, else false.
        */
  -    public boolean addUser( String userName, String password )
  -    {
  +    public boolean addUser(String userName, String password) {
           boolean success;
  -        DefaultJamesUser user = new DefaultJamesUser( userName, "SHA" );
  -        user.setPassword( password );
  +        DefaultJamesUser user = new DefaultJamesUser(userName, "SHA");
  +        user.setPassword(password);
           user.initialize();
  -        success = localusers.addUser( user );
  +        success = localusers.addUser(user);
           if ( useIMAPstorage && success ) {
               try {
                   imapHost.createPrivateMailAccount( user );
  @@ -965,6 +921,53 @@
                   return false;
               }
           }
  +
           return success;
       }
  +
  +
  +    /**
  +     * @see org.apache.mailet.MailetContext#getMailSpool(String)
  +     */
  +    public SpoolRepository getMailSpool(String specificationURL) throws MessagingException {
  +    return (SpoolRepository) getRepository(specificationURL,SpoolRepository.SPOOL);
  +    }
  +
  +        private MailRepository getRepository(String specificationURL,String storeType)throws MessagingException {
  +        if (specificationURL == null) {
  +            throw new MessagingException("Failed to retrieve Store component because specificationURL is null" );
  +        }
  +
  +        try {
  +
  +            DefaultConfiguration spoolConf
  +                = new DefaultConfiguration("repository", "generated by Context");
  +            spoolConf.setAttribute("destinationURL", specificationURL);
  +            spoolConf.setAttribute("type", storeType);
  +            return (MailRepository) mailstore.select(spoolConf);
  +        } catch (ComponentException cnfe) {
  +            log("Failed to retrieve Store component:" + cnfe.getMessage());
  +            throw new MessagingException("Failed to retrieve Store component:"+specificationURL+" because "+cnfe.getMessage(),cnfe );
  +        } catch (Exception e) {
  +            log("Failed to retrieve Store component:" + e.getMessage());
  +            throw new MessagingException("Failed to retrieve Store component:"+specificationURL+" because "+e.getMessage(),e );
  +        }
  +    }
  +
  +    /**
  +     * @see org.apache.mailet.MailetContext#getMailRepository(String)
  +     */
  +    public MailRepository getMailRepository(String specificationURL) throws MessagingException {
  +        return getRepository(specificationURL,MailRepository.MAIL);
  +    }
  +
  +    /**
  +     * @see org.apache.mailet.MailetContext#getUserRepository(String)
  +     */
  +    public UsersRepository getUserRepository(String respositoryName) throws MessagingException {
  +        return usersStore.getRepository(respositoryName);
  +    }
  +
  +
  +
   }
  
  
  
  1.5       +3 -3      jakarta-james/proposals/imap2/java/org/apache/james/imapserver/ImapHandler.java
  
  Index: ImapHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/proposals/imap2/java/org/apache/james/imapserver/ImapHandler.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ImapHandler.java	3 Dec 2002 14:00:11 -0000	1.4
  +++ ImapHandler.java	27 Jan 2003 04:05:09 -0000	1.5
  @@ -18,9 +18,9 @@
   import org.apache.james.imapserver.commands.ImapCommandFactory;
   import org.apache.james.imapserver.commands.CommandParser;
   import org.apache.james.imapserver.store.ImapMailbox;
  -import org.apache.james.services.MailRepository;
  -import org.apache.james.services.User;
  -import org.apache.james.services.UsersRepository;
  +import org.apache.mailet.MailRepository;
  +import org.apache.mailet.User;
  +import org.apache.mailet.UsersRepository;
   import org.apache.james.util.InternetPrintWriter;
   import org.apache.james.util.watchdog.Watchdog;
   import org.apache.james.util.watchdog.WatchdogTarget;
  
  
  
  1.2       +1 -1      jakarta-james/proposals/imap2/java/org/apache/james/imapserver/ImapHandlerConfigurationData.java
  
  Index: ImapHandlerConfigurationData.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/proposals/imap2/java/org/apache/james/imapserver/ImapHandlerConfigurationData.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ImapHandlerConfigurationData.java	22 Nov 2002 02:09:50 -0000	1.1
  +++ ImapHandlerConfigurationData.java	27 Jan 2003 04:05:09 -0000	1.2
  @@ -8,7 +8,7 @@
   package org.apache.james.imapserver;
   
   import org.apache.james.services.MailServer;
  -import org.apache.james.services.UsersRepository;
  +import org.apache.mailet.UsersRepository;
   
   /**
    * Provides a number of server-wide constant values to the
  
  
  
  1.4       +2 -2      jakarta-james/proposals/imap2/java/org/apache/james/imapserver/ImapHost.java
  
  Index: ImapHost.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/proposals/imap2/java/org/apache/james/imapserver/ImapHost.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ImapHost.java	3 Dec 2002 14:00:11 -0000	1.3
  +++ ImapHost.java	27 Jan 2003 04:05:09 -0000	1.4
  @@ -7,7 +7,7 @@
    */
   package org.apache.james.imapserver;
   
  -import org.apache.james.services.User;
  +import org.apache.mailet.User;
   import org.apache.james.imapserver.store.ImapMailbox;
   import org.apache.james.imapserver.store.MailboxException;
   
  
  
  
  1.2       +1 -1      jakarta-james/proposals/imap2/java/org/apache/james/imapserver/ImapServer.java
  
  Index: ImapServer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/proposals/imap2/java/org/apache/james/imapserver/ImapServer.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ImapServer.java	22 Nov 2002 02:09:50 -0000	1.1
  +++ ImapServer.java	27 Jan 2003 04:05:09 -0000	1.2
  @@ -22,7 +22,7 @@
   import org.apache.avalon.framework.logger.LogEnabled;
   import org.apache.james.core.AbstractJamesService;
   import org.apache.james.services.MailServer;
  -import org.apache.james.services.UsersRepository;
  +import org.apache.mailet.UsersRepository;
   import org.apache.james.services.UsersStore;
   import org.apache.james.util.watchdog.Watchdog;
   import org.apache.james.util.watchdog.WatchdogFactory;
  
  
  
  1.3       +3 -3      jakarta-james/proposals/imap2/java/org/apache/james/imapserver/ImapSession.java
  
  Index: ImapSession.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/proposals/imap2/java/org/apache/james/imapserver/ImapSession.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ImapSession.java	26 Nov 2002 14:53:47 -0000	1.2
  +++ ImapSession.java	27 Jan 2003 04:05:09 -0000	1.3
  @@ -8,8 +8,8 @@
   package org.apache.james.imapserver;
   
   import org.apache.avalon.framework.logger.Logger;
  -import org.apache.james.services.User;
  -import org.apache.james.services.UsersRepository;
  +import org.apache.mailet.User;
  +import org.apache.mailet.UsersRepository;
   import org.apache.james.imapserver.store.ImapMailbox;
   
   /**
  
  
  
  1.2       +3 -3      jakarta-james/proposals/imap2/java/org/apache/james/imapserver/ImapSessionImpl.java
  
  Index: ImapSessionImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/proposals/imap2/java/org/apache/james/imapserver/ImapSessionImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ImapSessionImpl.java	26 Nov 2002 14:53:47 -0000	1.1
  +++ ImapSessionImpl.java	27 Jan 2003 04:05:09 -0000	1.2
  @@ -9,8 +9,8 @@
   
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
   import org.apache.avalon.framework.logger.Logger;
  -import org.apache.james.services.User;
  -import org.apache.james.services.UsersRepository;
  +import org.apache.mailet.User;
  +import org.apache.mailet.UsersRepository;
   import org.apache.james.imapserver.store.ImapMailbox;
   
   /**
  
  
  
  1.6       +2 -2      jakarta-james/proposals/imap2/java/org/apache/james/imapserver/JamesImapHost.java
  
  Index: JamesImapHost.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/proposals/imap2/java/org/apache/james/imapserver/JamesImapHost.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- JamesImapHost.java	4 Dec 2002 06:06:44 -0000	1.5
  +++ JamesImapHost.java	27 Jan 2003 04:05:09 -0000	1.6
  @@ -7,7 +7,7 @@
    */
   package org.apache.james.imapserver;
   
  -import org.apache.james.services.User;
  +import org.apache.mailet.User;
   import org.apache.james.imapserver.store.ImapStore;
   import org.apache.james.imapserver.store.InMemoryStore;
   import org.apache.james.imapserver.store.ImapMailbox;
  
  
  
  1.4       +2 -2      jakarta-james/proposals/imap2/java/org/apache/james/imapserver/commands/LoginCommand.java
  
  Index: LoginCommand.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/proposals/imap2/java/org/apache/james/imapserver/commands/LoginCommand.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- LoginCommand.java	26 Nov 2002 14:53:48 -0000	1.3
  +++ LoginCommand.java	27 Jan 2003 04:05:09 -0000	1.4
  @@ -11,7 +11,7 @@
   import org.apache.james.imapserver.ImapResponse;
   import org.apache.james.imapserver.ImapSession;
   import org.apache.james.imapserver.ProtocolException;
  -import org.apache.james.services.User;
  +import org.apache.mailet.User;
   
   /**
    * Handles processeing for the LOGIN imap command.
  
  
  
  1.5       +2 -2      jakarta-james/proposals/imap2/java/org/apache/james/imapserver/store/ImapMailbox.java
  
  Index: ImapMailbox.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/proposals/imap2/java/org/apache/james/imapserver/store/ImapMailbox.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ImapMailbox.java	3 Dec 2002 14:00:12 -0000	1.4
  +++ ImapMailbox.java	27 Jan 2003 04:05:09 -0000	1.5
  @@ -7,7 +7,7 @@
    */
   package org.apache.james.imapserver.store;
   
  -import org.apache.james.services.MailRepository;
  +import org.apache.mailet.MailRepository;
   import org.apache.james.core.MailImpl;
   
   import javax.mail.internet.MimeMessage;
  
  
  
  1.2       +1 -1      jakarta-james/proposals/imap2/java/org/apache/james/imapserver/store/SimpleMessageAttributes.java
  
  Index: SimpleMessageAttributes.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/proposals/imap2/java/org/apache/james/imapserver/store/SimpleMessageAttributes.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SimpleMessageAttributes.java	3 Dec 2002 14:00:12 -0000	1.1
  +++ SimpleMessageAttributes.java	27 Jan 2003 04:05:09 -0000	1.2
  @@ -8,7 +8,7 @@
   package org.apache.james.imapserver.store;
   
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
  -import org.apache.james.util.RFC822DateFormat;
  +import org.apache.mailet.dates.RFC822DateFormat;
   import org.apache.mailet.MailAddress;
   
   import javax.mail.BodyPart;
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>