View Javadoc

1   package org.apache.continuum.buildagent.taskqueue;
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  
24  import org.apache.continuum.buildagent.buildcontext.BuildContext;
25  import org.codehaus.plexus.taskqueue.Task;
26  
27  public class PrepareBuildProjectsTask
28      implements Task
29  {
30      private final List<BuildContext> buildContexts;
31  
32      private final int trigger;
33  
34      private final int projectGroupId;
35  
36      private final String scmRootAddress;
37  
38      private final int scmRootId;
39  
40      public PrepareBuildProjectsTask( List<BuildContext> buildContexts, int trigger, int projectGroupId,
41                                       String scmRootAddress, int scmRootId )
42      {
43          this.buildContexts = buildContexts;
44          this.trigger = trigger;
45          this.projectGroupId = projectGroupId;
46          this.scmRootAddress = scmRootAddress;
47          this.scmRootId = scmRootId;
48      }
49  
50      public long getMaxExecutionTime()
51      {
52          // TODO Auto-generated method stub
53          return 0;
54      }
55  
56      public List<BuildContext> getBuildContexts()
57      {
58          return buildContexts;
59      }
60  
61      public int getTrigger()
62      {
63          return trigger;
64      }
65  
66      public int getProjectGroupId()
67      {
68          return projectGroupId;
69      }
70  
71      public String getScmRootAddress()
72      {
73          return scmRootAddress;
74      }
75  
76      public int getScmRootId()
77      {
78          return scmRootId;
79      }
80  
81      public int getHashCode()
82      {
83          return projectGroupId + scmRootId + trigger;
84      }
85  }