Author: norman
Date: Thu Jan 20 12:50:08 2011
New Revision: 1061275
URL: http://svn.apache.org/viewvc?rev=1061275&view=rev
Log:
Add generics. See MAILET-32
Modified:
james/mailet/api/trunk/pom.xml
james/mailet/api/trunk/src/main/java/org/apache/mailet/Mail.java
james/mailet/api/trunk/src/main/java/org/apache/mailet/MailetConfig.java
james/mailet/api/trunk/src/main/java/org/apache/mailet/MailetContext.java
james/mailet/api/trunk/src/main/java/org/apache/mailet/Matcher.java
Modified: james/mailet/api/trunk/pom.xml
URL:
http://svn.apache.org/viewvc/james/mailet/api/trunk/pom.xml?rev=1061275&r1=1061274&r2=1061275&view=diff
==============================================================================
--- james/mailet/api/trunk/pom.xml (original)
+++ james/mailet/api/trunk/pom.xml Thu Jan 20 12:50:08 2011
@@ -100,8 +100,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<optimize>true</optimize>
- <source>1.4</source>
- <target>1.4</target>
+ <source>1.5</source>
+ <target>1.5</target>
</configuration>
</plugin>
<plugin>
Modified: james/mailet/api/trunk/src/main/java/org/apache/mailet/Mail.java
URL:
http://svn.apache.org/viewvc/james/mailet/api/trunk/src/main/java/org/apache/mailet/Mail.java?rev=1061275&r1=1061274&r2=1061275&view=diff
==============================================================================
--- james/mailet/api/trunk/src/main/java/org/apache/mailet/Mail.java (original)
+++ james/mailet/api/trunk/src/main/java/org/apache/mailet/Mail.java Thu Jan 20
12:50:08 2011
@@ -100,7 +100,7 @@ public interface Mail extends Serializab
*
* @return a Collection of MailAddress objects that are recipients of this
message
*/
- Collection getRecipients();
+ Collection<String> getRecipients();
/**
* Sets the message recipients as a Collection of MailAddress objects.
@@ -108,7 +108,7 @@ public interface Mail extends Serializab
* @param recipients the message recipients as a Collection of MailAddress
Objects
* @since Mailet API v2.4
*/
- void setRecipients(Collection recipients);
+ void setRecipients(Collection<String> recipients);
/**
* Returns the sender of the message, as specified by the SMTP "MAIL FROM"
command,
@@ -187,7 +187,7 @@ public interface Mail extends Serializab
* @return an Iterator (of Strings) over all attribute names
* @since Mailet API v2.1
*/
- Iterator getAttributeNames();
+ Iterator<String> getAttributeNames();
/**
* Returns whether this Mail instance has any attributes set.
Modified:
james/mailet/api/trunk/src/main/java/org/apache/mailet/MailetConfig.java
URL:
http://svn.apache.org/viewvc/james/mailet/api/trunk/src/main/java/org/apache/mailet/MailetConfig.java?rev=1061275&r1=1061274&r2=1061275&view=diff
==============================================================================
--- james/mailet/api/trunk/src/main/java/org/apache/mailet/MailetConfig.java
(original)
+++ james/mailet/api/trunk/src/main/java/org/apache/mailet/MailetConfig.java
Thu Jan 20 12:50:08 2011
@@ -50,7 +50,7 @@ public interface MailetConfig {
* @return an Iterator of String objects containing the names of the
* mailet's initialization parameters
*/
- Iterator getInitParameterNames();
+ Iterator<String> getInitParameterNames();
/**
* Returns a reference to the MailetContext in which the mailet is
Modified:
james/mailet/api/trunk/src/main/java/org/apache/mailet/MailetContext.java
URL:
http://svn.apache.org/viewvc/james/mailet/api/trunk/src/main/java/org/apache/mailet/MailetContext.java?rev=1061275&r1=1061274&r2=1061275&view=diff
==============================================================================
--- james/mailet/api/trunk/src/main/java/org/apache/mailet/MailetContext.java
(original)
+++ james/mailet/api/trunk/src/main/java/org/apache/mailet/MailetContext.java
Thu Jan 20 12:50:08 2011
@@ -96,7 +96,7 @@ public interface MailetContext {
*
* @return an Iterator (of Strings) over all attribute names
*/
- Iterator getAttributeNames();
+ Iterator<String> getAttributeNames();
/**
* Returns the value of the named mailet context attribute,
@@ -211,7 +211,7 @@ public interface MailetContext {
* @param domain the domain name whose mail handling hosts are requested
* @return the sorted mail-handling hostnames for the domain
*/
- Collection getMailServers(String domain);
+ Collection<String> getMailServers(String domain);
/**
* Returns the SMTP host addresses specified as mail handlers for
@@ -226,7 +226,7 @@ public interface MailetContext {
* @return an Iterator over HostAddress, in proper order of priority, or
* an empty iterator if no hosts are found
*/
- Iterator getSMTPHostAddresses(String domain);
+ Iterator<HostAddress> getSMTPHostAddresses(String domain);
/**
* Sends an outgoing message to the top of this mailet container's root
queue.
@@ -250,7 +250,7 @@ public interface MailetContext {
* @param message the message to send
* @throws MessagingException if an error occurs accessing or sending the
message
*/
- void sendMail(MailAddress sender, Collection recipients, MimeMessage
message)
+ void sendMail(MailAddress sender, Collection<MailAddress> recipients,
MimeMessage message)
throws MessagingException;
/**
@@ -264,7 +264,7 @@ public interface MailetContext {
* which the message will be queued
* @throws MessagingException if an error occurs accessing or sending the
message
*/
- void sendMail(MailAddress sender, Collection recipients, MimeMessage
message, String state)
+ void sendMail(MailAddress sender, Collection<MailAddress> recipients,
MimeMessage message, String state)
throws MessagingException;
/**
Modified: james/mailet/api/trunk/src/main/java/org/apache/mailet/Matcher.java
URL:
http://svn.apache.org/viewvc/james/mailet/api/trunk/src/main/java/org/apache/mailet/Matcher.java?rev=1061275&r1=1061274&r2=1061275&view=diff
==============================================================================
--- james/mailet/api/trunk/src/main/java/org/apache/mailet/Matcher.java
(original)
+++ james/mailet/api/trunk/src/main/java/org/apache/mailet/Matcher.java Thu Jan
20 12:50:08 2011
@@ -86,7 +86,7 @@ public interface Matcher {
* @throws MessagingException if any error occurs which prevents the Mail
* matching from completing successfully
*/
- Collection match(Mail mail) throws MessagingException;
+ Collection<MailAddress> match(Mail mail) throws MessagingException;
/**
* Destroys this Matcher.