continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r329857 - in /maven/continuum/trunk: continuum-core/src/main/java/org/apache/maven/continuum/ continuum-web/src/main/resources/templates/screens/
Date Mon, 31 Oct 2005 17:04:21 GMT
Author: evenisse
Date: Mon Oct 31 09:04:11 2005
New Revision: 329857

URL: http://svn.apache.org/viewcvs?rev=329857&view=rev
Log:
[CONTINUUM-402] Allow to change the notifier configuration for a user

Modified:
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/EditIrcNotifier.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/EditJabberNotifier.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/EditMailNotifier.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/EditMsnNotifier.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/View.vm

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java?rev=329857&r1=329856&r2=329857&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
Mon Oct 31 09:04:11 2005
@@ -740,7 +740,14 @@
 
             if ( value instanceof String )
             {
-                notifierProperties.setProperty( (String) key, (String) value );
+                String val = (String) value;
+                if ( !"sendOnSuccess".equals( val ) &&
+                     !"sendOnFailure".equals( val ) &&
+                     !"sendOnError".equals( val ) &&
+                     !"sendOnWarning".equals( val ) )
+                {
+                    notifierProperties.setProperty( (String) key, val );
+                }
             }
         }
 
@@ -759,6 +766,22 @@
         // ----------------------------------------------------------------------
 
         Properties notifierProperties = createNotifierProperties( configuration );
+
+        boolean sendOnSuccess = convertBoolean( (String) configuration.get( "sendOnSuccess"
) );
+
+        notifier.setSendOnSuccess( sendOnSuccess );
+
+        boolean sendOnFailure = convertBoolean( (String) configuration.get( "sendOnFailure"
) );
+
+        notifier.setSendOnFailure( sendOnFailure );
+
+        boolean sendOnError = convertBoolean( (String) configuration.get( "sendOnError" )
);
+
+        notifier.setSendOnError( sendOnError );
+
+        boolean sendOnWarning = convertBoolean( (String) configuration.get( "sendOnWarning"
) );
+
+        notifier.setSendOnWarning( sendOnWarning );
 
         notifier.setConfiguration( notifierProperties );
 

Modified: maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/EditIrcNotifier.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/EditIrcNotifier.vm?rev=329857&r1=329856&r2=329857&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/EditIrcNotifier.vm
(original)
+++ maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/EditIrcNotifier.vm
Mon Oct 31 09:04:11 2005
@@ -28,8 +28,30 @@
             <td>
               <input type="text" name="channel" value="$notifier.configuration.channel"
size="100"/>
             </td>
-            ##field( $i18n $data $element $item $formtool )
-            ##validateField( $fvr $element )
+          </tr>
+          <tr>
+            <th>Send on success</th>
+            <td>
+              <input type="checkbox" name="sendOnSuccess" #if( $notifier.sendOnSuccess
) checked="checked" #end/>
+            </td>
+          </tr>
+          <tr>
+            <th>Send on failure</th>
+            <td>
+              <input type="checkbox" name="sendOnFailure" #if( $notifier.sendOnFailure
) checked="checked" #end/>
+            </td>
+          </tr>
+          <tr>
+            <th>Send on error</th>
+            <td>
+              <input type="checkbox" name="sendOnError" #if( $notifier.sendOnError ) checked="checked"
#end/>
+            </td>
+          </tr>
+          <tr>
+            <th>Send on warning</th>
+            <td>
+              <input type="checkbox" name="sendOnWarning" #if( $notifier.sendOnWarning
) checked="checked" #end/>
+            </td>
           </tr>
         </table>
         #submitBar( "Submit" )

Modified: maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/EditJabberNotifier.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/EditJabberNotifier.vm?rev=329857&r1=329856&r2=329857&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/EditJabberNotifier.vm
(original)
+++ maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/EditJabberNotifier.vm
Mon Oct 31 09:04:11 2005
@@ -40,8 +40,30 @@
             <td>
               <input type="checkbox" name="isGroup" #if( $notifier.configuration.isGroup
== "on" ) checked="checked" #end/>
             </td>
