You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@continuum.apache.org by ct...@apache.org on 2010/04/13 02:26:43 UTC

svn commit: r933451 [2/2] - in /continuum/trunk: continuum-api/src/main/java/org/apache/continuum/builder/distributed/manager/ continuum-buildagent/continuum-buildagent-api/src/main/java/org/apache/continuum/buildagent/ continuum-buildagent/continuum-b...

Added: continuum/trunk/continuum-core/src/test/java/org/apache/continuum/builder/distributed/stubs/SlaveBuildAgentTransportClientStub.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/test/java/org/apache/continuum/builder/distributed/stubs/SlaveBuildAgentTransportClientStub.java?rev=933451&view=auto
==============================================================================
--- continuum/trunk/continuum-core/src/test/java/org/apache/continuum/builder/distributed/stubs/SlaveBuildAgentTransportClientStub.java (added)
+++ continuum/trunk/continuum-core/src/test/java/org/apache/continuum/builder/distributed/stubs/SlaveBuildAgentTransportClientStub.java Tue Apr 13 00:26:42 2010
@@ -0,0 +1,262 @@
+package org.apache.continuum.builder.distributed.stubs;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.util.List;
+import java.util.Map;
+
+import org.apache.continuum.distributed.transport.slave.SlaveBuildAgentTransportService;
+
+public class SlaveBuildAgentTransportClientStub
+    implements SlaveBuildAgentTransportService
+{
+    public Boolean buildProjects( List<Map<String, Object>> projectsBuildContext )
+        throws Exception
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public Boolean cancelBuild()
+        throws Exception
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public String generateWorkingCopyContent( int projectId, String directory, String baseUrl, String imagesBaseUrl )
+        throws Exception
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public List<Map<String, String>> getAvailableInstallations()
+        throws Exception
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public Map<String, Object> getBuildResult( int projectId )
+        throws Exception
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public Integer getBuildSizeOfAgent()
+        throws Exception
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    public Map getListener( String releaseId )
+        throws Exception
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public String getPreparedReleaseName( String releaseId )
+        throws Exception
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public Map<String, Object> getProjectCurrentlyBuilding()
+        throws Exception
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public Map<String, Object> getProjectCurrentlyPreparingBuild()
+        throws Exception
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public String getProjectFileContent( int projectId, String directory, String filename )
+        throws Exception
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public List<Map<String, Object>> getProjectsInBuildQueue()
+        throws Exception
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public List<Map<String, Object>> getProjectsInPrepareBuildQueue()
+        throws Exception
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public Map getReleasePluginParameters( int projectId, String pomFilename )
+        throws Exception
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public Map<String, Object> getReleaseResult( String releaseId )
+        throws Exception
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public Boolean isProjectCurrentlyBuilding( int projectId )
+        throws Exception
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public Boolean isProjectGroupInQueue( int projectGroupId )
+        throws Exception
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public Boolean isProjectScmRootInQueue( int projectScmRootId, List<Integer> projectIds )
+    {
+        return true;
+    }
+
+    public Boolean isProjectInBuildQueue( int projectId )
+        throws Exception
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public Boolean ping()
+        throws Exception
+    {
+        return true;
+    }
+
+    public List<Map<String, String>> processProject( int projectId, String pomFilename, boolean autoVersionSubmodules )
+        throws Exception
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public String releaseCleanup( String releaseId )
+        throws Exception
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public Boolean releasePerform( String releaseId, String goals, String arguments, boolean useReleaseProfile,
+                                   Map repository, String username )
+        throws Exception
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public String releasePerformFromScm( String goals, String arguments, boolean useReleaseProfile, Map repository,
+                                         String scmUrl, String scmUsername, String scmPassword, String scmTag,
+                                         String scmTagBase, Map environments, String username )
+        throws Exception
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public String releasePrepare( Map project, Map properties, Map releaseVersion, Map developmentVersion,
+                                  Map environments, String username )
+        throws Exception
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public Boolean releaseRollback( String releaseId, int projectId )
+        throws Exception
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public Boolean removeFromBuildQueue( int projectId, int buildDefinitionId )
+        throws Exception
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public Boolean removeFromBuildQueue( List<String> hashCodes )
+        throws Exception
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public Boolean removeFromPrepareBuildQueue( int projectGroupId, int scmRootId )
+        throws Exception
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public Boolean removeFromPrepareBuildQueue( List<String> hashCodes )
+        throws Exception
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public Boolean removeListener( String releaseId )
+        throws Exception
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public List<Map<String, Object>> getProjectsAndBuildDefinitionsCurrentlyPreparingBuild()
+        throws Exception
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public List<Map<String, Object>> getProjectsAndBuildDefinitionsInPrepareBuildQueue()
+        throws Exception
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+}

Modified: continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-api/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportService.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-api/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportService.java?rev=933451&r1=933450&r2=933451&view=diff
==============================================================================
--- continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-api/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportService.java (original)
+++ continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-api/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportService.java Tue Apr 13 00:26:42 2010
@@ -97,15 +97,24 @@ public interface SlaveBuildAgentTranspor
     public List<Map<String, Object>> getProjectsInPrepareBuildQueue()
         throws Exception;
 
+    public List<Map<String, Object>> getProjectsAndBuildDefinitionsInPrepareBuildQueue()
+        throws Exception;
+
     public List<Map<String, Object>> getProjectsInBuildQueue()
         throws Exception;
 
     public Map<String, Object> getProjectCurrentlyPreparingBuild()
         throws Exception;
 
