continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r488595 - in /maven/continuum/trunk/continuum-webapp/src/main: java/org/apache/maven/continuum/web/action/notifier/DeleteProjectNotifierAction.java resources/localization/Continuum.properties webapp/WEB-INF/jsp/deleteNotifier.jsp
Date Tue, 19 Dec 2006 09:19:56 GMT
Author: evenisse
Date: Tue Dec 19 01:19:55 2006
New Revision: 488595

URL: http://svn.apache.org/viewvc?view=rev&rev=488595
Log:
[CONTINUUM-1068] Add recipient address in confirmation message
Submitted by: Henry S. Isidro

Modified:
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/notifier/DeleteProjectNotifierAction.java
    maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
    maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/deleteNotifier.jsp

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/notifier/DeleteProjectNotifierAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/notifier/DeleteProjectNotifierAction.java?view=diff&rev=488595&r1=488594&r2=488595
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/notifier/DeleteProjectNotifierAction.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/notifier/DeleteProjectNotifierAction.java
Tue Dec 19 01:19:55 2006
@@ -22,6 +22,8 @@
 import org.apache.maven.continuum.model.project.ProjectNotifier;
 import org.apache.maven.continuum.web.action.ContinuumActionSupport;
 
+import java.util.Map;
+
 /**
  * Action that deletes a {@link ProjectNotifier} of type 'IRC' from the specified {@link
ProjectGroup}.
  * 
@@ -43,15 +45,43 @@
     private int notifierId;
 
     private String notifierType;
+    
+    private String recipient;    
 
-    public String execute() throws ContinuumException
+	public String execute() throws ContinuumException
     {
         getContinuum().removeNotifier( projectId, notifierId );
         return SUCCESS;
     }
 
     public String doDefault()
+    	throws ContinuumException
     {
+    	ProjectNotifier notifier = getContinuum().getNotifier( projectId, 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";
     }
 
@@ -94,5 +124,15 @@
     {
         this.projectGroupId = projectGroupId;
     }
+    
+    public String getRecipient()
+    {
+		return recipient;
+	}
+
+	public void setRecipient(String recipient)
+	{
+		this.recipient = recipient;
+	}
 
 }

Modified: maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties?view=diff&rev=488595&r1=488594&r2=488595
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
Tue Dec 19 01:19:55 2006
@@ -324,7 +324,7 @@
 # ----------------------------------------------------------------------
 deleteNotifier.page.title = Continuum - Delete Notifier
 deleteNotifier.section.title = Delete Notifier
-deleteNotifier.confirmation.message = Are you sure you want to delete the {0} notifier "{1}"?
+deleteNotifier.confirmation.message = Are you sure you want to delete the {0} notifier with
recipient "{1}"?
 
 # ----------------------------------------------------------------------
 # Page: Notifier

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/deleteNotifier.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/deleteNotifier.jsp?view=diff&rev=488595&r1=488594&r2=488595
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/deleteNotifier.jsp
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/deleteNotifier.jsp
Tue Dec 19 01:19:55 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