org.apache.continuum.distributed.transport.slave
Class SlaveBuildAgentTransportServer

java.lang.Object
  extended by org.apache.continuum.distributed.transport.slave.SlaveBuildAgentTransportServer
All Implemented Interfaces:
SlaveBuildAgentTransportService

public class SlaveBuildAgentTransportServer
extends Object
implements SlaveBuildAgentTransportService

ProxyMasterBuildAgentTransportService


Constructor Summary
SlaveBuildAgentTransportServer(ContinuumBuildAgentService continuumBuildAgentService)
           
 
Method Summary
 Boolean buildProjects(List<Map<String,Object>> projectsBuildContext)
           
 Boolean cancelBuild()
           
 void executeDirectoryPurge(String directoryType, int daysOlder, int retentionCount, boolean deleteAll)
          Execute a directory purge on the build agent
 String generateWorkingCopyContent(int projectId, String directory, String baseUrl, String imagesBaseUrl)
           
 List<Map<String,String>> getAvailableInstallations()
           
 String getBuildAgentPlatform()
          Get build agent's platform.
 Map<String,Object> getBuildResult(int projectId)
           
 Integer getBuildSizeOfAgent()
           
 Map<String,Object> getListener(String releaseId)
           
 String getPreparedReleaseName(String releaseId)
           
 Map<String,Object> getProjectCurrentlyBuilding()
           
 Map<String,Object> getProjectCurrentlyPreparingBuild()
           
 Map<String,Object> getProjectFile(int projectId, String directory, String filename)
           
 List<Map<String,Object>> getProjectsAndBuildDefinitionsCurrentlyPreparingBuild()
           
 List<Map<String,Object>> getProjectsAndBuildDefinitionsInPrepareBuildQueue()
           
 List<Map<String,Object>> getProjectsInBuildQueue()
           
 List<Map<String,Object>> getProjectsInPrepareBuildQueue()
           
 Map getReleasePluginParameters(int projectId, String pomFilename)
           
 Map<String,Object> getReleaseResult(String releaseId)
           
 Boolean isProjectCurrentlyBuilding(int projectId, int buildDefinitionId)
           
 Boolean isProjectCurrentlyPreparingBuild(int projectId, int buildDefinitionId)
           
 Boolean isProjectGroupCurrentlyPreparingBuild(int projectGroupId)
           
 Boolean isProjectGroupInPrepareBuildQueue(int projectGroupId)
           
 Boolean isProjectGroupInQueue(int projectGroupId)
           
 Boolean isProjectInBuildQueue(int projectId, int buildDefinitionId)
           
 Boolean isProjectInPrepareBuildQueue(int projectId, int buildDefinitionId)
           
 Boolean isProjectScmRootInQueue(int projectScmRootId, List<Integer> projectIds)
           
 Boolean ping()
           
 List<Map<String,String>> processProject(int projectId, String pomFilename, boolean autoVersionSubmodules)
           
 String releaseCleanup(String releaseId)
           
 Boolean releasePerform(String releaseId, String goals, String arguments, boolean useReleaseProfile, Map repository, String username)
           
 String releasePerformFromScm(String goals, String arguments, boolean useReleaseProfile, Map repository, String scmUrl, String scmUsername, String scmPassword, String scmTag, String scmTagBase, Map environments, String username)
           
 String releasePrepare(Map project, Properties properties, Map releaseVersion, Map developmentVersion, Map environments, String username)
           
 Boolean releaseRollback(String releaseId, int projectId)
           
 Boolean removeFromBuildQueue(int projectId, int buildDefinitionId)
           
 Boolean removeFromBuildQueue(List<String> hashCodes)
           
 Boolean removeFromPrepareBuildQueue(int projectGroupId, int scmRootId)
           
 Boolean removeFromPrepareBuildQueue(List<String> hashCodes)
           
 Boolean removeListener(String releaseId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SlaveBuildAgentTransportServer

public SlaveBuildAgentTransportServer(ContinuumBuildAgentService continuumBuildAgentService)
Method Detail

buildProjects

public Boolean buildProjects(List<Map<String,Object>> projectsBuildContext)
                      throws Exception
Specified by:
buildProjects in interface SlaveBuildAgentTransportService
Throws:
Exception

getAvailableInstallations

public List<Map<String,String>> getAvailableInstallations()
                                                   throws Exception
Specified by:
getAvailableInstallations in interface SlaveBuildAgentTransportService
Throws:
Exception

getBuildResult

public Map<String,Object> getBuildResult(int projectId)
                                  throws Exception
Specified by:
getBuildResult in interface SlaveBuildAgentTransportService
Throws:
Exception

getProjectCurrentlyBuilding

public Map<String,Object> getProjectCurrentlyBuilding()
                                               throws Exception
Specified by:
getProjectCurrentlyBuilding in interface SlaveBuildAgentTransportService
Throws:
Exception

ping

public Boolean ping()
             throws Exception
Specified by:
ping in interface SlaveBuildAgentTransportService
Throws:
Exception

cancelBuild

public Boolean cancelBuild()
                    throws Exception
Specified by:
cancelBuild in interface SlaveBuildAgentTransportService
Throws:
Exception

generateWorkingCopyContent

public String generateWorkingCopyContent(int projectId,
                                         String directory,
                                         String baseUrl,
                                         String imagesBaseUrl)
                                  throws Exception
Specified by:
generateWorkingCopyContent in interface SlaveBuildAgentTransportService
Throws:
Exception

getProjectFile

public Map<String,Object> getProjectFile(int projectId,
                                         String directory,
                                         String filename)
                                  throws Exception
Specified by:
getProjectFile in interface SlaveBuildAgentTransportService
Throws:
Exception

getReleasePluginParameters

public Map getReleasePluginParameters(int projectId,
                                      String pomFilename)
                               throws Exception
Specified by:
getReleasePluginParameters in interface SlaveBuildAgentTransportService
Throws:
Exception

processProject

public List<Map<String,String>> processProject(int projectId,
                                               String pomFilename,
                                               boolean autoVersionSubmodules)
                                        throws Exception
Specified by:
processProject in interface SlaveBuildAgentTransportService
Throws:
Exception

releasePrepare

public String releasePrepare(Map project,
                             Properties properties,
                             Map releaseVersion,
                             Map developmentVersion,
                             Map environments,
                             String username)
                      throws Exception
Specified by:
releasePrepare in interface SlaveBuildAgentTransportService
Throws:
Exception

getListener

public Map<String,Object> getListener(String releaseId)
                               throws Exception
Specified by:
getListener in interface SlaveBuildAgentTransportService
Throws:
Exception

getReleaseResult

public Map<String,Object> getReleaseResult(String releaseId)
                                    throws Exception
Specified by:
getReleaseResult in interface SlaveBuildAgentTransportService
Throws:
Exception

removeListener

public Boolean removeListener(String releaseId)
                       throws Exception
Specified by:
removeListener in interface SlaveBuildAgentTransportService
Throws:
Exception

getPreparedReleaseName

public String getPreparedReleaseName(String releaseId)
                              throws Exception
Specified by:
getPreparedReleaseName in interface SlaveBuildAgentTransportService
Throws:
Exception

releasePerform

public Boolean releasePerform(String releaseId,
                              String goals,
                              String arguments,
                              boolean useReleaseProfile,
                              Map repository,
                              String username)
                       throws Exception
Specified by:
releasePerform in interface SlaveBuildAgentTransportService
Throws:
Exception

releasePerformFromScm

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
Specified by:
releasePerformFromScm in interface SlaveBuildAgentTransportService
Throws:
Exception

releaseCleanup

public String releaseCleanup(String releaseId)
                      throws Exception
Specified by:
releaseCleanup in interface SlaveBuildAgentTransportService
Throws:
Exception

releaseRollback

public Boolean releaseRollback(String releaseId,
                               int projectId)
                        throws Exception
Specified by:
releaseRollback in interface SlaveBuildAgentTransportService
Throws:
Exception

getBuildSizeOfAgent

public Integer getBuildSizeOfAgent()
                            throws Exception
Specified by:
getBuildSizeOfAgent in interface SlaveBuildAgentTransportService
Throws:
Exception

getProjectCurrentlyPreparingBuild

public Map<String,Object> getProjectCurrentlyPreparingBuild()
                                                     throws Exception
Specified by:
getProjectCurrentlyPreparingBuild in interface SlaveBuildAgentTransportService
Throws:
Exception

getProjectsAndBuildDefinitionsCurrentlyPreparingBuild

public List<Map<String,Object>> getProjectsAndBuildDefinitionsCurrentlyPreparingBuild()
                                                                               throws Exception
Specified by:
getProjectsAndBuildDefinitionsCurrentlyPreparingBuild in interface SlaveBuildAgentTransportService
Throws:
Exception

getProjectsInBuildQueue

public List<Map<String,Object>> getProjectsInBuildQueue()
                                                 throws Exception
Specified by:
getProjectsInBuildQueue in interface SlaveBuildAgentTransportService
Throws:
Exception

getProjectsInPrepareBuildQueue

public List<Map<String,Object>> getProjectsInPrepareBuildQueue()
                                                        throws Exception
Specified by:
getProjectsInPrepareBuildQueue in interface SlaveBuildAgentTransportService
Throws:
Exception

getProjectsAndBuildDefinitionsInPrepareBuildQueue

public List<Map<String,Object>> getProjectsAndBuildDefinitionsInPrepareBuildQueue()
                                                                           throws Exception
Specified by:
getProjectsAndBuildDefinitionsInPrepareBuildQueue in interface SlaveBuildAgentTransportService
Throws:
Exception

isProjectGroupInQueue

public Boolean isProjectGroupInQueue(int projectGroupId)
                              throws Exception
Specified by:
isProjectGroupInQueue in interface SlaveBuildAgentTransportService
Throws:
Exception

isProjectScmRootInQueue

public Boolean isProjectScmRootInQueue(int projectScmRootId,
                                       List<Integer> projectIds)
                                throws Exception
Specified by:
isProjectScmRootInQueue in interface SlaveBuildAgentTransportService
Throws:
Exception

isProjectCurrentlyBuilding

public Boolean isProjectCurrentlyBuilding(int projectId,
                                          int buildDefinitionId)
                                   throws Exception
Specified by:
isProjectCurrentlyBuilding in interface SlaveBuildAgentTransportService
Throws:
Exception

isProjectInBuildQueue

public Boolean isProjectInBuildQueue(int projectId,
                                     int buildDefinitionId)
                              throws Exception
Specified by:
isProjectInBuildQueue in interface SlaveBuildAgentTransportService
Throws:
Exception

isProjectCurrentlyPreparingBuild

public Boolean isProjectCurrentlyPreparingBuild(int projectId,
                                                int buildDefinitionId)
                                         throws Exception
Specified by:
isProjectCurrentlyPreparingBuild in interface SlaveBuildAgentTransportService
Throws:
Exception

isProjectInPrepareBuildQueue

public Boolean isProjectInPrepareBuildQueue(int projectId,
                                            int buildDefinitionId)
                                     throws Exception
Specified by:
isProjectInPrepareBuildQueue in interface SlaveBuildAgentTransportService
Throws:
Exception

isProjectGroupInPrepareBuildQueue

public Boolean isProjectGroupInPrepareBuildQueue(int projectGroupId)
                                          throws Exception
Specified by:
isProjectGroupInPrepareBuildQueue in interface SlaveBuildAgentTransportService
Throws:
Exception

isProjectGroupCurrentlyPreparingBuild

public Boolean isProjectGroupCurrentlyPreparingBuild(int projectGroupId)
                                              throws Exception
Specified by:
isProjectGroupCurrentlyPreparingBuild in interface SlaveBuildAgentTransportService
Throws:
Exception

removeFromPrepareBuildQueue

public Boolean removeFromPrepareBuildQueue(int projectGroupId,
                                           int scmRootId)
                                    throws Exception
Specified by:
removeFromPrepareBuildQueue in interface SlaveBuildAgentTransportService
Throws:
Exception

removeFromPrepareBuildQueue

public Boolean removeFromPrepareBuildQueue(List<String> hashCodes)
                                    throws Exception
Specified by:
removeFromPrepareBuildQueue in interface SlaveBuildAgentTransportService
Throws:
Exception

removeFromBuildQueue

public Boolean removeFromBuildQueue(int projectId,
                                    int buildDefinitionId)
                             throws Exception
Specified by:
removeFromBuildQueue in interface SlaveBuildAgentTransportService
Throws:
Exception

removeFromBuildQueue

public Boolean removeFromBuildQueue(List<String> hashCodes)
                             throws Exception
Specified by:
removeFromBuildQueue in interface SlaveBuildAgentTransportService
Throws:
Exception

getBuildAgentPlatform

public String getBuildAgentPlatform()
                             throws Exception
Description copied from interface: SlaveBuildAgentTransportService
Get build agent's platform.

Specified by:
getBuildAgentPlatform in interface SlaveBuildAgentTransportService
Returns:
The operating system name of the build agent
Throws:
Exception

executeDirectoryPurge

public void executeDirectoryPurge(String directoryType,
                                  int daysOlder,
                                  int retentionCount,
                                  boolean deleteAll)
                           throws Exception
Description copied from interface: SlaveBuildAgentTransportService
Execute a directory purge on the build agent

Specified by:
executeDirectoryPurge in interface SlaveBuildAgentTransportService
Parameters:
directoryType - valid types are working and releases
daysOlder - days older
retentionCount - retention count
deleteAll - delete all flag
Throws:
Exception - error that will occur during the purge


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.