+    public List<Map<String, Object>> getProjectsAndBuildDefinitionsCurrentlyPreparingBuild()
+        throws Exception;
+
     public Boolean isProjectGroupInQueue( int projectGroupId )
         throws Exception;
 
+    public Boolean isProjectScmRootInQueue( int projectScmRootId, List<Integer> projectIds )
+        throws Exception;
+
     public Boolean isProjectCurrentlyBuilding( int projectId )
         throws Exception;
 

Modified: continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-client/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportClient.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-client/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportClient.java?rev=933451&r1=933450&r2=933451&view=diff
==============================================================================
--- continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-client/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportClient.java (original)
+++ continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-client/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportClient.java Tue Apr 13 00:26:42 2010
@@ -475,6 +475,25 @@ public class SlaveBuildAgentTransportCli
         return projects;
     }
 
+    public List<Map<String, Object>> getProjectsAndBuildDefinitionsCurrentlyPreparingBuild()
+        throws Exception
+    {
+        List<Map<String, Object>> projects;
+
+        try
+        {
+            projects = slave.getProjectsAndBuildDefinitionsCurrentlyPreparingBuild();
+            log.info( "Retrieving projects currently preparing build" );
+        }
+        catch ( Exception e )
+        {
+            log.error( "Failed to retrieve projects currently preparing build", e );
+            throw new Exception( "Failed to retrieve projects currently preparing build", e );
+        }
+
+        return projects;
+    }
+
     public List<Map<String, Object>> getProjectsInBuildQueue()
         throws Exception
     {
@@ -513,6 +532,25 @@ public class SlaveBuildAgentTransportCli
         return projects;
     }
 
+    public List<Map<String, Object>> getProjectsAndBuildDefinitionsInPrepareBuildQueue()
+        throws Exception
+    {
+        List<Map<String, Object>> projects;
+
+        try
+        {
+            projects = slave.getProjectsAndBuildDefinitionsInPrepareBuildQueue();
+            log.info( "Retrieving projects in prepare build queue" );
+        }
+        catch ( Exception e )
+        {
+            log.error( "Failed to retrieve projects in prepare build queue", e );
+            throw new Exception( "Failed to retrieve projects in prepare build queue", e );
+        }
+
+        return projects;
+    }
+
     public Boolean isProjectGroupInQueue( int projectGroupId )
         throws Exception
     {
@@ -532,6 +570,25 @@ public class SlaveBuildAgentTransportCli
         return result;
     }
 
+    public Boolean isProjectScmRootInQueue( int projectScmRootId, List<Integer> projectIds )
+        throws Exception
+    {
+        Boolean result;
+
+        try
+        {
+            result = slave.isProjectScmRootInQueue( projectScmRootId, projectIds );
+            log.info( "Checking if project scm root '" + projectScmRootId + "' is in queue" );
+        }
+        catch ( Exception e )
+        {
+            log.error( "Failed to check if project scm root '" + projectScmRootId + "' is in queue", e );
+            throw new Exception( "Failed to check if project scm root '" + projectScmRootId + "' is in queue", e );
+        }
+
+        return result;
+    }
+
     public Boolean isProjectCurrentlyBuilding( int projectId )
         throws Exception
     {

Modified: continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-server/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportServer.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-server/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportServer.java?rev=933451&r1=933450&r2=933451&view=diff
==============================================================================
--- continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-server/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportServer.java (original)
+++ continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-server/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportServer.java Tue Apr 13 00:26:42 2010
@@ -382,6 +382,20 @@ public class SlaveBuildAgentTransportSer
         }
     }
 
+    public List<Map<String, Object>> getProjectsAndBuildDefinitionsCurrentlyPreparingBuild()
+        throws Exception
+    {
+        try
+        {
+            return continuumBuildAgentService.getProjectsAndBuildDefinitionsCurrentlyPreparingBuild();
+        }
+        catch ( ContinuumBuildAgentException e )
+        {
+            log.error( "Failed to retrieve projects currently preparing build", e );
+            throw e;
+        }
+    }
+
     public List<Map<String, Object>> getProjectsInBuildQueue()
         throws Exception
     {
@@ -412,6 +426,21 @@ public class SlaveBuildAgentTransportSer
         }
     }
 
+    public List<Map<String, Object>> getProjectsAndBuildDefinitionsInPrepareBuildQueue()
+        throws Exception
+    {
+        try
+        {
+            log.info( "Retrieving projects in prepare build queue" );
+            return continuumBuildAgentService.getProjectsAndBuildDefinitionsInPrepareBuildQueue();
+        }
+        catch ( ContinuumBuildAgentException e )
+        {
+            log.error( "Failed to retrieve projects in prepare build queue", e );
+            throw e;
+        }
+    }
+
     public Boolean isProjectGroupInQueue( int projectGroupId )
         throws Exception
     {
@@ -419,6 +448,13 @@ public class SlaveBuildAgentTransportSer
         return continuumBuildAgentService.isProjectGroupInQueue( projectGroupId );
     }
 
+    public Boolean isProjectScmRootInQueue( int projectScmRootId, List<Integer> projectIds )
+        throws Exception
+    {
+        log.info( "Checking if project scm root '" + projectScmRootId + "' is in queue" );
+        return continuumBuildAgentService.isProjectScmRootInQueue( projectScmRootId, projectIds );
+    }
+
     public Boolean isProjectCurrentlyBuilding( int projectId )
         throws Exception
     {