KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > subversion > client > parser > LocalSvnStatusImpl


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.subversion.client.parser;
21
22
23
24 import java.io.File JavaDoc;
25 import java.lang.UnsupportedOperationException JavaDoc;
26
27 import java.net.MalformedURLException JavaDoc;
28
29 import java.util.Date JavaDoc;
30
31 import org.tigris.subversion.svnclientadapter.ISVNStatus;
32
33 import org.tigris.subversion.svnclientadapter.SVNNodeKind;
34
35 import org.tigris.subversion.svnclientadapter.SVNRevision;
36
37 import org.tigris.subversion.svnclientadapter.SVNStatusKind;
38
39 import org.tigris.subversion.svnclientadapter.SVNUrl;
40
41
42
43
44 /**
45
46  *
47
48  * @author Ed Hillmann
49
50  */

51
52 public class LocalSvnStatusImpl implements ISVNStatus {
53
54
55
56     private File JavaDoc file = null;
57
58     private SVNUrl url = null;
59
60     private SVNRevision.Number revision = null;
61
62     private SVNNodeKind kind = null;
63
64     private SVNStatusKind textStatus = null;
65
66     private SVNStatusKind propStatus = null;
67
68     private String JavaDoc lastCommitAuthor = null;
69
70     private SVNRevision.Number lastChangedRevision = null;
71
72     private Date JavaDoc lastChangedDate = null;
73
74     private boolean isCopied = false;
75
76     private SVNUrl urlCopiedFrom = null;
77
78     private File JavaDoc conflictNew = null;
79
80     private File JavaDoc conflictOld = null;
81
82     private File JavaDoc conflictWorking = null;
83
84     private Date JavaDoc lockCreationDate = null;
85
86     private String JavaDoc lockComment = null;
87
88     private String JavaDoc lockOwner = null;
89
90     /** Creates a new instance of LocalSvnStatusImpl */
91
92     public LocalSvnStatusImpl(File JavaDoc file, String JavaDoc url, long revision, String JavaDoc kind,
93
94             String JavaDoc textStatus, String JavaDoc propStatus,
95
96             String JavaDoc lastCommitAuthor, long lastChangedRevision, Date JavaDoc lastChangedDate,
97
98             boolean isCopied, String JavaDoc urlCopiedFrom,
99
100             File JavaDoc conflictNew, File JavaDoc conflictOld, File JavaDoc conflictWorking,
101
102             Date JavaDoc lockCreationDate, String JavaDoc lockComment, String JavaDoc lockOwner) {
103
104         this.file = file;
105
106
107
108         if (url != null) {
109
110             try {
111
112                 this.url = new SVNUrl(url);
113
114             } catch (MalformedURLException JavaDoc ex) {
115
116                 throw new IllegalArgumentException JavaDoc(ex);
117
118             }
119
120         }
121
122
123
124         this.revision = new SVNRevision.Number(revision);
125
126         this.kind = SVNNodeKind.fromString(kind);
127
128
129
130         this.textStatus = SVNStatusKind.fromString(textStatus);
131
132         this.propStatus = SVNStatusKind.fromString(propStatus);
133
134
135
136         this.lastCommitAuthor = lastCommitAuthor;
137
138         this.lastChangedRevision = new SVNRevision.Number(lastChangedRevision);
139
140         this.lastChangedDate = lastChangedDate;
141
142
143
144         this.isCopied = isCopied;
145
146         if (urlCopiedFrom != null) {
147
148             try {
149
150                 this.urlCopiedFrom = new SVNUrl(urlCopiedFrom);
151
152             } catch (MalformedURLException JavaDoc ex) {
153
154                 throw new IllegalArgumentException JavaDoc(ex);
155
156             }
157
158         }
159
160
161
162         this.conflictNew = conflictNew;
163
164         this.conflictOld = conflictOld;
165
166         this.conflictWorking = conflictWorking;
167
168         this.lockCreationDate = lockCreationDate;
169
170         this.lockComment = lockComment;
171
172         this.lockOwner = lockOwner;
173
174     }
175
176
177
178     public boolean isCopied() {
179
180         return isCopied;
181
182     }
183
184
185
186     public SVNUrl getUrlCopiedFrom() {
187
188         return urlCopiedFrom;
189
190     }
191
192
193
194     public SVNUrl getUrl() {
195
196         return url;
197
198     }
199
200
201
202     public SVNStatusKind getTextStatus() {
203
204         return textStatus;
205
206     }
207
208
209
210     public SVNRevision.Number getRevision() {
211
212         return revision;
213
214     }
215
216
217
218     public SVNStatusKind getRepositoryTextStatus() {
219
220         throw new UnsupportedOperationException JavaDoc("getRepositoryTextStatus() is not implemented"); // NOI18N
221

222     }
223
224
225
226     public SVNStatusKind getRepositoryPropStatus() {
227
228         throw new UnsupportedOperationException JavaDoc("getRepositoryPropStatus() is not implemented"); // NOI18N
229

230     }
231
232
233
234     public File JavaDoc getConflictNew() {
235
236         return conflictNew;
237
238     }
239
240
241
242     public File JavaDoc getConflictOld() {
243
244         return conflictOld;
245
246     }
247
248
249
250     public File JavaDoc getConflictWorking() {
251
252         return conflictWorking;
253
254     }
255
256
257
258     public File JavaDoc getFile() {
259
260         return file;
261
262     }
263
264
265
266     public Date JavaDoc getLastChangedDate() {
267
268         return lastChangedDate;
269
270     }
271
272
273
274     public SVNRevision.Number getLastChangedRevision() {
275
276         return lastChangedRevision;
277
278     }
279
280
281
282     public String JavaDoc getLastCommitAuthor() {
283
284         return lastCommitAuthor;
285
286     }
287
288
289
290     public String JavaDoc getLockComment() {
291
292         return lockComment;
293
294     }
295
296
297
298     public Date JavaDoc getLockCreationDate() {
299
300         return lockCreationDate;
301
302     }
303
304
305
306     public String JavaDoc getLockOwner() {
307
308         return lockOwner;
309
310     }
311
312
313
314     public SVNNodeKind getNodeKind() {
315
316         return kind;
317
318     }
319
320
321
322     public String JavaDoc getPath() {
323
324         return file.getPath();
325
326     }
327
328
329
330     public SVNStatusKind getPropStatus() {
331
332         return propStatus;
333
334     }
335
336     public String JavaDoc getUrlString() {
337         return url.toString();
338     }
339
340     public boolean isWcLocked() {
341         // TODO implement me
342
throw new UnsupportedOperationException JavaDoc("not implemented yet"); // NOI18N
343
}
344
345     public boolean isSwitched() {
346         // TODO implement me
347
throw new UnsupportedOperationException JavaDoc("not implemented yet"); // NOI18N
348
}
349
350
351
352 }
353
354
Popular Tags