continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject svn commit: r209535 - in /maven/continuum/trunk: ./ continuum-api/src/main/java/org/apache/maven/continuum/ continuum-core/src/main/java/org/apache/maven/continuum/ continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/ continuum-n...
Date Wed, 06 Jul 2005 22:50:00 GMT
Author: jvanzyl
Date: Wed Jul  6 15:49:56 2005
New Revision: 209535

URL: http://svn.apache.org/viewcvs?rev=209535&view=rev
Log:
o adding code and templates for dealing with notification management

Added:
    maven/continuum/trunk/continuum-web/src/main/resources/forms/notificationIrc.xml
    maven/continuum/trunk/continuum-web/src/main/resources/forms/notificationMail.xml
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/ProjectNotifiers.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/SelectNotifier.vm
Modified:
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java
    maven/continuum/trunk/continuum-notifiers/continuum-notifier-irc/src/main/java/org/apache/maven/continuum/notification/irc/IrcContinuumNotifier.java
    maven/continuum/trunk/continuum-plexus-application/pom.xml
    maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/pipeline/valve/FormicaValve.java
    maven/continuum/trunk/continuum-web/src/main/resources/META-INF/plexus/components.xml
    maven/continuum/trunk/continuum-web/src/main/resources/forms/addMavenOneProject.xml
    maven/continuum/trunk/continuum-web/src/main/resources/forms/addMavenTwoProject.xml
    maven/continuum/trunk/continuum-web/src/main/resources/forms/mavenOneProject.xml
    maven/continuum/trunk/continuum-web/src/main/resources/forms/mavenTwoProject.xml
    maven/continuum/trunk/continuum-web/src/main/resources/forms/uploadMavenOneProject.xml
    maven/continuum/trunk/continuum-web/src/main/resources/forms/uploadMavenTwoProject.xml
    maven/continuum/trunk/continuum-web/src/main/resources/localization/Continuum.properties
    maven/continuum/trunk/continuum-web/src/main/resources/templates/navigations/Menu.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Add.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Delete.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Edit.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Summary.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/View.vm
    maven/continuum/trunk/pom.xml

Modified: maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java?rev=209535&r1=209534&r2=209535&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java
(original)
+++ maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java
Wed Jul  6 15:49:56 2005
@@ -17,6 +17,7 @@
  */
 
 import java.util.Collection;
+import java.util.Map;
 
 import org.apache.maven.continuum.project.AntProject;
 import org.apache.maven.continuum.project.ContinuumBuild;
@@ -153,5 +154,15 @@
         throws ContinuumException;
 
     void updateShellProject( ShellProject project )
+        throws ContinuumException;
+
+    // ----------------------------------------------------------------------
+    // Notification
+    // ----------------------------------------------------------------------
+
+    void addNotifier( String projectId, String notifierType, Map configuration )
+        throws ContinuumException;
+
+    void removeNotifier( String projectId, String notifierType )
         throws ContinuumException;
 }

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=209535&r1=209534&r2=209535&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
Wed Jul  6 15:49:56 2005
@@ -22,6 +22,7 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+import java.util.Properties;
 
 import org.apache.maven.continuum.core.ContinuumCore;
 import org.apache.maven.continuum.core.action.AbstractContinuumAction;
@@ -35,6 +36,7 @@
 import org.apache.maven.continuum.project.MavenTwoProject;
 import org.apache.maven.continuum.project.ShellProject;
 import org.apache.maven.continuum.project.ContinuumProjectState;
+import org.apache.maven.continuum.project.ContinuumNotifier;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
 import org.apache.maven.continuum.project.builder.maven.MavenOneContinuumProjectBuilder;
 import org.apache.maven.continuum.project.builder.maven.MavenTwoContinuumProjectBuilder;
@@ -43,6 +45,7 @@
 import org.apache.maven.continuum.execution.maven.m1.MavenOneBuildExecutor;
 import org.apache.maven.continuum.execution.shell.ShellBuildExecutor;
 import org.apache.maven.continuum.execution.ant.AntBuildExecutor;
