View Javadoc

1   package org.apache.continuum.scm;
2   
3   import java.io.File;
4   import java.util.Date;
5   
6   /*
7    * Licensed to the Apache Software Foundation (ASF) under one
8    * or more contributor license agreements.  See the NOTICE file
9    * distributed with this work for additional information
10   * regarding copyright ownership.  The ASF licenses this file
11   * to you under the Apache License, Version 2.0 (the
12   * "License"); you may not use this file except in compliance
13   * with the License.  You may obtain a copy of the License at
14   *
15   *   http://www.apache.org/licenses/LICENSE-2.0
16   *
17   * Unless required by applicable law or agreed to in writing,
18   * software distributed under the License is distributed on an
19   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
20   * KIND, either express or implied.  See the License for the
21   * specific language governing permissions and limitations
22   * under the License.
23   */
24  
25  /**
26   * Configuration for a project's source control.
27   *
28   * @version $Id: ContinuumScmConfiguration.java 1372260 2012-08-13 04:29:09Z brett $
29   * @todo JAXB for persistence
30   */
31  public class ContinuumScmConfiguration
32  {
33      /**
34       * The SCM URL, in the format specified by Maven SCM.
35       */
36      private String url;
37  
38      /**
39       * The SCM username to use in connecting.
40       */
41      private String username;
42  
43      /**
44       * The SCM password to use in connecting.
45       *
46       * @todo using some service to obtain this rather than configuring it would be preferable
47       */
48      private String password;
49  
50      /**
51       * The tag, branch, or equivalent to check out from.
52       */
53      private String tag;
54  
55      /**
56       * The location of the working directory.
57       *
58       * @todo is this a File that is absolute, or is it a relative path under the working directories? How will JAXB
59       * manage? Don't want to store absolute path in the config unless that's what the user configured, so the base
60       * can be relocated.
61       */
62      private File workingDirectory;
63  
64      /**
65       * For SCM clients that support it, use cached credentials on the system to avoid needing to pass them in.
66       *
67       * @todo using some service to obtain them rather than configuring it would be preferable
68       */
69      private boolean useCredentialsCache;
70  
71      /**
72       * What was the last time this checkout was updated.
73       *
74       * @todo we need to improve on the techniques to achieve this
75       */
76      private Date latestUpdateDate;
77  
78      public String getUsername()
79      {
80          return username;
81      }
82  
83      public void setUsername( String username )
84      {
85          this.username = username;
86      }
87  
88      public String getPassword()
89      {
90          return password;
91      }
92  
93      public void setPassword( String password )
94      {
95          this.password = password;
96      }
97  
98      public String getTag()
99      {
100         return tag;
101     }
102 
103     public void setTag( String tag )
104     {
105         this.tag = tag;
106     }
107 
108     public boolean isUseCredentialsCache()
109     {
110         return useCredentialsCache;
111     }
112 
113     public void setUseCredentialsCache( boolean useCredentialsCache )
114     {
115         this.useCredentialsCache = useCredentialsCache;
116     }
117 
118     public String getUrl()
119     {
120         return url;
121     }
122 
123     public void setUrl( String url )
124     {
125         this.url = url;
126     }
127 
128     public File getWorkingDirectory()
129     {
130         return workingDirectory;
131     }
132 
133     public void setWorkingDirectory( File workingDirectory )
134     {
135         this.workingDirectory = workingDirectory;
136     }
137 
138     public Date getLatestUpdateDate()
139     {
140         return latestUpdateDate;
141     }
142 
143     public void setLatestUpdateDate( Date latestUpdateDate )
144     {
145         this.latestUpdateDate = latestUpdateDate;
146     }
147 }