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