+import org.apache.maven.model.Notifier;
 
 import org.codehaus.plexus.action.ActionManager;
 import org.codehaus.plexus.logging.AbstractLogEnabled;
@@ -57,10 +60,14 @@
     extends AbstractLogEnabled
     implements Continuum
 {
-    /** @plexus.requirement */
+    /**
+     * @plexus.requirement
+     */
     private ContinuumCore core;
 
-    /** @plexus.requirement */
+    /**
+     * @plexus.requirement
+     */
     private ActionManager actionManager;
 
     // ----------------------------------------------------------------------
@@ -489,5 +496,83 @@
         {
             throw new ContinuumException( "Error adding project.", e );
         }
+    }
+
+    // ----------------------------------------------------------------------
+    // Notification
+    // ----------------------------------------------------------------------
+
+    public void addNotifier( String projectId, String notifierType, Map configuration )
+        throws ContinuumException
+    {
+        System.out.println( "projectId = " + projectId );
+
+        System.out.println( "notifierType = " + notifierType );
+
+        System.out.println( "configuration = " + configuration );
+
+        ContinuumNotifier notifier = new ContinuumNotifier();
+
+        notifier.setType( notifierType );
+
+        // ----------------------------------------------------------------------
+        // Needs to be properties ...
+        // ----------------------------------------------------------------------
+
+        Properties notifierProperties = new Properties();
+
+        for ( Iterator i = configuration.keySet().iterator(); i.hasNext(); )
+        {
+            Object key = i.next();
+
+            Object value = configuration.get( key );
+
+            if ( value instanceof String )
+            {
+                notifierProperties.setProperty( (String) key, (String) value  );
+            }
+        }
+
+        notifier.setConfiguration( notifierProperties );
+
+        ContinuumProject project = core.getProject( projectId );
+
+        project.addNotifier( notifier );
+
+        core.updateProject( project );
+    }
+
+    public void removeNotifier( String projectId, String notifierType )
+        throws ContinuumException
+    {
+        System.out.println( "Here removing the notifier!" );
+
+        System.out.println( "projectId = " + projectId );
+
+        System.out.println( "notifierType = " + notifierType );
+
+        ContinuumProject project = core.getProject( projectId );
+
+        List notifiers = project.getNotifiers();
+
+        System.out.println( "notifiers.size() = " + notifiers.size() );
+
+        for ( Iterator i = notifiers.iterator(); i.hasNext(); )
+        {
+            ContinuumNotifier n = (ContinuumNotifier) i.next();
+
+            if ( n.getType().equals( notifierType ) )
+            {
+                System.out.println( "n.getType() = " + n.getType() );
+
+                i.remove();
+            }
+        }
+
+        System.out.println( "notifiers.size() = " + notifiers.size() );
+
+        project.setNotifiers( notifiers );
+
+        core.updateProject( project );
     }
 }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java?rev=209535&r1=209534&r2=209535&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java
Wed Jul  6 15:49:56 2005
@@ -238,7 +238,7 @@
                 throw new MavenBuilderHelperException( "Missing type from notifier." );
             }
 
-            notifier.setType( projectNotifier.getType() );
+            notifier.setType( projectNotifier.getType() );            
 
             notifier.setConfiguration( projectNotifier.getConfiguration() );
 

Modified: maven/continuum/trunk/continuum-notifiers/continuum-notifier-irc/src/main/java/org/apache/maven/continuum/notification/irc/IrcContinuumNotifier.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-notifiers/continuum-notifier-irc/src/main/java/org/apache/maven/continuum/notification/irc/IrcContinuumNotifier.java?rev=209535&r1=209534&r2=209535&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-notifiers/continuum-notifier-irc/src/main/java/org/apache/maven/continuum/notification/irc/IrcContinuumNotifier.java
(original)
+++ maven/continuum/trunk/continuum-notifiers/continuum-notifier-irc/src/main/java/org/apache/maven/continuum/notification/irc/IrcContinuumNotifier.java
Wed Jul  6 15:49:56 2005
@@ -123,14 +123,24 @@
         }
 
         // ----------------------------------------------------------------------
