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 no...@apache.org on 2004/04/02 08:39:12 UTC
cvs commit: james-server/src/java/org/apache/james/transport/mailets FromRepository.java
noel 2004/04/01 22:39:12
Modified: src/java/org/apache/james/transport/mailets Tag:
branch_2_1_fcs FromRepository.java
Log:
Explicitly respool to the root processor, or an optional user-specified processor
Revision Changes Path
No revision
No revision
1.1.2.4 +14 -6 james-server/src/java/org/apache/james/transport/mailets/Attic/FromRepository.java
Index: FromRepository.java
===================================================================
RCS file: /home/cvs/james-server/src/java/org/apache/james/transport/mailets/Attic/FromRepository.java,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -u -r1.1.2.3 -r1.1.2.4
--- FromRepository.java 15 Mar 2004 03:54:19 -0000 1.1.2.3
+++ FromRepository.java 2 Apr 2004 06:39:12 -0000 1.1.2.4
@@ -37,7 +37,8 @@
*
* <mailet match="RecipientIs=respool@localhost" class="FromRepository">
* <repositoryPath> <i>repository path</i> </repositoryPath>
- * <delete [true|<b>false</b>] </delete>
+ * <processor> <i>target processor</i> </repositoryPath>
+ * <delete&t; [true|<b>false</b>] </delete>
* </mailet>
*
* @version This is $Revision$
@@ -52,7 +53,7 @@
/**
* Whether this mailet should delete messages after being spooled
*/
- private boolean delete = true;
+ private boolean delete = false;
/**
* The path to the repository
@@ -60,14 +61,21 @@
private String repositoryPath;
/**
+ * The processor that will handle the re-spooled message(s)
+ */
+ private String processor;
+
+ /**
* Initialize the mailet, loading configuration information.
*/
public void init() {
repositoryPath = getInitParameter("repositoryPath");
+ processor = (getInitParameter("processor") == null) ? Mail.DEFAULT : getInitParameter("processor");
+
try {
- delete = (getInitParameter("delete") == null) ? true : new Boolean(getInitParameter("delete")).booleanValue();
+ delete = (getInitParameter("delete") == null) ? false : new Boolean(getInitParameter("delete")).booleanValue();
} catch (Exception e) {
- // Ignore exception, default to true
+ // Ignore exception, default to false
}
ComponentManager compMgr = (ComponentManager)getMailetContext().getAttribute(Constants.AVALON_COMPONENT_MANAGER);
@@ -83,7 +91,6 @@
} catch (Exception e) {
log("Failed to retrieve Store component:" + e.getMessage());
}
-
}
/**
@@ -114,6 +121,7 @@
*/
mail.setAttribute("FromRepository", Boolean.TRUE);
+ mail.setState(processor);
getMailetContext().sendMail(mail);
if (delete) processed.add(key);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org