continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r740919 - in /continuum/trunk: continuum-buildagent/continuum-buildagent-jetty/ continuum-builder/ continuum-core/src/main/java/org/apache/continuum/buildmanager/ continuum-distributed/continuum-distributed-slave/continuum-distributed-slave...
Date Wed, 04 Feb 2009 22:15:42 GMT
Author: evenisse
Date: Wed Feb  4 22:15:42 2009
New Revision: 740919

URL: http://svn.apache.org/viewvc?rev=740919&view=rev
Log:
[CONTINUUM-2047] Fix edit/delete project build definition Submitted by: Jose Morales Martinez

Modified:
    continuum/trunk/continuum-buildagent/continuum-buildagent-jetty/   (props changed)
    continuum/trunk/continuum-builder/   (props changed)
    continuum/trunk/continuum-core/src/main/java/org/apache/continuum/buildmanager/ParallelBuildsManager.java
    continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-server/
  (props changed)
    continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildDefinitionAction.java
    continuum/trunk/continuum-webapp/src/main/resources/struts.xml
    continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildDefinitionEdit.jsp
    continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/buildDefinitionGroupSummaryComponent.jsp
    continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/buildDefinitionSummaryComponent.jsp

Propchange: continuum/trunk/continuum-buildagent/continuum-buildagent-jetty/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Feb  4 22:15:42 2009
@@ -2,3 +2,4 @@
 target
 .classpath
 .project
+*.iml

Propchange: continuum/trunk/continuum-builder/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Feb  4 22:15:42 2009
@@ -3,3 +3,4 @@
 target
 .classpath
 .project
+*.iml

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/continuum/buildmanager/ParallelBuildsManager.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/continuum/buildmanager/ParallelBuildsManager.java?rev=740919&r1=740918&r2=740919&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/continuum/buildmanager/ParallelBuildsManager.java
(original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/continuum/buildmanager/ParallelBuildsManager.java
Wed Feb  4 22:15:42 2009
@@ -529,7 +529,7 @@
     }
 
     /**
-     * @see BuildsManager#prepareBuildProjects(Map, int, int, String)
+     * @see BuildsManager#prepareBuildProjects(Map, int, int, String, String, int)
      */
     public void prepareBuildProjects( Map<Integer, Integer> projectsBuildDefinitionsMap,
int trigger, int projectGroupId, String projectGroupName, String scmRootAddress, int scmRootId
)
         throws BuildManagerException
@@ -1114,7 +1114,7 @@
             
             try
             {
-                int count = 1;             
+                int count = 1;
                 for ( BuildQueue buildQueue : buildQueues )
                 {            
                     if( count <= allowedBuilds )

Propchange: continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-server/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Feb  4 22:15:42 2009
@@ -3,3 +3,4 @@
 target
 .classpath
 .project
+*.iml

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildDefinitionAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildDefinitionAction.java?rev=740919&r1=740918&r2=740919&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildDefinitionAction.java
(original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildDefinitionAction.java
Wed Feb  4 22:15:42 2009
@@ -19,13 +19,6 @@
  * under the License.
  */
 
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.builddefinition.BuildDefinitionService;
 import org.apache.maven.continuum.builddefinition.BuildDefinitionServiceException;
@@ -40,6 +33,13 @@
 import org.apache.maven.continuum.web.exception.ContinuumActionException;
 import org.codehaus.plexus.util.StringUtils;
 
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
 /**
  * BuildDefinitionAction:
  *
@@ -78,6 +78,8 @@
 
     private boolean groupBuildDefinition = false;
 
+    private boolean groupBuildView = false;
+
     private String projectGroupName = "";
 
     private int profileId;
@@ -89,12 +91,13 @@
     private String buildDefinitionType;
 
     private boolean alwaysBuild;
-    
+
     /**
      * @plexus.requirement
-     */    
-    private BuildDefinitionService buildDefinitionService;    
-    
+     */
+    private BuildDefinitionService buildDefinitionService;
+
+    @Override
     public void prepare()
         throws Exception
     {
@@ -132,6 +135,7 @@
      *
      * @return action result
      */
+    @Override
     public String input()
         throws ContinuumException, ContinuumStoreException, BuildDefinitionServiceException
     {
@@ -311,6 +315,11 @@
             return REQUIRES_AUTHORIZATION;
         }
 
+        if ( groupBuildView )
+        {
+            return "success_group";
+        }
+
         return SUCCESS;
     }
 
@@ -463,7 +472,7 @@
         return buildDefinitionId;
     }
 
-    public void setBuildDefinitionId( int buildDefinitionId )
+    public void setBuildDefinitionId( final int buildDefinitionId )
     {
         this.buildDefinitionId = buildDefinitionId;
     }
@@ -473,7 +482,7 @@
         return projectId;
     }
 
-    public void setProjectId( int projectId )
+    public void setProjectId( final int projectId )
     {
         this.projectId = projectId;
     }
@@ -483,7 +492,7 @@
         return projectGroupId;
     }
 
