continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r488591 - /maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/component/NotifierSummaryAction.java
Date Tue, 19 Dec 2006 09:02:30 GMT
Author: evenisse
Date: Tue Dec 19 01:02:29 2006
New Revision: 488591

URL: http://svn.apache.org/viewvc?view=rev&rev=488591
Log:
[CONTINUUM-1070] Replace 'unknown' in project group notifiers screen by the correct value
Submitted by: Henry S. Isidro

Modified:
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/component/NotifierSummaryAction.java

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/component/NotifierSummaryAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/component/NotifierSummaryAction.java?view=diff&rev=488591&r1=488590&r2=488591
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/component/NotifierSummaryAction.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/component/NotifierSummaryAction.java
Tue Dec 19 01:02:29 2006
@@ -6,6 +6,7 @@
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Map;
 
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.model.project.Project;
@@ -122,8 +123,32 @@
             ns.setFrom( "USER" );
         }
 
-        // FIXME: Source the recipient 
-        ns.setRecipient( "unknown" );
+        // Source the recipient 
+        Map configuration = notifier.getConfiguration();
+        
+        String recipient = "unknowm";
+
+        if ( ( "mail".equals( notifier.getType() ) ) || 
+             ( "msn".equals( notifier.getType() ) ) ||
+             ( "jabber".equals( notifier.getType() ) ) )
+        {
+            recipient = (String) configuration.get( "address" );
+        }
+        
+        if ( "irc".equals( notifier.getType() ) )
+        {
+            recipient = (String) configuration.get( "host" );
+            
+            if ( configuration.get( "port" ) != null )
+            {
+                recipient = recipient + ":" + (String) configuration.get( "port" );
+            }
+                
+            recipient = recipient + ":" + (String) configuration.get( "channel" );
+        }
+        
+        ns.setRecipient( recipient );
+        
         // XXX: Hack - just for testing :)
         StringBuffer sb = new StringBuffer();
         if ( notifier.isSendOnError() )



Mime
View raw message