View Javadoc

1   package org.apache.continuum.buildagent;
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 java.util.List;
23  import java.util.Map;
24  
25  public interface ContinuumBuildAgentService
26  {
27      void buildProjects( List<Map<String, Object>> projectsBuildContext )
28          throws ContinuumBuildAgentException;
29  
30      List<Map<String, String>> getAvailableInstallations()
31          throws ContinuumBuildAgentException;
32  
33      Map<String, Object> getBuildResult( int projectId )
34          throws ContinuumBuildAgentException;
35  
36      Map<String, Object> getProjectCurrentlyBuilding()
37          throws ContinuumBuildAgentException;
38  
39      void cancelBuild()
40          throws ContinuumBuildAgentException;
41  
42      String generateWorkingCopyContent( int projectId, String userDirectory, String baseUrl, String imagesBaseUrl )
43          throws ContinuumBuildAgentException;
44  
45      String getProjectFileContent( int projectId, String directory, String filename )
46          throws ContinuumBuildAgentException;
47  
48      Map<String, Object> getReleasePluginParameters( int projectId, String pomFilename )
49          throws ContinuumBuildAgentException;
50  
51      List<Map<String, String>> processProject( int projectId, String pomFilename, boolean autoVersionSubmodules )
52          throws ContinuumBuildAgentException;
53  
54      String releasePrepare( Map project, Map properties, Map releaseVersion, Map developmentVersion,
55                             Map<String, String> environments )
56          throws ContinuumBuildAgentException;
57  
58      Map<String, Object> getReleaseResult( String releaseId )
59          throws ContinuumBuildAgentException;
60  
61      Map<String, Object> getListener( String releaseId )
62          throws ContinuumBuildAgentException;
63  
64      void removeListener( String releaseId )
65          throws ContinuumBuildAgentException;
66  
67      String getPreparedReleaseName( String releaseId )
68          throws ContinuumBuildAgentException;
69  
70      void releasePerform( String releaseId, String goals, String arguments, boolean useReleaseProfile, Map repository )
71          throws ContinuumBuildAgentException;
72  
73      String releasePerformFromScm( String goals, String arguments, boolean useReleaseProfile, Map repository,
74                                    String scmUrl, String scmUsername, String scmPassword, String scmTag,
75                                    String scmTagBase, Map<String, String> environments )
76          throws ContinuumBuildAgentException;
77  
78      String releaseCleanup( String releaseId )
79          throws ContinuumBuildAgentException;
80  
81      void releaseRollback( String releaseId, int projectId )
82          throws ContinuumBuildAgentException;
83  
84      List<Map<String, Object>> getProjectsInPrepareBuildQueue()
85          throws ContinuumBuildAgentException;
86  
87      List<Map<String, Object>> getProjectsInBuildQueue()
88          throws ContinuumBuildAgentException;
89  
90      int getBuildSizeOfAgent()
91          throws ContinuumBuildAgentException;
92  
93      Map<String, Object> getProjectCurrentlyPreparingBuild()
94          throws ContinuumBuildAgentException;
95  
96      boolean isProjectGroupInQueue( int projectGroupId );
97  
98      boolean isProjectCurrentlyBuilding( int projectId );
99  
100     boolean isProjectInBuildQueue( int projectId );
101 
102     boolean removeFromPrepareBuildQueue( int projectGroupId, int scmRootId )
103         throws ContinuumBuildAgentException;
104 
105     void removeFromPrepareBuildQueue( List<String> hashCodes )
106         throws ContinuumBuildAgentException;
107 
108     boolean removeFromBuildQueue( int projectId, int builddefinitonId )
109         throws ContinuumBuildAgentException;
110 
111     void removeFromBuildQueue( List<String> hashCodes )
112         throws ContinuumBuildAgentException;
113 }