View Javadoc

1   package org.apache.continuum.builder.distributed.manager;
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  import org.apache.continuum.taskqueue.BuildProjectTask;
26  import org.apache.continuum.taskqueue.PrepareBuildProjectsTask;
27  import org.apache.maven.continuum.ContinuumException;
28  import org.apache.maven.continuum.model.system.Installation;
29  
30  public interface DistributedBuildManager
31  {
32      String ROLE = DistributedBuildManager.class.getName();
33  
34      void cancelDistributedBuild( String buildAgentUrl )
35          throws ContinuumException;
36  
37      void reload()
38          throws ContinuumException;
39  
40      void removeDistributedBuildQueueOfAgent( String buildAgentUrl )
41          throws ContinuumException;
42  
43      boolean isBuildAgentBusy( String buildAgentUrl );
44  
45      List<Installation> getAvailableInstallations( String buildAgentUrl )
46          throws ContinuumException;
47  
48      Map<String, List<PrepareBuildProjectsTask>> getProjectsInPrepareBuildQueue()
49          throws ContinuumException;
50  
51      Map<String, List<BuildProjectTask>> getProjectsInBuildQueue()
52          throws ContinuumException;
53  
54      Map<String, Object> getBuildResult( int projectId )
55          throws ContinuumException;
56  
57      String generateWorkingCopyContent( int projectId, String directory, String baseUrl, String imagesBaseUrl )
58          throws ContinuumException;
59  
60      String getFileContent( int projectId, String directory, String filename )
61          throws ContinuumException;
62  
63      void prepareBuildProjects( Map<Integer, Integer> projectsBuildDefinitionsMap, int trigger, int projectGroupId, 
64                                 String projectGroupName, String scmRootAddress, int scmRootId )
65          throws ContinuumException;
66  
67      Map<String, PrepareBuildProjectsTask> getProjectsCurrentlyPreparingBuild()
68          throws ContinuumException;
69  
70      Map<String, BuildProjectTask> getProjectsCurrentlyBuilding()
71          throws ContinuumException;
72  
73      void removeFromPrepareBuildQueue( String buildAgnetUrl, int projectGroupId, int scmRootId )
74          throws ContinuumException;
75  
76      void removeFromPrepareBuildQueue( List<String> hashCodes )
77          throws ContinuumException;
78  
79      void removeFromBuildQueue( String buildAgentUrl, int projectId, int buildDefinitionId )
80          throws ContinuumException;
81  
82      void removeFromBuildQueue( List<String> hashCodes )
83          throws ContinuumException;
84  }