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 do...@apache.org on 2001/03/05 16:03:05 UTC
cvs commit: jakarta-james/src/org/apache/james/services UsersRepository.java SpoolRepository.java MailServer.java MailRepository.java
donaldp 01/03/05 07:03:04
Modified: src/org/apache/james/services UsersRepository.java
SpoolRepository.java MailServer.java
MailRepository.java
Log:
Made James conform to the JLS spec closer.
Did this by removing any structures that are "strongly discouraged".
Revision Changes Path
1.3 +8 -8 jakarta-james/src/org/apache/james/services/UsersRepository.java
Index: UsersRepository.java
===================================================================
RCS file: /home/cvs/jakarta-james/src/org/apache/james/services/UsersRepository.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- UsersRepository.java 2001/02/03 18:21:28 1.2
+++ UsersRepository.java 2001/03/05 15:02:46 1.3
@@ -21,46 +21,46 @@
*/
public interface UsersRepository {
- public final static String USER = "USER";
+ String USER = "USER";
/**
* Adds a user to the repository with the specified attributes. In current
* implementations, the Object attributes is generally a String password.
*/
- public void addUser(String name, Object attributes);
+ void addUser(String name, Object attributes);
/**
* Gets the attribute for a user. Not clear on behavior.
*/
- public Object getAttributes(String name);
+ Object getAttributes(String name);
/**
* Removes a user from the repository
*/
- public void removeUser(String name);
+ void removeUser(String name);
/**
* Returns whether or not this user is in the repository
*/
- public boolean contains(String name);
+ boolean contains(String name);
/**
* Tests a user with the appropriate attributes. In current implementations,
* this typically means "check the password" where a String password is passed
* as the Object attributes.
*/
- public boolean test(String name, Object attributes);
+ boolean test(String name, Object attributes);
/**
* Returns a count of the users in the repository.
*/
- public int countUsers();
+ int countUsers();
/**
* List users in repository.
*
* @returns Iterator over a collection of Strings, each being one user in the repository.
*/
- public Iterator list();
+ Iterator list();
}
1.2 +3 -3 jakarta-james/src/org/apache/james/services/SpoolRepository.java
Index: SpoolRepository.java
===================================================================
RCS file: /home/cvs/jakarta-james/src/org/apache/james/services/SpoolRepository.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- SpoolRepository.java 2001/01/09 12:32:21 1.1
+++ SpoolRepository.java 2001/03/05 15:02:49 1.2
@@ -21,13 +21,13 @@
* Define a STREAM repository. Streams are stored in the specified
* destination.
*/
- public final static String SPOOL = "SPOOL";
+ String SPOOL = "SPOOL";
/**
* Returns the key for an arbitrarily selected mail deposited in this Repository.
* Useage: SpoolManager calls accept() to see if there are any unprocessed mails in the spool repository.
*/
- public String accept();
+ String accept();
/**
* Returns the key for an arbitrarily select mail depository in this Repositry that
@@ -36,5 +36,5 @@
* Useage: RemoteDeliverySpool calls accept() with some delay and should block until an
* unprocessed mail is available.
*/
- public String accept(long delay);
+ String accept(long delay);
}
1.3 +22 -26 jakarta-james/src/org/apache/james/services/MailServer.java
Index: MailServer.java
===================================================================
RCS file: /home/cvs/jakarta-james/src/org/apache/james/services/MailServer.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- MailServer.java 2001/02/03 18:21:28 1.2
+++ MailServer.java 2001/03/05 15:02:52 1.3
@@ -1,21 +1,18 @@
-/*****************************************************************************
- * Copyright (C) The Apache Software Foundation. All rights reserved. *
- * ------------------------------------------------------------------------- *
- * This software is published under the terms of the Apache Software License *
- * version 1.1, a copy of which has been included with this distribution in *
- * the LICENSE file. *
- *****************************************************************************/
-
+/*
+ * Copyright (C) The Apache Software Foundation. All rights reserved.
+ *
+ * This software is published under the terms of the Apache Software License
+ * version 1.1, a copy of which has been included with this distribution in
+ * the LICENSE file.
+ */
package org.apache.james.services;
-import javax.mail.internet.*;
-import javax.mail.MessagingException;
+import java.io.InputStream;
import java.util.Collection;
-
+import javax.mail.MessagingException;
+import javax.mail.internet.*;
import org.apache.mailet.Mail;
import org.apache.mailet.MailAddress;
-
-import java.io.InputStream;
import org.apache.phoenix.Service;
/**
@@ -24,31 +21,30 @@
* @author Federico Barbieri <sc...@pop.systemy.it>
* @author <a href="mailto:charles@benett1.demon.co.uk">Charles Benett</a>
*/
-
public interface MailServer extends Service {
/**
- * Reserved user name for teh mail delivery agent for multi-user mailboxes
+ * Reserved user name for the mail delivery agent for multi-user mailboxes
*/
- public static final String MDA = "JamesMDA";
+ String MDA = "JamesMDA";
/**
* Reserved user name meaning all users for multi-user mailboxes
*/
- public static final String ALL = "AllMailUsers";
+ String ALL = "AllMailUsers";
- public void sendMail(MailAddress sender, Collection recipients, MimeMessage msg)
- throws MessagingException;
+ void sendMail(MailAddress sender, Collection recipients, MimeMessage msg)
+ throws MessagingException;
- public void sendMail(MailAddress sender, Collection recipients, InputStream msg)
- throws MessagingException;
+ void sendMail(MailAddress sender, Collection recipients, InputStream msg)
+ throws MessagingException;
- public void sendMail(Mail mail)
- throws MessagingException;
+ void sendMail(Mail mail)
+ throws MessagingException;
- public MailRepository getUserInbox(String userName);
+ MailRepository getUserInbox(String userName);
- public String getId();
+ String getId();
- public boolean addUser(String userName, String password);
+ boolean addUser(String userName, String password);
}
1.3 +6 -9 jakarta-james/src/org/apache/james/services/MailRepository.java
Index: MailRepository.java
===================================================================
RCS file: /home/cvs/jakarta-james/src/org/apache/james/services/MailRepository.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- MailRepository.java 2001/02/03 18:21:27 1.2
+++ MailRepository.java 2001/03/05 15:02:54 1.3
@@ -24,37 +24,34 @@
* Define a MAIL repository. MAILS are stored in the specified
* destination.
*/
- public final static String MAIL = "MAIL";
+ String MAIL = "MAIL";
/**
* Stores a message in this repository. Shouldn't this return the key
* under which it is stored?
*/
- public void store(MailImpl mc) ;
+ void store( MailImpl mc );
-
/**
* List string keys of messages in repository.
*
*/
- public Iterator list();
-
+ Iterator list();
/**
* Retrieves a message given a key. At the moment, keys can be obtained
* from list() in superinterface Store.Repository
*/
- public MailImpl retrieve(String key);
+ MailImpl retrieve(String key);
/**
* Removes a specified message
*/
- public void remove(MailImpl mail);
+ void remove( MailImpl mail );
/**
* Removes a message identifed by key.
*/
- public void remove(String key) ;
-
+ void remove( String key );
}