continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r489119 - in /maven/continuum/trunk/continuum-webapp/src/main: java/org/apache/maven/continuum/web/action/notifier/ webapp/WEB-INF/jsp/components/ webapp/WEB-INF/jsp/notifier/
Date Wed, 20 Dec 2006 15:48:31 GMT
Author: evenisse
Date: Wed Dec 20 07:48:30 2006
New Revision: 489119

URL: http://svn.apache.org/viewvc?view=rev&rev=489119
Log:
[CONTINUUM-1078] Fix the recipient in confirmation message
Submitted by: Franz Allan Valencia See

Modified:
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/notifier/DeleteGroupNotifierAction.java
    maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/projectGroupNotifierSummaryComponent.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/deleteNotifier.jsp

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/notifier/DeleteGroupNotifierAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/notifier/DeleteGroupNotifierAction.java?view=diff&rev=489119&r1=489118&r2=489119
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/notifier/DeleteGroupNotifierAction.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/notifier/DeleteGroupNotifierAction.java
Wed Dec 20 07:48:30 2006
@@ -16,6 +16,8 @@
  * limitations under the License.
  */
 
+import java.util.Map;
+
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.model.project.ProjectGroup;
 import org.apache.maven.continuum.model.project.ProjectNotifier;
@@ -37,10 +39,12 @@
 {
 
     private int projectGroupId;
-
+    
     private int notifierId;
 
     private String notifierType;
+    
+    private String recipient;
 
     public String execute()
         throws ContinuumException
@@ -50,7 +54,33 @@
     }
 
     public String doDefault()
+        throws ContinuumException
     {
+        ProjectNotifier notifier = getContinuum().getGroupNotifier( projectGroupId, notifierId
);
+        
+        Map configuration = notifier.getConfiguration();
+        
+        notifierType = notifier.getType();
+        
+        if ( ( "mail".equals( notifierType ) ) || 
+             ( "msn".equals( notifierType ) ) ||
+             ( "jabber".equals( notifierType ) ) )
+        {
+            recipient = (String) configuration.get( "address" );
+        }
+        
+        if ( "irc".equals( notifierType ) )
+        {
+            recipient = (String) configuration.get( "host" );
+            
+            if ( configuration.get( "port" ) != null )
+            {
+                recipient = recipient + ":" + (String) configuration.get( "port" );
+            }
+                
+            recipient = recipient + ":" + (String) configuration.get( "channel" );
+        }
+        
         return "delete";
     }
 
@@ -96,4 +126,13 @@
         return -1;
     }
 
+    public String getRecipient()
+    {
+        return recipient;
+    }
+
+    public void setRecipient( String recipient )
+    {
+        this.recipient = recipient;
+    }
 }

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/projectGroupNotifierSummaryComponent.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/projectGroupNotifierSummaryComponent.jsp?view=diff&rev=489119&r1=489118&r2=489119
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/projectGroupNotifierSummaryComponent.jsp
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/projectGroupNotifierSummaryComponent.jsp
Wed Dec 20 07:48:30 2006
@@ -48,6 +48,7 @@
             <ww:url id="removeUrl" action="deleteProjectGroupNotifier!default.action"
namespace="/">
               <ww:param name="projectGroupId">${pageScope.projectGroupNotifierSummary.projectGroupId}</ww:param>
               <ww:param name="notifierId">${pageScope.projectGroupNotifierSummary.id}</ww:param>
+              <ww:param name="notifierType">${pageScope.projectGroupNotifierSummary.type}</ww:param>
               <ww:param name="confirmed" value="false"/>
             </ww:url>
           <ww:a href="%{removeUrl}">

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/deleteNotifier.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/deleteNotifier.jsp?view=diff&rev=489119&r1=489118&r2=489119
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/deleteNotifier.jsp
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/deleteNotifier.jsp
Wed Dec 20 07:48:30 2006
@@ -14,7 +14,7 @@
             <strong>
                 <ww:text name="deleteNotifier.confirmation.message">
                     <ww:param><ww:property value="notifierType"/></ww:param>
-                    <ww:param><ww:property value="notifierId"/></ww:param>
+                    <ww:param><ww:property value="recipient"/></ww:param>
                 </ww:text>
             </strong>
           </p>



Mime
View raw message