-            ##field( $i18n $data $element $item $formtool )
-            ##validateField( $fvr $element )
+          </tr>
+          <tr>
+            <th>Send on success</th>
+            <td>
+              <input type="checkbox" name="sendOnSuccess" #if( $notifier.sendOnSuccess
) checked="checked" #end/>
+            </td>
+          </tr>
+          <tr>
+            <th>Send on failure</th>
+            <td>
+              <input type="checkbox" name="sendOnFailure" #if( $notifier.sendOnFailure
) checked="checked" #end/>
+            </td>
+          </tr>
+          <tr>
+            <th>Send on error</th>
+            <td>
+              <input type="checkbox" name="sendOnError" #if( $notifier.sendOnError ) checked="checked"
#end/>
+            </td>
+          </tr>
+          <tr>
+            <th>Send on warning</th>
+            <td>
+              <input type="checkbox" name="sendOnWarning" #if( $notifier.sendOnWarning
) checked="checked" #end/>
+            </td>
           </tr>
         </table>
         #submitBar( "Submit" )

Modified: maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/EditMailNotifier.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/EditMailNotifier.vm?rev=329857&r1=329856&r2=329857&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/EditMailNotifier.vm
(original)
+++ maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/EditMailNotifier.vm
Mon Oct 31 09:04:11 2005
@@ -16,8 +16,30 @@
             <td>
               <input type="text" name="address" value="$notifier.configuration.address"
size="100"/>
             </td>
-            ##field( $i18n $data $element $item $formtool )
-            ##validateField( $fvr $element )
+          </tr>
+          <tr>
+            <th>Send on success</th>
+            <td>
+              <input type="checkbox" name="sendOnSuccess" #if( $notifier.sendOnSuccess
) checked="checked" #end/>
+            </td>
+          </tr>
+          <tr>
+            <th>Send on failure</th>
+            <td>
+              <input type="checkbox" name="sendOnFailure" #if( $notifier.sendOnFailure
) checked="checked" #end/>
+            </td>
+          </tr>
+          <tr>
+            <th>Send on error</th>
+            <td>
+              <input type="checkbox" name="sendOnError" #if( $notifier.sendOnError ) checked="checked"
#end/>
+            </td>
+          </tr>
+          <tr>
+            <th>Send on warning</th>
+            <td>
+              <input type="checkbox" name="sendOnWarning" #if( $notifier.sendOnWarning
) checked="checked" #end/>
+            </td>
           </tr>
         </table>
         #submitBar( "Submit" )

Modified: maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/EditMsnNotifier.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/EditMsnNotifier.vm?rev=329857&r1=329856&r2=329857&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/EditMsnNotifier.vm
(original)
+++ maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/EditMsnNotifier.vm
Mon Oct 31 09:04:11 2005
@@ -28,8 +28,30 @@
             <td>
               <input type="text" name="address" value="$notifier.configuration.address"
size="100"/>
             </td>
-            ##field( $i18n $data $element $item $formtool )
-            ##validateField( $fvr $element )
+          </tr>
+          <tr>
+            <th>Send on success</th>
+            <td>
+              <input type="checkbox" name="sendOnSuccess" #if( $notifier.sendOnSuccess
) checked="checked" #end/>
+            </td>
+          </tr>
+          <tr>
+            <th>Send on failure</th>
+            <td>
+              <input type="checkbox" name="sendOnFailure" #if( $notifier.sendOnFailure
) checked="checked" #end/>
+            </td>
+          </tr>
+          <tr>
+            <th>Send on error</th>
+            <td>
+              <input type="checkbox" name="sendOnError" #if( $notifier.sendOnError ) checked="checked"
#end/>
+            </td>
+          </tr>
+          <tr>
+            <th>Send on warning</th>
+            <td>
+              <input type="checkbox" name="sendOnWarning" #if( $notifier.sendOnWarning
) checked="checked" #end/>
+            </td>
           </tr>
         </table>
         #submitBar( "Submit" )

Modified: maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/View.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/View.vm?rev=329857&r1=329856&r2=329857&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/View.vm (original)
+++ maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/View.vm Mon Oct
31 09:04:11 2005
@@ -147,7 +147,20 @@
               (DISABLED)
             #end
           </td>
-          <td>Success, Failures</td>
+          <td>
+            #if ( $notifier.sendOnSuccess )
+              Success
+            #end
+            #if ( $notifier.sendOnFailure )
+              Failures
+            #end
+            #if ( $notifier.sendOnError )
+              Error
+            #end
+            #if ( $notifier.sendOnWarning )
+              Warnings
+            #end
+          </td>
           <td>
             #if ( $notifier.isFromProject() )
               Project



Mime
View raw message