continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject svn commit: r219674 - in /maven/continuum/trunk/continuum-web/src/main: java/org/apache/maven/continuum/web/tool/ resources/forms/ resources/templates/screens/notification/ resources/templates/screens/project/
Date Tue, 19 Jul 2005 12:41:03 GMT
Author: jvanzyl
Date: Tue Jul 19 05:41:02 2005
New Revision: 219674

URL: http://svn.apache.org/viewcvs?rev=219674&view=rev
Log:
o adding web tools
o adding schedule form definition

Added:
    maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/FormDataTool.java
    maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/Item.java
    maven/continuum/trunk/continuum-web/src/main/resources/forms/schedule.xml
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/notification/
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/project/
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/project/ProjectScheduleSummary.vm

Added: maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/FormDataTool.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/FormDataTool.java?rev=219674&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/FormDataTool.java
(added)
+++ maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/FormDataTool.java
Tue Jul 19 05:41:02 2005
@@ -0,0 +1,31 @@
+package org.apache.maven.continuum.web.tool;
+
+import org.codehaus.plexus.util.StringUtils;
+
+import java.util.List;
+import java.util.ArrayList;
+
+/**
+ * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
+ * @version $Id: CssTool.java 209843 2005-07-08 17:13:22Z evenisse $
+ */
+public class FormDataTool
+{
+    public List pulldown( String data )
+    {
+        List list = new ArrayList();
+
+        String[] items = StringUtils.split( data, "," );
+
+        for ( int i = 0; i < items.length; i++ )
+        {
+            String[] s = StringUtils.split( items[i], "=" );
+
+            Item item = new Item( s[0], s[1] );
+
+            list.add( item );
+        }
+
+        return list;
+    }
+}

Added: maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/Item.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/Item.java?rev=219674&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/Item.java
(added)
+++ maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/Item.java
Tue Jul 19 05:41:02 2005
@@ -0,0 +1,38 @@
+package org.apache.maven.continuum.web.tool;
+
+/**
+ * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
+ * @version $Id:$
+ */
+public class Item
+{
+    private String name;
+
+    private String value;
+
+    public Item( String name, String value )
+    {
+        this.name = name;
+        this.value = value;
+    }
+
+    public String getName()
+    {
+        return name;
+    }
+
+    public void setName( String name )
+    {
+        this.name = name;
+    }
+
+    public String getValue()
+    {
+        return value;
+    }
+
+    public void setValue( String value )
+    {
+        this.value = value;
+    }
+}

Added: maven/continuum/trunk/continuum-web/src/main/resources/forms/schedule.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/forms/schedule.xml?rev=219674&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/forms/schedule.xml (added)
+++ maven/continuum/trunk/continuum-web/src/main/resources/forms/schedule.xml Tue Jul 19 05:41:02
2005
@@ -0,0 +1,95 @@
+<form>
+  <id>schedule</id>
+  <source-role>org.apache.maven.continuum.Continuum</source-role>
+  <target-class>org.apache.maven.continuum.project.ContinuumSchedule</target-class>
+  <lookup-expression>getSchedule(#id)</lookup-expression>
+  <elements>
+    <element>
+      <id>scheduleName</id>
+      <validators>
+        <validator>
+          <id>required</id>
+          <error-message-key>empty.error</error-message-key>
+        </validator>
+      </validators>
+      <expression>name</expression>
+      <type>text</type>
+    </element>
+    <element>
+      <id>scheduleDescription</id>
+      <validators>
+        <validator>
+          <id>required</id>
+          <error-message-key>empty.error</error-message-key>
+        </validator>
+      </validators>
+      <expression>description</expression>
+      <type>text</type>
+    </element>
+    <element>
+      <id>scheduleScmMode</id>
+      <validators>
+        <validator>
+          <id>default</id>
+        </validator>
+      </validators>
+      <expression>scmMode</expression>
+      <type>pulldown</type>
+      <data>0=Update,1=Clean Checkout</data>
+    </element>
+    <element>
+      <id>scheduleCronExpression</id>
+      <validators>
+        <validator>
+          <id>required</id>
+          <error-message-key>empty.error</error-message-key>
+        </validator>
+      </validators>
+      <expression>cronExpression</expression>
+      <type>text</type>
+    </element>
+    <element>
+      <id>scheduleActive</id>
+      <validators>
+        <validator>
+          <id>default</id>
+        </validator>
+      </validators>
+      <expression>active</expression>
+      <type>checkbox</type>
+      <default-value>false</default-value>
+    </element>
+  </elements>
+
+  <view>
+    <title-key>schedule.viewTitle</title-key>
+  </view>
+
+  <delete>
+    <title-key>schedule.deleteTitle</title-key>
+    <view>schedule,ScheduleSummary.vm</view>
+    <action>deleteEntity</action>
+    <expression>removeSchedule(#id)</expression>
+  </delete>
+
+  <!-- Add -->
+  <add>
+    <title-key>schedule.addTitle</title-key>
+    <action>addEntity</action>
+    <view>schedule,ScheduleSummary.vm</view>
+    <view-on-failure>Add.vm</view-on-failure>
+    <fid-on-failure>schedule</fid-on-failure>
+    <expression>addSchedule(#entity)</expression>
+  </add>
+
+  <!-- Update -->
+  <update>
+    <title-key>schedule.updateTitle</title-key>
+    <action>updateEntity</action>
+    <view>schedule,ScheduleSummary.vm</view>
+    <view-on-failure>Edit.vm</view-on-failure>
+    <fid-on-failure>schedule</fid-on-failure>
+    <expression>updateSchedule(#entity)</expression>
+  </update>
+
+</form>

Added: maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/project/ProjectScheduleSummary.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/project/ProjectScheduleSummary.vm?rev=219674&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/project/ProjectScheduleSummary.vm
(added)
+++ maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/project/ProjectScheduleSummary.vm
Tue Jul 19 05:41:02 2005
@@ -0,0 +1,38 @@
+$page.setTitle( "Continuum Schedules" )
+
+<div class="app">
+  <div id="h3">
+    <h3>Continuum Schedules</h3>
+    <table border="1" cellspacing="2" cellpadding="3" width="100%" id="projectSummaryTable">
+
+      <!-- i18n -->
+      <tr>
+        <th>Name</th>
+        <th>Description</th>
+        <th>Active</th>
+        <th>Next</th>
+        <th colspan="7"></th>
+      </tr>
+
+      #set ( $items = $continuum.schedules )
+
+      #foreach ( $item in $items )
+      <tr class="$css.nextClass">
+        <td>$item.name</td>
+        <td>$item.description</td>
+        <td>$item.active</td>
+        <td>???</td>
+        <td><a href="$link.setPage('schedule,ScheduleView.vm').addPathInfo('fid',
'schedule').addPathInfo('id', $item.id)">View</a></td>
+        <td><a href="$link.setPage('schedule,ScheduleEdit.vm').addPathInfo('fid',
'schedule').addPathInfo('id', $item.id)">Edit</a></td>
+        <td><a href="$link.setPage('schedule,ScheduleDelete.vm').addPathInfo('fid',
'schedule').addPathInfo('id', $item.id)">Delete</a></td>
+      </tr>
+      #end
+    </table>
+
+    <div class="functnbar3">
+      <form method="post" action="$link">
+        <a href="$link.setPage('schedule,ScheduleAdd.vm').addPathInfo( 'fid', 'schedule')">Add
Schedule</a>
+      </form>
+    </div>
+  </div>
+</div>



Mime
View raw message