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 | * @todo JAXB for persistence |
29 | * |
30 | * @version $Id: ContinuumScmConfiguration.java 729441 2008-12-25 21:27:06Z olamy $ |
31 | */ |
32 | public class ContinuumScmConfiguration |
33 | { |
34 | /** The SCM URL, in the format specified by Maven SCM. */ |
35 | private String url; |
36 | |
37 | /** |
38 | * The SCM username to use in connecting. |
39 | */ |
40 | private String username; |
41 | |
42 | /** |
43 | * The SCM password to use in connecting. |
44 | * |
45 | * @todo using some service to obtain this rather than configuring it would be preferable |
46 | */ |
47 | private String password; |
48 | |
49 | /** The tag, branch, or equivalent to check out from. */ |
50 | private String tag; |
51 | |
52 | /** |
53 | * The location of the working directory. |
54 | * |
55 | * @todo is this a File that is absolute, or is it a relative path under the working directories? How will JAXB |
56 | * manage? Don't want to store absolute path in the config unless that's what the user configured, so the base |
57 | * can be relocated. |
58 | */ |
59 | private File workingDirectory; |
60 | |
61 | /** |
62 | * For SCM clients that support it, use cached credentials on the system to avoid needing to pass them in. |
63 | * |
64 | * @todo using some service to obtain them rather than configuring it would be preferable |
65 | */ |
66 | private boolean useCredentialsCache; |
67 | |
68 | /** |
69 | * What was the last time this checkout was updated. |
70 | * |
71 | * @todo we need to improve on the techniques to achieve this |
72 | */ |
73 | private Date latestUpdateDate; |
74 | |
75 | public String getUsername() |
76 | { |
77 | return username; |
78 | } |
79 | |
80 | public void setUsername( String username ) |
81 | { |
82 | this.username = username; |
83 | } |
84 | |
85 | public String getPassword() |
86 | { |
87 | return password; |
88 | } |
89 | |
90 | public void setPassword( String password ) |
91 | { |
92 | this.password = password; |
93 | } |
94 | |
95 | public String getTag() |
96 | { |
97 | return tag; |
98 | } |
99 | |
100 | public void setTag( String tag ) |
101 | { |
102 | this.tag = tag; |
103 | } |
104 | |
105 | public boolean isUseCredentialsCache() |
106 | { |
107 | return useCredentialsCache; |
108 | } |
109 | |
110 | public void setUseCredentialsCache( boolean useCredentialsCache ) |
111 | { |
112 | this.useCredentialsCache = useCredentialsCache; |
113 | } |
114 | |
115 | public String getUrl() |
116 | { |
117 | return url; |
118 | } |
119 | |
120 | public void setUrl( String url ) |
121 | { |
122 | this.url = url; |
123 | } |
124 | |
125 | public File getWorkingDirectory() |
126 | { |
127 | return workingDirectory; |
128 | } |
129 | |
130 | public void setWorkingDirectory( File workingDirectory ) |
131 | { |
132 | this.workingDirectory = workingDirectory; |
133 | } |
134 | |
135 | public Date getLatestUpdateDate() |
136 | { |
137 | return latestUpdateDate; |
138 | } |
139 | |
140 | public void setLatestUpdateDate( Date latestUpdateDate ) |
141 | { |
142 | this.latestUpdateDate = latestUpdateDate; |
143 | } |
144 | } |