-    public void setProjectGroupId( int projectGroupId )
+    public void setProjectGroupId( final int projectGroupId )
     {
         this.projectGroupId = projectGroupId;
     }
@@ -493,7 +502,7 @@
         return scheduleId;
     }
 
-    public void setScheduleId( int scheduleId )
+    public void setScheduleId( final int scheduleId )
     {
         this.scheduleId = scheduleId;
     }
@@ -503,17 +512,19 @@
         return defaultBuildDefinition;
     }
 
-    public void setDefaultBuildDefinition( boolean defaultBuildDefinition )
+    public void setDefaultBuildDefinition( final boolean defaultBuildDefinition )
     {
         this.defaultBuildDefinition = defaultBuildDefinition;
     }
 
+    @Override
     public boolean isConfirmed()
     {
         return confirmed;
     }
 
-    public void setConfirmed( boolean confirmed )
+    @Override
+    public void setConfirmed( final boolean confirmed )
     {
         this.confirmed = confirmed;
     }
@@ -523,7 +534,7 @@
         return executor;
     }
 
-    public void setExecutor( String executor )
+    public void setExecutor( final String executor )
     {
         this.executor = executor;
     }
@@ -533,7 +544,7 @@
         return goals;
     }
 
-    public void setGoals( String goals )
+    public void setGoals( final String goals )
     {
         this.goals = goals;
     }
@@ -543,7 +554,7 @@
         return arguments;
     }
 
-    public void setArguments( String arguments )
+    public void setArguments( final String arguments )
     {
         this.arguments = arguments;
     }
@@ -553,7 +564,7 @@
         return buildFile;
     }
 
-    public void setBuildFile( String buildFile )
+    public void setBuildFile( final String buildFile )
     {
         this.buildFile = buildFile;
     }
@@ -563,7 +574,7 @@
         return buildFresh;
     }
 
-    public void setBuildFresh( boolean buildFresh )
+    public void setBuildFresh( final boolean buildFresh )
     {
         this.buildFresh = buildFresh;
     }
@@ -573,7 +584,7 @@
         return schedules;
     }
 
-    public void setSchedules( Map schedules )
+    public void setSchedules( final Map schedules )
     {
         this.schedules = schedules;
     }
@@ -583,7 +594,7 @@
         return profiles;
     }
 
-    public void setProfiles( List profiles )
+    public void setProfiles( final List profiles )
     {
         this.profiles = profiles;
     }
@@ -593,7 +604,7 @@
         return groupBuildDefinition;
     }
 
-    public void setGroupBuildDefinition( boolean groupBuildDefinition )
+    public void setGroupBuildDefinition( final boolean groupBuildDefinition )
     {
         this.groupBuildDefinition = groupBuildDefinition;
     }
@@ -621,7 +632,7 @@
         return profileId;
     }
 
-    public void setProfileId( int profileId )
+    public void setProfileId( final int profileId )
     {
         this.profileId = profileId;
     }
@@ -631,7 +642,7 @@
         return description;
     }
 
-    public void setDescription( String description )
+    public void setDescription( final String description )
     {
         this.description = description;
     }
@@ -641,7 +652,7 @@
         return buildDefinitionType;
     }
 
-    public void setBuildDefinitionType( String buildDefinitionType )
+    public void setBuildDefinitionType( final String buildDefinitionType )
     {
         this.buildDefinitionType = buildDefinitionType;
     }
@@ -656,9 +667,19 @@
         return alwaysBuild;
     }
 
-    public void setAlwaysBuild( boolean alwaysBuild )
+    public void setAlwaysBuild( final boolean alwaysBuild )
     {
         this.alwaysBuild = alwaysBuild;
     }
