continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r574683 - /maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/component/NotifierSummaryAction.java
Date Tue, 11 Sep 2007 20:09:22 GMT
Author: evenisse
Date: Tue Sep 11 13:09:21 2007
New Revision: 574683

URL: http://svn.apache.org/viewvc?rev=574683&view=rev
Log:
Add "latest committers" to the recipient column if the notifier send notification to committers

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?rev=574683&r1=574682&r2=574683&view=diff
==============================================================================
--- 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 Sep 11 13:09:21 2007
@@ -26,9 +26,11 @@
 import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.model.project.ProjectGroup;
 import org.apache.maven.continuum.model.project.ProjectNotifier;
+import org.apache.maven.continuum.notification.ContinuumRecipientSource;
 import org.apache.maven.continuum.web.action.ContinuumActionSupport;
 import org.apache.maven.continuum.web.exception.AuthorizationRequiredException;
 import org.apache.maven.continuum.web.model.NotifierSummary;
+import org.codehaus.plexus.util.StringUtils;
 
 import java.util.ArrayList;
 import java.util.Collection;
@@ -251,7 +253,24 @@
         if ( ( "mail".equals( notifier.getType() ) ) || ( "msn".equals( notifier.getType()
) ) ||
             ( "jabber".equals( notifier.getType() ) ) )
         {
-            recipient = (String) configuration.get( "address" );
+            if ( StringUtils.isNotEmpty( (String) configuration.get( ContinuumRecipientSource.ADDRESS_FIELD
) ) )
+            {
+                recipient = (String) configuration.get( ContinuumRecipientSource.ADDRESS_FIELD
);
+            }
+            if ( StringUtils.isNotEmpty( (String) configuration.get( ContinuumRecipientSource.COMMITTER_FIELD
) ) )
+            {
+                if ( Boolean.parseBoolean( (String) configuration.get( ContinuumRecipientSource.COMMITTER_FIELD
) ) )
+                {
+                    if ( "unknown".equals( recipient ) )
+                    {
+                        recipient = "latest committers";
+                    }
+                    else
+                    {
+                        recipient += ", " + "latest committers";
+                    }
+                }
+            }
         }
 
         if ( "irc".equals( notifier.getType() ) )



Mime
View raw message