continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r330936 - in /maven/continuum/trunk: continuum-notifiers/continuum-notifier-jabber/src/main/java/org/apache/maven/continuum/notification/jabber/ continuum-web/src/main/resources/forms/ continuum-web/src/main/resources/localization/ continuu...
Date Fri, 04 Nov 2005 22:30:25 GMT
Author: evenisse
Date: Fri Nov  4 14:30:17 2005
New Revision: 330936

URL: http://svn.apache.org/viewcvs?rev=330936&view=rev
Log:
Allow to define jabber port

Modified:
    maven/continuum/trunk/continuum-notifiers/continuum-notifier-jabber/src/main/java/org/apache/maven/continuum/notification/jabber/JabberContinuumNotifier.java
    maven/continuum/trunk/continuum-web/src/main/resources/forms/notificationJabber.xml
    maven/continuum/trunk/continuum-web/src/main/resources/localization/Continuum.properties
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/EditJabberNotifier.vm

Modified: maven/continuum/trunk/continuum-notifiers/continuum-notifier-jabber/src/main/java/org/apache/maven/continuum/notification/jabber/JabberContinuumNotifier.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-notifiers/continuum-notifier-jabber/src/main/java/org/apache/maven/continuum/notification/jabber/JabberContinuumNotifier.java?rev=330936&r1=330935&r2=330936&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-notifiers/continuum-notifier-jabber/src/main/java/org/apache/maven/continuum/notification/jabber/JabberContinuumNotifier.java
(original)
+++ maven/continuum/trunk/continuum-notifiers/continuum-notifier-jabber/src/main/java/org/apache/maven/continuum/notification/jabber/JabberContinuumNotifier.java
Fri Nov  4 14:30:17 2005
@@ -173,10 +173,7 @@
 
         jabberClient.setHost( getHost( configuration ) );
 
-        if ( configuration.containsKey( "port" ) )
-        {
-            jabberClient.setPort( ( (Integer) configuration.get( "port" ) ).intValue() );
-        }
+        jabberClient.setPort( getPort( configuration ) );
 
         jabberClient.setUser( getUsername( configuration ) );
 
@@ -249,6 +246,25 @@
         }
 
         return host;
+    }
+
+    private int getPort( Map configuration )
+    {
+        if ( configuration.containsKey( "port" ) )
+        {
+            return ( (Integer) configuration.get( "port" ) ).intValue();
+        }
+        else
+        {
+            if ( isSslConnection ( configuration ) )
+            {
+                return 5223;
+            }
+            else
+            {
+                return 5222;
+            }
+        }
     }
 
     private String getUsername( Map configuration )

Modified: maven/continuum/trunk/continuum-web/src/main/resources/forms/notificationJabber.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/forms/notificationJabber.xml?rev=330936&r1=330935&r2=330936&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/forms/notificationJabber.xml (original)
+++ maven/continuum/trunk/continuum-web/src/main/resources/forms/notificationJabber.xml Fri
Nov  4 14:30:17 2005
@@ -21,6 +21,13 @@
       <message-key>jabber.host.message</message-key>
     </element>
     <element>
+      <id>port</id>
+      <type>text</type>
+      <default-value>5222</default-value>
+      <label-key>jabber.port.label</label-key>
+      <message-key>jabber.port.message</message-key>
+    </element>
+    <element>
       <id>login</id>
       <validators>
         <validator>

Modified: maven/continuum/trunk/continuum-web/src/main/resources/localization/Continuum.properties
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/localization/Continuum.properties?rev=330936&r1=330935&r2=330936&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/localization/Continuum.properties
(original)
+++ maven/continuum/trunk/continuum-web/src/main/resources/localization/Continuum.properties
Fri Nov  4 14:30:17 2005
@@ -220,6 +220,9 @@
 jabber.host.label = Jabber Host
 jabber.host.message = Enter the Jabber host
 
+jabber.port.label = Jabber Port
+jabber.port.message = Enter the Jabber port
+
 jabber.login.label = Jabber Login
 jabber.login.message = Enter your login
 

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=330936&r1=330935&r2=330936&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
Fri Nov  4 14:30:17 2005
@@ -18,6 +18,12 @@
             </td>
           </tr>
           <tr>
+            <th>Jabber Port</th>
+            <td>
+              <input type="text" name="port" value="$notifier.configuration.port" size="100"/>
+            </td>
+          </tr>
+          <tr>
             <th>Jabber Login</th>
             <td>
               <input type="text" name="login" value="$notifier.configuration.login" size="100"/>



Mime
View raw message