View Javadoc

1   package org.apache.continuum.distributed.transport.slave;
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *   http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing,
15   * software distributed under the License is distributed on an
16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   * KIND, either express or implied.  See the License for the
18   * specific language governing permissions and limitations
19   * under the License.
20   */
21  
22  import com.atlassian.xmlrpc.ServiceObject;
23  
24  import java.util.List;
25  import java.util.Map;
26  import java.util.Properties;
27  
28  /**
29   * SlaveBuildAgentTransportService
30   */
31  @ServiceObject( "SlaveBuildAgentTransportService" )
32  public interface SlaveBuildAgentTransportService
33  {
34      public Boolean buildProjects( List<Map<String, Object>> projectsBuildContext )
35          throws Exception;
36  
37      public Map<String, Object> getBuildResult( int projectId )
38          throws Exception;
39  
40      public Map<String, Object> getProjectCurrentlyBuilding()
41          throws Exception;
42  
43      public List<Map<String, String>> getAvailableInstallations()
44          throws Exception;
45  
46      public Boolean ping()
47          throws Exception;
48  
49      public Boolean cancelBuild()
50          throws Exception;
51  
52      public String generateWorkingCopyContent( int projectId, String directory, String baseUrl, String imagesBaseUrl )
53          throws Exception;
54  
55      public Map<String, Object> getProjectFile( int projectId, String directory, String filename )
56          throws Exception;
57  
58      public Map getReleasePluginParameters( int projectId, String pomFilename )
59          throws Exception;
60  
61      public List<Map<String, String>> processProject( int projectId, String pomFilename, boolean autoVersionSubmodules )
62          throws Exception;
63  
64      public String releasePrepare( Map project, Properties properties, Map releaseVersion, Map developmentVersion,
65                                    Map environments, String username )
66          throws Exception;
67  
68      public Map<String, Object> getReleaseResult( String releaseId )
69          throws Exception;
70  
71      public Map<String, Object> getListener( String releaseId )
72          throws Exception;
73  
74      public Boolean removeListener( String releaseId )
75          throws Exception;
76  
77      public String getPreparedReleaseName( String releaseId )
78          throws Exception;
79  
80      public Boolean releasePerform( String releaseId, String goals, String arguments, boolean useReleaseProfile,
81                                     Map repository, String username )
82          throws Exception;
83  
84      public String releasePerformFromScm( String goals, String arguments, boolean useReleaseProfile, Map repository,
85                                           String scmUrl, String scmUsername, String scmPassword, String scmTag,
86                                           String scmTagBase, Map environments, String username )
87          throws Exception;
88  
89      public String releaseCleanup( String releaseId )
90          throws Exception;
91  
92      public Boolean releaseRollback( String releaseId, int projectId )
93          throws Exception;
94  
95      public Integer getBuildSizeOfAgent()
96          throws Exception;
97  
98      public List<Map<String, Object>> getProjectsInPrepareBuildQueue()
99          throws Exception;
100 
101     public List<Map<String, Object>> getProjectsAndBuildDefinitionsInPrepareBuildQueue()
102         throws Exception;
103 
104     public List<Map<String, Object>> getProjectsInBuildQueue()
105         throws Exception;
106 
107     public Map<String, Object> getProjectCurrentlyPreparingBuild()
108         throws Exception;
109 
110     public List<Map<String, Object>> getProjectsAndBuildDefinitionsCurrentlyPreparingBuild()
111         throws Exception;
112 
113     public Boolean isProjectGroupInQueue( int projectGroupId )
114         throws Exception;
115 
116     public Boolean isProjectScmRootInQueue( int projectScmRootId, List<Integer> projectIds )
117         throws Exception;
118 
119     public Boolean isProjectCurrentlyBuilding( int projectId, int buildDefinitionId )
120         throws Exception;
121 
122     public Boolean isProjectInBuildQueue( int projectId, int buildDefinitionId )
123         throws Exception;
124 
125     public Boolean isProjectCurrentlyPreparingBuild( int projectId, int buildDefinitionId )
126         throws Exception;
127 
128     public Boolean isProjectInPrepareBuildQueue( int projectId, int buildDefinitionId )
129         throws Exception;
130 
131     public Boolean isProjectGroupInPrepareBuildQueue( int projectGroupId )
132         throws Exception;
133 
134     public Boolean isProjectGroupCurrentlyPreparingBuild( int projectGroupId )
135         throws Exception;
136 
137     public Boolean removeFromPrepareBuildQueue( int projectGroupId, int scmRootId )
138         throws Exception;
139 
140     public Boolean removeFromPrepareBuildQueue( List<String> hashCodes )
141         throws Exception;
142 
143     public Boolean removeFromBuildQueue( int projectId, int buildDefinitionId )
144         throws Exception;
145 
146     public Boolean removeFromBuildQueue( List<String> hashCodes )
147         throws Exception;
148 
149     /**
150      * Get build agent's platform.
151      *
152      * @return The operating system name of the build agent
153      * @throws Exception
154      */
155     public String getBuildAgentPlatform()
156         throws Exception;
157 
158     /**
159      * Execute a directory purge on the build agent
160      *
161      * @param directoryType  valid types are <i>working</i> and <i>releases</i>
162      * @param daysOlder      days older
163      * @param retentionCount retention count
164      * @param deleteAll      delete all flag
165      * @throws Exception error that will occur during the purge
166      */
167     public void executeDirectoryPurge( String directoryType, int daysOlder, int retentionCount, boolean deleteAll )
168         throws Exception;
169 }