View Javadoc

1   package org.apache.continuum.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 org.apache.continuum.utils.build.BuildTrigger;
23  import org.codehaus.plexus.taskqueue.Task;
24  
25  import java.util.Map;
26  
27  public class PrepareBuildProjectsTask
28      implements Task
29  {
30      private final Map<Integer, Integer> projectsBuildDefinitionsMap;
31  
32      private BuildTrigger buildTrigger;
33  
34      private final int projectGroupId;
35  
36      private final String projectGroupName;
37  
38      private final String scmRootAddress;
39  
40      private final int projectScmRootId;
41  
42      public PrepareBuildProjectsTask( Map<Integer, Integer> projectsBuildDefinitionsMap, BuildTrigger buildTrigger,
43                                       int projectGroupId, String projectGroupName, String scmRootAddress,
44                                       int projectScmRootId )
45      {
46          this.projectsBuildDefinitionsMap = projectsBuildDefinitionsMap;
47          this.buildTrigger = buildTrigger;
48          this.projectGroupId = projectGroupId;
49          this.projectGroupName = projectGroupName;
50          this.scmRootAddress = scmRootAddress;
51          this.projectScmRootId = projectScmRootId;
52      }
53  
54      public long getMaxExecutionTime()
55      {
56          // TODO Auto-generated method stub
57          return 0;
58      }
59  
60      public Map<Integer, Integer> getProjectsBuildDefinitionsMap()
61      {
62          return projectsBuildDefinitionsMap;
63      }
64  
65      public BuildTrigger getBuildTrigger()
66      {
67          return buildTrigger;
68      }
69  
70      public int getHashCode()
71      {
72          return this.hashCode();
73      }
74  
75      public int getProjectGroupId()
76      {
77          return projectGroupId;
78      }
79  
80      public String getProjectGroupName()
81      {
82          return projectGroupName;
83      }
84  
85      public String getScmRootAddress()
86      {
87          return scmRootAddress;
88      }
89  
90      public int getProjectScmRootId()
91      {
92          return projectScmRootId;
93      }
94  
95      public int hashCode()
96      {
97          return this.projectGroupId + this.projectScmRootId + this.buildTrigger.getTrigger();
98      }
99  }