-    
+
+    public boolean isGroupBuildView()
+    {
+        return groupBuildView;
+    }
+
+    public void setGroupBuildView( final boolean groupBuildView )
+    {
+        this.groupBuildView = groupBuildView;
+    }
+
 }

Modified: continuum/trunk/continuum-webapp/src/main/resources/struts.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/resources/struts.xml?rev=740919&r1=740918&r2=740919&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/resources/struts.xml (original)
+++ continuum/trunk/continuum-webapp/src/main/resources/struts.xml Wed Feb  4 22:15:42 2009
@@ -269,7 +269,10 @@
 
     <action name="saveBuildDefinition" class="buildDefinition" method="saveBuildDefinition">
       <result name="input">/WEB-INF/jsp/buildDefinitionEdit.jsp</result>
-      <result name="success" type="chain">projectView</result>
+      <result name="success" type="redirect-action">
+        <param name="actionName">projectView</param>
+        <param name="projectId">${projectId}</param>
+      </result>
       <result name="success_group" type="chain">projectGroupBuildDefinition</result>
     </action>
 
@@ -348,8 +351,11 @@
     </action>
 
     <action name="saveProjectGroup" class="projectGroup" method="save">
-      <result name="success" type="chain">projectGroupSummary</result>
       <result name="input">/WEB-INF/jsp/projectGroupEdit.jsp</result>
+      <result name="success" type="redirect-action">
+        <param name="actionName">projectGroupSummary</param>
+        <param name="projectGroupId">${projectGroupId}</param>
+      </result>
     </action>
 
     <!--

Modified: continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildDefinitionEdit.jsp
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildDefinitionEdit.jsp?rev=740919&r1=740918&r2=740919&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildDefinitionEdit.jsp (original)
+++ continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildDefinitionEdit.jsp Wed
Feb  4 22:15:42 2009
@@ -90,6 +90,9 @@
                 <s:hidden name="projectId"/>
                 <s:hidden name="projectGroupId"/>
                 <s:hidden name="groupBuildDefinition"/>
+                <c:if test="${groupBuildView == true}">
+                  <s:hidden name="groupBuildView" value="true"/>
+                </c:if>
                 <c:choose>
                 <c:when test="${defaultBuildDefinition == true}">
                   <s:hidden name="defaultBuildDefinition" value="true"/>

Modified: continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/buildDefinitionGroupSummaryComponent.jsp
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/buildDefinitionGroupSummaryComponent.jsp?rev=740919&r1=740918&r2=740919&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/buildDefinitionGroupSummaryComponent.jsp
(original)
+++ continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/buildDefinitionGroupSummaryComponent.jsp
Wed Feb  4 22:15:42 2009
@@ -96,7 +96,7 @@
           <c:when test="${pageScope.buildDefinitionSummary.isDefault == true}">
             <img src="<s:url value='/images/delete_disabled.gif' includeParams="none"/>"
alt="<s:text name='delete'/>" title="<s:text name='delete'/>" border="0">
           </c:when>
-          <c:otherwise>${pageScope.buildDefinitionSummary.isDefault}
+          <c:otherwise>
             <s:url id="removeUrl" action="removeGroupBuildDefinition" namespace="/">
               <s:param name="projectGroupId">${pageScope.buildDefinitionSummary.projectGroupId}</s:param>
               <s:param name="buildDefinitionId">${pageScope.buildDefinitionSummary.id}</s:param>
@@ -187,6 +187,7 @@
           <s:url id="editUrl" action="buildDefinition" method="input" namespace="/">
             <s:param name="projectId">${pageScope.buildDefinitionSummary.projectId}</s:param>
             <s:param name="buildDefinitionId">${pageScope.buildDefinitionSummary.id}</s:param>
+            <s:param name="groupBuildView" value="true"/>
           </s:url>
           <s:a href="%{editUrl}">
               <img src="<s:url value='/images/edit.gif' includeParams="none"/>"
alt="<s:text name='edit'/>" title="<s:text name='edit'/>" border="0">

Modified: continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/buildDefinitionSummaryComponent.jsp
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/buildDefinitionSummaryComponent.jsp?rev=740919&r1=740918&r2=740919&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/buildDefinitionSummaryComponent.jsp
(original)
+++ continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/buildDefinitionSummaryComponent.jsp
Wed Feb  4 22:15:42 2009
@@ -67,61 +67,65 @@
       </ec:column>
       <ec:column property="editAction" title="&nbsp;" width="1%">
         <%-- if the from is PROJECT then render the links differently --%>