-        // Send the message
+        // Gather configuration values
         // ----------------------------------------------------------------------
 
-        ircClient.connect( (String) configuration.get( "host" ), ( (Integer) configuration.get(
"port" ) ).intValue() );
+        String host = (String) configuration.get( "host" );
+
+        int port = Integer.parseInt( (String) configuration.get( "port" ) );
+
+        String channel = (String) configuration.get( "channel" );
+
+        // ----------------------------------------------------------------------
+        // Send message
+        // ----------------------------------------------------------------------
+
+        ircClient.connect( host, port, "continuum" );
 
         ircClient.logon();
 
-        ircClient.sendNotice( (String) configuration.get( "channel" ), generateMessage( project,
build ) );
+        ircClient.sendMessageToChannel( channel, generateMessage( project, build ) );
 
         ircClient.logoff();
 

Modified: maven/continuum/trunk/continuum-plexus-application/pom.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-plexus-application/pom.xml?rev=209535&r1=209534&r2=209535&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-plexus-application/pom.xml (original)
+++ maven/continuum/trunk/continuum-plexus-application/pom.xml Wed Jul  6 15:49:56 2005
@@ -60,7 +60,7 @@
     <dependency>
       <groupId>plexus</groupId>
       <artifactId>plexus-appserver</artifactId>
-      <version>1.0-alpha-2</version>
+      <version>1.0-alpha-3-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>plexus</groupId>

Modified: maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/pipeline/valve/FormicaValve.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/pipeline/valve/FormicaValve.java?rev=209535&r1=209534&r2=209535&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/pipeline/valve/FormicaValve.java
(original)
+++ maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/pipeline/valve/FormicaValve.java
Wed Jul  6 15:49:56 2005
@@ -4,10 +4,12 @@
 import org.apache.maven.continuum.web.tool.FormicaTool;
 
 import org.codehaus.plexus.formica.Form;
+import org.codehaus.plexus.formica.action.FormInfo;
 import org.codehaus.plexus.summit.pipeline.valve.CreateViewContextValve;
 import org.codehaus.plexus.summit.pipeline.valve.ValveInvocationException;
 import org.codehaus.plexus.summit.rundata.RunData;
 import org.codehaus.plexus.summit.view.ViewContext;
