Author: norman
Date: Wed Oct  7 10:27:49 2009
New Revision: 822646

URL: http://svn.apache.org/viewvc?rev=822646&view=rev
Log:
Use DefaultVirtualUserTable in VirtualUserTable Mailet as default. 
Throw an exception if the given virtuausertable could not be found
Improve syntax help of mappings commands

Modified:
    james/server/trunk/phoenix-deployment/src/conf/james-config.xml
    
james/server/trunk/remotemanager-function/src/main/java/org/apache/james/remotemanager/core/AddMappingCmdHandler.java
    
james/server/trunk/remotemanager-function/src/main/java/org/apache/james/remotemanager/core/RemoveMappingCmdHandler.java
    
james/server/trunk/spoolmanager-function/src/main/java/org/apache/james/transport/mailets/VirtualUserTable.java

Modified: james/server/trunk/phoenix-deployment/src/conf/james-config.xml
URL: 
http://svn.apache.org/viewvc/james/server/trunk/phoenix-deployment/src/conf/james-config.xml?rev=822646&r1=822645&r2=822646&view=diff
==============================================================================
--- james/server/trunk/phoenix-deployment/src/conf/james-config.xml (original)
+++ james/server/trunk/phoenix-deployment/src/conf/james-config.xml Wed Oct  7 
10:27:49 2009
@@ -545,8 +545,8 @@
          -->
 
 
-         <mailet match='All' class='VirtualUserTable'>
-
+         <mailet match="All" class="VirtualUserTable">
+             <virtualusertable>DefaultVirtualUserTable</virtualusertable>
          </mailet>
 
          <!-- Is the recipient is for a local account, deliver it locally -->

Modified: 
james/server/trunk/remotemanager-function/src/main/java/org/apache/james/remotemanager/core/AddMappingCmdHandler.java
URL: 
http://svn.apache.org/viewvc/james/server/trunk/remotemanager-function/src/main/java/org/apache/james/remotemanager/core/AddMappingCmdHandler.java?rev=822646&r1=822645&r2=822646&view=diff
==============================================================================
--- 
james/server/trunk/remotemanager-function/src/main/java/org/apache/james/remotemanager/core/AddMappingCmdHandler.java
 (original)
+++ 
james/server/trunk/remotemanager-function/src/main/java/org/apache/james/remotemanager/core/AddMappingCmdHandler.java
 Wed Oct  7 10:27:49 2009
@@ -30,7 +30,7 @@
 
 public class AddMappingCmdHandler extends AbstractMappingCmdHandler {
 
-    private CommandHelp help = new CommandHelp("addmapping 
([table=virtualusertablename]) [u...@domain] [mapping]","add mapping for the 
given emailaddress");
+    private CommandHelp help = new CommandHelp("addmapping 
([table=virtualusertablename]) [tou...@todomain] [fromMapping]","add mapping 
for the given emailaddress");
     /**
      * @see 
org.apache.james.remotemanager.CommandHandler#onCommand(org.apache.james.remotemanager.RemoteManagerSession,
      *      java.lang.String, java.lang.String)

Modified: 
james/server/trunk/remotemanager-function/src/main/java/org/apache/james/remotemanager/core/RemoveMappingCmdHandler.java
URL: 
http://svn.apache.org/viewvc/james/server/trunk/remotemanager-function/src/main/java/org/apache/james/remotemanager/core/RemoveMappingCmdHandler.java?rev=822646&r1=822645&r2=822646&view=diff
==============================================================================
--- 
james/server/trunk/remotemanager-function/src/main/java/org/apache/james/remotemanager/core/RemoveMappingCmdHandler.java
 (original)
+++ 
james/server/trunk/remotemanager-function/src/main/java/org/apache/james/remotemanager/core/RemoveMappingCmdHandler.java
 Wed Oct  7 10:27:49 2009
@@ -29,7 +29,7 @@
 import org.apache.james.remotemanager.RemoteManagerSession;
 
 public class RemoveMappingCmdHandler extends AbstractMappingCmdHandler {
-    private CommandHelp help = new CommandHelp("removemapping 
([table=virtualusertablename]) [u...@domain] [mapping]","remove mapping for the 
given emailaddress");
+    private CommandHelp help = new CommandHelp("removemapping 
([table=virtualusertablename]) [tou...@todomain] [fromMapping]","remove mapping 
for the given emailaddress");
 
     /**
      * @see 
org.apache.james.remotemanager.CommandHandler#onCommand(org.apache.james.remotemanager.RemoteManagerSession,

Modified: 
james/server/trunk/spoolmanager-function/src/main/java/org/apache/james/transport/mailets/VirtualUserTable.java
URL: 
http://svn.apache.org/viewvc/james/server/trunk/spoolmanager-function/src/main/java/org/apache/james/transport/mailets/VirtualUserTable.java?rev=822646&r1=822645&r2=822646&view=diff
==============================================================================
--- 
james/server/trunk/spoolmanager-function/src/main/java/org/apache/james/transport/mailets/VirtualUserTable.java
 (original)
+++ 
james/server/trunk/spoolmanager-function/src/main/java/org/apache/james/transport/mailets/VirtualUserTable.java
 Wed Oct  7 10:27:49 2009
@@ -103,6 +103,7 @@
                     "provided by the container.");
         } else {
             vut = vutStore.getTable(vutName);
+            if (vut == null) throw new MailetException("Could not find 
VirtualUserTable with name " + vutName);
         }
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to