Return-Path: Delivered-To: apmail-continuum-commits-archive@www.apache.org Received: (qmail 48645 invoked from network); 13 Apr 2010 00:27:06 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 13 Apr 2010 00:27:06 -0000 Received: (qmail 31984 invoked by uid 500); 13 Apr 2010 00:27:06 -0000 Delivered-To: apmail-continuum-commits-archive@continuum.apache.org Received: (qmail 31950 invoked by uid 500); 13 Apr 2010 00:27:05 -0000 Mailing-List: contact commits-help@continuum.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@continuum.apache.org Delivered-To: mailing list commits@continuum.apache.org Received: (qmail 31943 invoked by uid 99); 13 Apr 2010 00:27:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Apr 2010 00:27:05 +0000 X-ASF-Spam-Status: No, hits=-1251.0 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Apr 2010 00:27:03 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id A89C123889EA; Tue, 13 Apr 2010 00:26:43 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: 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... Date: Tue, 13 Apr 2010 00:26:43 -0000 To: commits@continuum.apache.org From: ctan@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100413002643.A89C123889EA@eris.apache.org> 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> 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> getAvailableInstallations() + throws Exception + { + // TODO Auto-generated method stub + return null; + } + + public Map 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 getProjectCurrentlyBuilding() + throws Exception + { + // TODO Auto-generated method stub + return null; + } + + public Map 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> getProjectsInBuildQueue() + throws Exception + { + // TODO Auto-generated method stub + return null; + } + + public List> 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 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 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> 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 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 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> getProjectsAndBuildDefinitionsCurrentlyPreparingBuild() + throws Exception + { + // TODO Auto-generated method stub + return null; + } + + public List> 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> getProjectsInPrepareBuildQueue() throws Exception; + public List> getProjectsAndBuildDefinitionsInPrepareBuildQueue() + throws Exception; + public List> getProjectsInBuildQueue() throws Exception; public Map getProjectCurrentlyPreparingBuild() throws Exception; + public List> getProjectsAndBuildDefinitionsCurrentlyPreparingBuild() + throws Exception; + public Boolean isProjectGroupInQueue( int projectGroupId ) throws Exception; + public Boolean isProjectScmRootInQueue( int projectScmRootId, List 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> getProjectsAndBuildDefinitionsCurrentlyPreparingBuild() + throws Exception + { + List> 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> getProjectsInBuildQueue() throws Exception { @@ -513,6 +532,25 @@ public class SlaveBuildAgentTransportCli return projects; } + public List> getProjectsAndBuildDefinitionsInPrepareBuildQueue() + throws Exception + { + List> 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 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> getProjectsAndBuildDefinitionsCurrentlyPreparingBuild() + throws Exception + { + try + { + return continuumBuildAgentService.getProjectsAndBuildDefinitionsCurrentlyPreparingBuild(); + } + catch ( ContinuumBuildAgentException e ) + { + log.error( "Failed to retrieve projects currently preparing build", e ); + throw e; + } + } + public List> getProjectsInBuildQueue() throws Exception { @@ -412,6 +426,21 @@ public class SlaveBuildAgentTransportSer } } + public List> 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 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 {