-        <s:if test="pageScope.buildDefinitionSummary.from == 'PROJECT'">
-          <redback:ifAuthorized permission="continuum-modify-project-build-definition"
resource="${projectGroupName}">
-            <s:url id="editUrl" action="buildDefinition" method="input" namespace="/">
-              <s:param name="projectId">${projectId}</s:param>
-              <s:param name="buildDefinitionId">${pageScope.buildDefinitionSummary.id}</s:param>
-            </s:url>
-            <s:a href="%{editUrl}"><img src="<s:url value='/images/edit.gif'
includeParams="none"/>" alt="<s:text name='edit'/>" title="<s:text name='edit'/>"
border="0"></s:a>
-          </redback:ifAuthorized>
-          <redback:elseAuthorized>
-            <img src="<s:url value='/images/edit_disabled.gif' includeParams="none"/>"
alt="<s:text name='edit'/>" title="<s:text name='edit'/>" border="0" />
-          </redback:elseAuthorized>
-        </s:if>
-        <s:else>
-          <redback:ifAuthorized permission="continuum-modify-group-build-definition" resource="${projectGroupName}">
-            <s:url id="editUrl" action="buildDefinition" method="input" namespace="/">
-              <s:param name="projectGroupId">${pageScope.buildDefinitionSummary.projectGroupId}</s:param>
-              <s:param name="buildDefinitionId">${pageScope.buildDefinitionSummary.id}</s:param>
-              <s:param name="groupBuildDefinition">true</s:param>
-            </s:url>
-            <s:a href="%{editUrl}"><img src="<s:url value='/images/edit.gif'
includeParams="none"/>" alt="<s:text name='edit'/>" title="<s:text name='edit'/>"
border="0"></s:a>
-          </redback:ifAuthorized>
-          <redback:elseAuthorized>
-            <img src="<s:url value='/images/edit_disabled.gif' includeParams="none"/>"
alt="<s:text name='edit'/>" title="<s:text name='edit'/>" border="0" />
-          </redback:elseAuthorized>
-        </s:else>
+        <c:choose>
+          <c:when test="${pageScope.buildDefinitionSummary.from=='PROJECT'}">
+            <redback:ifAuthorized permission="continuum-modify-project-build-definition"
resource="${projectGroupName}">
+              <s:url id="editUrl" action="buildDefinition" method="input" namespace="/">
+                <s:param name="projectId">${projectId}</s:param>
+                <s:param name="buildDefinitionId">${pageScope.buildDefinitionSummary.id}</s:param>
+              </s:url>
+              <s:a href="%{editUrl}"><img src="<s:url value='/images/edit.gif'
includeParams="none"/>" alt="<s:text name='edit'/>" title="<s:text name='edit'/>"
border="0"></s:a>
+            </redback:ifAuthorized>
+            <redback:elseAuthorized>
+              <img src="<s:url value='/images/edit_disabled.gif' includeParams="none"/>"
alt="<s:text name='edit'/>" title="<s:text name='edit'/>" border="0" />
+            </redback:elseAuthorized>
+          </c:when>
+          <c:otherwise>
+            <redback:ifAuthorized permission="continuum-modify-group-build-definition"
resource="${projectGroupName}">
+              <s:url id="editUrl" action="buildDefinition" method="input" namespace="/">
+                <s:param name="projectGroupId">${pageScope.buildDefinitionSummary.projectGroupId}</s:param>
+                <s:param name="buildDefinitionId">${pageScope.buildDefinitionSummary.id}</s:param>
+                <s:param name="groupBuildDefinition">true</s:param>
+              </s:url>
+              <s:a href="%{editUrl}"><img src="<s:url value='/images/edit.gif'
includeParams="none"/>" alt="<s:text name='edit'/>" title="<s:text name='edit'/>"
border="0"></s:a>
+            </redback:ifAuthorized>
+            <redback:elseAuthorized>
+              <img src="<s:url value='/images/edit_disabled.gif' includeParams="none"/>"
alt="<s:text name='edit'/>" title="<s:text name='edit'/>" border="0" />
+            </redback:elseAuthorized>
+          </c:otherwise>
+        </c:choose>
       </ec:column>
       <ec:column property="deleteAction" title="&nbsp;" width="1%">
         <%-- if the from is PROJECT then render the links differently --%>
