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.maven.continuum.model.project.Project;
23  import org.codehaus.plexus.taskqueue.Task;
24  
25  import java.io.File;
26  import java.util.List;
27  
28  /**
29   * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
30   * @version $Id: CheckOutTask.java 1391353 2012-09-28 07:50:49Z brett $
31   */
32  public class CheckOutTask
33      implements Task
34  {
35      private final int projectId;
36  
37      private final File workingDirectory;
38  
39      private final String projectName;
40  
41      private final String scmUserName;
42  
43      private final String scmPassword;
44  
45      private final String scmRootUrl;
46  
47      private final List<Project> projectsWithCommonScmRoot;
48  
49      public CheckOutTask( int projectId, File workingDirectory, String projectName, String scmUserName,
50                           String scmPassword, String scmRootUrl, List<Project> projectsWithCommonScmRoot )
51      {
52          this.projectId = projectId;
53  
54          this.workingDirectory = workingDirectory;
55  
56          this.projectName = projectName;
57  
58          this.scmUserName = scmUserName;
59  
60          this.scmPassword = scmPassword;
61  
62          this.scmRootUrl = scmRootUrl;
63  
64          this.projectsWithCommonScmRoot = projectsWithCommonScmRoot;
65      }
66  
67      public int getProjectId()
68      {
69          return projectId;
70      }
71  
72      public File getWorkingDirectory()
73      {
74          return workingDirectory;
75      }
76  
77      public long getMaxExecutionTime()
78      {
79          return 0;
80      }
81  
82      public String getProjectName()
83      {
84          return projectName;
85      }
86  
87  
88      public String getScmUserName()
89      {
90          return scmUserName;
91      }
92  
93      public String getScmPassword()
94      {
95          return scmPassword;
96      }
97  
98      public int getHashCode()
99      {
100         return this.hashCode();
101     }
102 
103     public String getScmRootUrl()
104     {
105         return scmRootUrl;
106     }
107 
108     public List<Project> getProjectsWithCommonScmRoot()
109     {
110         return projectsWithCommonScmRoot;
111     }
112 }