+import org.codehaus.plexus.util.StringUtils;
 
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
@@ -16,6 +18,8 @@
 public class FormicaValve
     extends CreateViewContextValve
 {
+    public static final String FORMICA_REDIRECT = "formicaRedirect";
+
     // ----------------------------------------------------------------------
     // Requirements
     // ----------------------------------------------------------------------
@@ -37,24 +41,53 @@
     protected void populateViewContext( RunData data, ViewContext context )
         throws ValveInvocationException
     {
+        FormInfo formInfo = (FormInfo) data.getMap().get( "formInfo" );
+
+        String formId;
+
         // ----------------------------------------------------------------------
-        // Entity Id
+        // We'll use a formInfo object if we have one, otherwise we will look
+        // in the request for form info.
         // ----------------------------------------------------------------------
 
-        String id = data.getParameters().getString( "id" );
+        if ( formInfo != null )
+        {
+            formId = formInfo.getFid();
+        }
+        else if ( data.getParameters().getString( FORMICA_REDIRECT ) != null )
+        {
+            String[] s = StringUtils.split( data.getParameters().getString( FORMICA_REDIRECT
), ":" );
 
-        context.put( "id", id );
+            formId = s[0];
+
+            data.setTarget( s[1] );
+        }
+        else
+        {
+            formId = data.getParameters().getString( "fid" );
+        }
 
         // ----------------------------------------------------------------------
-        // Form
+        // If a formId can't be found in either place then we're not dealing with
+        // a form so we can safely return.
         // ----------------------------------------------------------------------
 
-        String formId = data.getParameters().getString( "fid" );
-
         if ( formId == null )
         {
-            formId = defaultFormId;
+            return;
         }
+
+        // ----------------------------------------------------------------------
+        // Entity Id
+        // ----------------------------------------------------------------------
+
+        String id = data.getParameters().getString( "id" );
+
+        context.put( "id", id );
+
+        // ----------------------------------------------------------------------
+        // Form
+        // ----------------------------------------------------------------------
 
         context.put( "fid", formId );
 

Modified: maven/continuum/trunk/continuum-web/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/META-INF/plexus/components.xml?rev=209535&r1=209534&r2=209535&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/META-INF/plexus/components.xml
(original)
+++ maven/continuum/trunk/continuum-web/src/main/resources/META-INF/plexus/components.xml
Wed Jul  6 15:49:56 2005
@@ -153,6 +153,24 @@
             </scalars>
           </view>
           <view>
+            <id>ProjectNotifiers</id>
+            <scalars>
+              <scalar>
+                <id>project</id>
+                <expression>getProject(#id)</expression>
+              </scalar>
+            </scalars>
+          </view>
+          <view>
+            <id>SelectNotifier</id>
+            <scalars>
+              <scalar>
+                <id>project</id>
+                <expression>getProject(#id)</expression>
+              </scalar>
+            </scalars>
+          </view>
+          <view>
             <id>ProjectBuild</id>
             <scalars>
               <scalar>
@@ -250,6 +268,10 @@
           <call>
             <cid>checkoutProject</cid>
             <expression>checkoutProject(#id)</expression>
+          </call>
+          <call>
+            <cid>deleteNotifier</cid>
+            <expression>removeNotifier(#id,#notifierType)</expression>
           </call>
         </calls>
       </configuration>

Modified: maven/continuum/trunk/continuum-web/src/main/resources/forms/addMavenOneProject.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/forms/addMavenOneProject.xml?rev=209535&r1=209534&r2=209535&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/forms/addMavenOneProject.xml (original)
+++ maven/continuum/trunk/continuum-web/src/main/resources/forms/addMavenOneProject.xml Wed
Jul  6 15:49:56 2005
@@ -32,6 +32,8 @@
     <title-key>project.title.add</title-key>
     <action>callMethod</action>
     <view>Summary.vm</view>
+    <view-on-failure>Add.vm</view-on-failure>
+    <fid-on-failure>addMavenOneProject</fid-on-failure>    
     <expression>addMavenOneProject(#m1PomUrl)</expression>
   </add>
 
@@ -40,6 +42,7 @@
     <title-key>project.title.update</title-key>
     <action>updateEntity</action>
     <view>Summary.vm</view>
+    <view-on-failure>Edit.vm</view-on-failure>
     <expression>updateMavenOneProject(#entity)</expression>
   </update>
 

Modified: maven/continuum/trunk/continuum-web/src/main/resources/forms/addMavenTwoProject.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/forms/addMavenTwoProject.xml?rev=209535&r1=209534&r2=209535&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/forms/addMavenTwoProject.xml (original)
+++ maven/continuum/trunk/continuum-web/src/main/resources/forms/addMavenTwoProject.xml Wed
Jul  6 15:49:56 2005
@@ -27,6 +27,8 @@
     <title-key>project.title.add</title-key>
     <action>callMethod</action>
     <view>Summary.vm</view>
+    <view-on-failure>Add.vm</view-on-failure>
+    <fid-on-failure>addMavenTwoProject</fid-on-failure>
     <expression>addMavenTwoProject(#m2PomUrl)</expression>
   </add>
 
@@ -35,6 +37,7 @@
     <title-key>project.title.update</title-key>
     <action>updateEntity</action>
     <view>Summary.vm/fid/continuumProject</view>
+    <view-on-failure>Edit.vm</view-on-failure>
     <expression>updateMavenTwoProject(#entity)</expression>
   </update>
 

Modified: maven/continuum/trunk/continuum-web/src/main/resources/forms/mavenOneProject.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/forms/mavenOneProject.xml?rev=209535&r1=209534&r2=209535&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/forms/mavenOneProject.xml (original)
+++ maven/continuum/trunk/continuum-web/src/main/resources/forms/mavenOneProject.xml Wed Jul
 6 15:49:56 2005
@@ -23,6 +23,7 @@
     <action>addEntity</action>
     <view>Summary.vm</view>
     <view-on-failure>Add.vm</view-on-failure>
+    <fid-on-failure>maven-1Project</fid-on-failure>        
     <expression>addMavenOneProject(#entity)</expression>
   </add>
 

Modified: maven/continuum/trunk/continuum-web/src/main/resources/forms/mavenTwoProject.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/forms/mavenTwoProject.xml?rev=209535&r1=209534&r2=209535&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/forms/mavenTwoProject.xml (original)
+++ maven/continuum/trunk/continuum-web/src/main/resources/forms/mavenTwoProject.xml Wed Jul
 6 15:49:56 2005
@@ -23,6 +23,7 @@
     <action>addEntity</action>
     <view>Summary.vm</view>
     <view-on-failure>Add.vm</view-on-failure>
+    <fid-on-failure>maven2Project</fid-on-failure>    
     <expression>addMavenTwoProject(#entity)</expression>
   </add>
 

Added: maven/continuum/trunk/continuum-web/src/main/resources/forms/notificationIrc.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/forms/notificationIrc.xml?rev=209535&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/forms/notificationIrc.xml (added)
+++ maven/continuum/trunk/continuum-web/src/main/resources/forms/notificationIrc.xml Wed Jul
 6 15:49:56 2005
@@ -0,0 +1,62 @@
+<form>
+  <id>notificationIrc</id>
+  <source-role>org.apache.maven.continuum.Continuum</source-role>
+  <elements>
+    <element>
+      <id>notifierType</id>
+      <default-value>irc</default-value>
+      <immutable>true</immutable>
+    </element>
+    <element>
+      <id>host</id>
+      <validators>
+        <validator>
+          <id>required</id>
+          <error-message-key>empty.error</error-message-key>
+        </validator>
+      </validators>
+      <type>text</type>
+    </element>
+    <element>
+      <id>port</id>
+      <default-value>6667</default-value>
+      <validators>
+        <validator>
+          <id>required</id>
+          <error-message-key>empty.error</error-message-key>
+        </validator>
+      </validators>
+      <type>text</type>
+    </element>
+    <element>
+      <id>channel</id>
+      <validators>
+        <validator>
+          <id>required</id>
+          <error-message-key>empty.error</error-message-key>
+        </validator>
+      </validators>
+      <type>text</type>
+    </element>
+  </elements>
+
+  <!-- Add -->
+  <add>
+    <title-key>ircNotificationTitle</title-key>
+    <action>callMethod</action>
+    <view>Summary.vm</view>
+    <view-on-failure>Add.vm</view-on-failure>
+    <fid-on-failure>notificationIrc</fid-on-failure>
+    <expression>addNotifier(#id,#notifierType,#parameters)</expression>
+  </add>
+
+  <!-- Update -->
+  <update>
+    <title-key>project.title.update</title-key>
+    <action>updateEntity</action>
+    <view>Summary.vm</view>
+    <view-on-failure>Edit.vm</view-on-failure>
+    <expression>updateAntProject(#entity)</expression>
+  </update>
+
+</form>

Added: maven/continuum/trunk/continuum-web/src/main/resources/forms/notificationMail.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/forms/notificationMail.xml?rev=209535&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/forms/notificationMail.xml (added)
+++ maven/continuum/trunk/continuum-web/src/main/resources/forms/notificationMail.xml Wed
Jul  6 15:49:56 2005
@@ -0,0 +1,40 @@
+<form>
+  <id>notificationMail</id>
+  <source-role>org.apache.maven.continuum.Continuum</source-role>
+  <elements>
+    <element>
+      <id>notifierType</id>
+      <default-value>mail</default-value>
+      <immutable>true</immutable>
+    </element>
+    <element>
+      <id>mailAddress</id>
+      <validators>
+        <validator>
+          <id>required</id>
+          <error-message-key>empty.error</error-message-key>
+        </validator>
+      </validators>
+      <type>text</type>
+    </element>
+  </elements>
+
+  <!-- Add -->
+  <add>
+    <title-key>ircNotificationTitle</title-key>
+    <action>callMethod</action>
+    <view>Summary.vm</view>
+    <view-on-failure>Add.vm</view-on-failure>
+    <expression>addNotifier(#id,#notifierType,#parameters)</expression>
+  </add>
+
+  <!-- Update -->
+  <update>
+    <title-key>project.title.update</title-key>
+    <action>updateEntity</action>
+    <view>Summary.vm</view>
+    <view-on-failure>Edit.vm</view-on-failure>
+    <expression>updateAntProject(#entity)</expression>
+  </update>
+
+</form>

Modified: maven/continuum/trunk/continuum-web/src/main/resources/forms/uploadMavenOneProject.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/forms/uploadMavenOneProject.xml?rev=209535&r1=209534&r2=209535&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/forms/uploadMavenOneProject.xml
(original)
+++ maven/continuum/trunk/continuum-web/src/main/resources/forms/uploadMavenOneProject.xml
Wed Jul  6 15:49:56 2005
@@ -27,6 +27,7 @@
     <title-key>project.title.add</title-key>
     <action>callMethod</action>
     <view>Summary.vm</view>
+    <view-on-failure>Add.vm</view-on-failure>
     <expression>addMavenOneProject(#m1PomUrl)</expression>
   </add>
 

Modified: maven/continuum/trunk/continuum-web/src/main/resources/forms/uploadMavenTwoProject.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/forms/uploadMavenTwoProject.xml?rev=209535&r1=209534&r2=209535&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/forms/uploadMavenTwoProject.xml
(original)
+++ maven/continuum/trunk/continuum-web/src/main/resources/forms/uploadMavenTwoProject.xml
Wed Jul  6 15:49:56 2005
@@ -22,6 +22,8 @@
     <title-key>project.title.add</title-key>
     <action>callMethod</action>
     <view>Summary.vm</view>
+    <view-on-failure>Add.vm</view-on-failure>
+    <fid-on-failure>uploadMavenTwoProject</fid-on-failure>    
     <expression>addMavenTwoProject(#m2PomUrl)</expression>
   </add>
 
@@ -30,6 +32,7 @@
     <title-key>project.title.update</title-key>
     <action>updateEntity</action>
     <view>Summary.vm/fid/continuumProject</view>
+    <view-on-failure>Edit.vm</view-on-failure>
     <expression>updateMavenTwoProject(#entity)</expression>
   </update>
 

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=209535&r1=209534&r2=209535&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
Wed Jul  6 15:49:56 2005
@@ -113,4 +113,22 @@
 // Exceptions
 // ----------------------------------------------------------------------
 
-continuumError = Continuum Error
\ No newline at end of file
+continuumError = Continuum Error
+
+// ----------------------------------------------------------------------
+// Notification
+// ----------------------------------------------------------------------
+
+ircNotificationTitle = IRC Notification
+
+ircHost.label = IRC Host
+ircHost.error = You must enter a host.
+ircHost.message = Enter the IRC host i.e. irc.codehaus.org
+
+ircPort.label = IRC Port
+ircPort.error = You must enter a port number
+ircPort.message = Enter the IRC port i.e. 6667
+
+ircChannel.label = IRC Channel
+ircChannel.error = You must enter an IRC channel
+ircChannel.message = Enter an IRC channel i.e. #maven
\ No newline at end of file

Modified: maven/continuum/trunk/continuum-web/src/main/resources/templates/navigations/Menu.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/templates/navigations/Menu.vm?rev=209535&r1=209534&r2=209535&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/templates/navigations/Menu.vm (original)
+++ maven/continuum/trunk/continuum-web/src/main/resources/templates/navigations/Menu.vm Wed
Jul  6 15:49:56 2005
@@ -18,6 +18,7 @@
   </div>
  </div>
 
+  <!--
   <div id="projecttools" class="toolgroup">
    <div class="label">Import Project</div>
    <div class="body">
@@ -25,5 +26,6 @@
      <div><a href="$link.setPage('Add.vm').addPathInfo( 'fid', 'uploadCruiseControlProject')">Upload
CC Project</a></div>
    </div>
   </div>
+  -->
 
 </div>

Modified: maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Add.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Add.vm?rev=209535&r1=209534&r2=209535&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Add.vm (original)
+++ maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Add.vm Wed Jul
 6 15:49:56 2005
@@ -4,9 +4,10 @@
   <div id="axial" class="h3">
     <h3>$i18n.getString( $form.add.titleKey )</h3>
     <form method="post" action="$link" #if( $form.attributes.multipart )enctype="multipart/form-data"#end>
-      #hidden ( "formId" $form.id )
+      #hidden ( "fid" $form.id )
       #hidden ( "action" $form.add.action )
       #hidden ( "view" $form.add.view )
+      #hidden ( "id" $id )
       <div class="axial">
         <table border="1" cellspacing="2" cellpadding="3" width="100%">
           #foreach ( $element in $form.elements )
@@ -15,6 +16,10 @@
             #field( $i18n $data $element $item $formtool )
             #validateField( $fvr $element )
           </tr>
+          #else
+            #if ( $element.defaultValue )
+              #hidden ( $element.id $element.defaultValue )
+            #end
           #end
           #end
         </table>

Modified: maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Delete.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Delete.vm?rev=209535&r1=209534&r2=209535&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Delete.vm (original)
+++ maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Delete.vm Wed
Jul  6 15:49:56 2005
@@ -1,13 +1,5 @@
-#if ( !$fid )
-  #set ( $fid = $data.getParameters().getString( "fid" ) )
-#end
-#set ( $form = $formtool.getForm( $fid ) )
-#if ( !$id )
-  #set ( $id = $data.getParameters().getString( "id" ) )
-#end
-#if ( $id )
-  #set( $item = $formtool.getItem( $form, $id ) )
-#end
+$page.setTitle( "Delete Project" )
+
 <div class="app">
   <div id="axial" class="h3">
     <h3>$i18n.getString( $form.delete.titleKey )</h3>
@@ -17,7 +9,7 @@
       </p>
     </div>
     <form method="post" action="$link">
-      #hidden ( "formId" $form.id )
+      #hidden ( "fid" $form.id )
       #hidden ( "action" $form.delete.action )
       #hidden ( "view" $form.delete.view )
       #hidden ( "id" $id )

Modified: maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Edit.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Edit.vm?rev=209535&r1=209534&r2=209535&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Edit.vm (original)
+++ maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Edit.vm Wed Jul
 6 15:49:56 2005
@@ -4,7 +4,7 @@
   <div id="axial" class="h3">
     <h3>$i18n.getString( $form.update.titleKey )</h3>
     <form method="post" action="$link">
-      #hidden ( "formId" $form.id )
+      #hidden ( "fid" $form.id )      
       #hidden ( "action" $form.update.action )
       #hidden ( "view" $form.update.view )
       #hidden ( "id" $id )

Added: maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/ProjectNotifiers.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/ProjectNotifiers.vm?rev=209535&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/ProjectNotifiers.vm
(added)
+++ maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/ProjectNotifiers.vm
Wed Jul  6 15:49:56 2005
@@ -0,0 +1,22 @@
+$page.setTitle( "Continuum - ${project.name} Notifiers" )
+
+<div class="app">
+  <div id="h3">
+    <h3>Continuum Projects</h3>
+    <table border="1" cellspacing="2" cellpadding="3" width="100%">
+      <tr>
+        <th>Notifier Type</th>
+        <th colspan="1"></th>
+      </tr>
+      #foreach ( $notifier in $project.notifiers )
+      <tr class="$css.nextClass">
+        <td>$notifier.type</td>
+        <td><a href="$link.setPage('ProjectNotifiers.vm').addPathInfo('notifierType',
$notifier.type).addPathInfo('action','cam').addPathInfo('cid','deleteNotifier').addPathInfo('id',
$project.id)">Delete</a></td>
+      </tr>
+      #end
+    </table>
+  </div>
+  <div class="functnbar3">
+    <a href="$link.setPage('SelectNotifier.vm').addPathInfo('id', $project.id )">Add</a>
+  </div>
+</div>

Added: maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/SelectNotifier.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/SelectNotifier.vm?rev=209535&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/SelectNotifier.vm
(added)
+++ maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/SelectNotifier.vm
Wed Jul  6 15:49:56 2005
@@ -0,0 +1,19 @@
+$page.setTitle( "Continuum - Notifier Selection" )
+
+<div class="app">
+  <div id="h3">
+    <h3>Notifier Selection</h3>
+    <p/>
+    <form method="post" action="$link">
+      #hidden( "id" $project.id )
+      <select name="formicaRedirect">
+        <option value="notificationMail:Add.vm">Mail
+        <option value="notificationIrc:Add.vm">IRC
+      </select>
+      <p/>
+      <div class="axial">
+        #submitBar( "Next" )
+      </div>
+    </form>
+  </div>
+</div>

Modified: maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Summary.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Summary.vm?rev=209535&r1=209534&r2=209535&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Summary.vm (original)
+++ maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Summary.vm Wed
Jul  6 15:49:56 2005
@@ -15,7 +15,7 @@
 
 <div class="app">
   <div id="h3">
-    <h3>$i18n.getString( $form.summary.titleKey )</h3>
+    <h3>Continuum Projects</h3>
     <table border="1" cellspacing="2" cellpadding="3" width="100%">
 
       <!-- i18n -->
@@ -23,7 +23,7 @@
         <th>Status</th>
         <th>Project Name</th>
         <th>Version</th>
-        <th colspan="6"></th>
+        <th colspan="7"></th>
       </tr>
 
       #set ( $items = $continuum.projects )
@@ -71,6 +71,8 @@
         #else
         <td>Build</td>
         #end
+
+        <td><a href="$link.setPage('ProjectNotifiers.vm').addPathInfo('view', "ProjectNotifiers").addPathInfo('id',
$item.id )">Notifiers</a></td>
 
       </tr>
       #end

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=209535&r1=209534&r2=209535&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 Wed Jul
 6 15:49:56 2005
@@ -30,9 +30,10 @@
     </div>
   </div>
 
-    ## This is an extension which could be done by a parse or include
-## TODO: internationalize and use forms instead of this hardcoded layout - tryg
+  ## This is an extension which could be done by a parse or include
+  ## TODO: internationalize and use forms instead of this hardcoded layout - tryg
 
+  #if ( $item.developers.size() > 0 )
   <div id="h3">
     <h3>Developers</h3>
     <table border="1" cellspacing="2" cellpadding="3" width="100%">
@@ -49,6 +50,7 @@
     </table>
     #bar()
   </div>
+  #end
 
   #if ( ( $project.checkOutException && $project.checkOutException != "" ) || ( $project.checkOutErrorMessage
&& $project.checkOutErrorMessage != "" ) )
   <div id="h3">

Modified: maven/continuum/trunk/pom.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/pom.xml?rev=209535&r1=209534&r2=209535&view=diff
==============================================================================
--- maven/continuum/trunk/pom.xml (original)
+++ maven/continuum/trunk/pom.xml Wed Jul  6 15:49:56 2005
@@ -136,7 +136,7 @@
     <dependency>
       <groupId>plexus</groupId>
       <artifactId>plexus-container-default</artifactId>
-      <version>1.0-alpha-4-SNAPSHOT</version>      
+      <version>1.0-alpha-5-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>junit</groupId>



Mime
View raw message