-        <s:if test="pageScope.buildDefinitionSummary.from == 'PROJECT'">
-          <redback:ifAuthorized permission="continuum-remove-project-build-definition"
resource="${projectGroupName}">
-            <s:url id="removeUrl" action="removeProjectBuildDefinition" namespace="/">
-              <s:param name="projectId">${projectId}</s:param>
-              <s:param name="buildDefinitionId">${pageScope.buildDefinitionSummary.id}</s:param>
-              <s:param name="confirmed" value="false"/>
-            </s:url>
-            <s:a href="%{removeUrl}"><img src="<s:url value='/images/delete.gif'
includeParams="none"/>" alt="<s:text name='delete'/>" title="<s:text name='delete'/>"
border="0"></s:a>
-          </redback:ifAuthorized>
-          <redback:elseAuthorized>
-            <img src="<s:url value='/images/delete_disabled.gif' includeParams="none"/>"
alt="<s:text name='delete'/>" title="<s:text name='delete'/>" border="0" />
-          </redback:elseAuthorized>
-        </s:if>
-        <s:else>
-          <redback:ifAuthorized permission="continuum-remove-group-build-definition" resource="${projectGroupName}">
-            <s:url id="removeUrl" action="removeGroupBuildDefinition" namespace="/">
-              <s:param name="projectGroupId">${pageScope.buildDefinitionSummary.projectGroupId}</s:param>
-              <s:param name="buildDefinitionId">${pageScope.buildDefinitionSummary.id}</s:param>
-              <s:param name="groupBuildDefinition">true</s:param>
-              <s:param name="confirmed" value="false"/>
-            </s:url>
-            <s:a href="%{removeUrl}"><img src="<s:url value='/images/delete.gif'
includeParams="none"/>" alt="<s:text name='delete'/>" title="<s:text name='delete'/>"
border="0"></s:a>
-          </redback:ifAuthorized>
-          <redback:elseAuthorized>
-            <img src="<s:url value='/images/delete_disabled.gif' includeParams="none"/>"
alt="<s:text name='delete'/>" title="<s:text name='delete'/>" border="0" />
-          </redback:elseAuthorized>
-        </s:else>
+         <c:choose>
+          <c:when test="${pageScope.buildDefinitionSummary.from=='PROJECT'}">
+            <redback:ifAuthorized permission="continuum-remove-project-build-definition"
resource="${projectGroupName}">
+              <s:url id="removeUrl" action="removeProjectBuildDefinition" namespace="/">
+                <s:param name="projectId">${projectId}</s:param>
+                <s:param name="buildDefinitionId">${pageScope.buildDefinitionSummary.id}</s:param>
+                <s:param name="confirmed" value="false"/>
+              </s:url>
+              <s:a href="%{removeUrl}"><img src="<s:url value='/images/delete.gif'
includeParams="none"/>" alt="<s:text name='delete'/>" title="<s:text name='delete'/>"
border="0"></s:a>
+            </redback:ifAuthorized>
+            <redback:elseAuthorized>
+              <img src="<s:url value='/images/delete_disabled.gif' includeParams="none"/>"
alt="<s:text name='delete'/>" title="<s:text name='delete'/>" border="0" />
+            </redback:elseAuthorized>
+          </c:when>
+          <c:otherwise>
+            <redback:ifAuthorized permission="continuum-remove-group-build-definition"
resource="${projectGroupName}">
+              <s:url id="removeUrl" action="removeGroupBuildDefinition" namespace="/">
+                <s:param name="projectGroupId">${pageScope.buildDefinitionSummary.projectGroupId}</s:param>
+                <s:param name="buildDefinitionId">${pageScope.buildDefinitionSummary.id}</s:param>
+                <s:param name="groupBuildDefinition">true</s:param>
+                <s:param name="confirmed" value="false"/>
+              </s:url>
+              <s:a href="%{removeUrl}"><img src="<s:url value='/images/delete.gif'
includeParams="none"/>" alt="<s:text name='delete'/>" title="<s:text name='delete'/>"
border="0"></s:a>
+            </redback:ifAuthorized>
+            <redback:elseAuthorized>
+              <img src="<s:url value='/images/delete_disabled.gif' includeParams="none"/>"
alt="<s:text name='delete'/>" title="<s:text name='delete'/>" border="0" />
+            </redback:elseAuthorized>
+          </c:otherwise>
+        </c:choose>
       </ec:column>
     </ec:row>
   </ec:table>



Mime
View raw message