KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > subversion > client > UnsupportedSvnClientAdapter


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;
21
22 import org.tigris.subversion.svnclientadapter.*;
23 import org.openide.util.NbBundle;
24 import java.io.File JavaDoc;
25 import java.io.InputStream JavaDoc;
26 import java.io.IOException JavaDoc;
27 import java.util.List JavaDoc;
28
29 /**
30  * Implementation that always denies to do anything.
31  * It's used if user does not have installed proper
32  * Subversion commandline client.
33  *
34  * @author Petr Kuzel
35  */

36 public class UnsupportedSvnClientAdapter implements ISVNClientAdapter {
37
38     public static String JavaDoc getMessage() {
39         return NbBundle.getMessage(UnsupportedSvnClientAdapter.class, "MSG_Unsupported_Version"); // NOI18N
40
}
41
42     private void unsupported() throws SVNClientException {
43         throw new SVNClientException(getMessage());
44     }
45
46     public void addNotifyListener(ISVNNotifyListener listener) {
47     }
48
49     public void removeNotifyListener(ISVNNotifyListener listener) {
50     }
51
52     public void setUsername(String JavaDoc username) {
53     }
54
55     public void setPassword(String JavaDoc password) {
56     }
57
58     public void addPasswordCallback(ISVNPromptUserPassword callback) {
59     }
60
61     public void addFile(File JavaDoc file) throws SVNClientException {
62         unsupported();
63     }
64
65     public void addFile(File JavaDoc file[], boolean recurse) throws SVNClientException {
66         unsupported();
67     }
68     
69     public void addDirectory(File JavaDoc dir, boolean recurse) throws SVNClientException {
70         unsupported();
71     }
72
73     public void checkout(SVNUrl moduleName, File JavaDoc destPath, SVNRevision revision, boolean recurse) throws SVNClientException {
74         unsupported();
75     }
76
77     public long commit(File JavaDoc[] paths, String JavaDoc message, boolean recurse) throws SVNClientException {
78         unsupported();
79         return 0;
80     }
81
82     public long commit(File JavaDoc[] paths, String JavaDoc message, boolean recurse, boolean keepLocks) throws SVNClientException {
83         unsupported();
84         return 0;
85     }
86
87     public long[] commitAcrossWC(File JavaDoc[] paths, String JavaDoc message, boolean recurse, boolean keepLocks, boolean Atomic) throws SVNClientException {
88         unsupported();
89         return new long[0];
90     }
91
92     public ISVNDirEntry[] getList(SVNUrl url, SVNRevision revision, boolean recurse) throws SVNClientException {
93         unsupported();
94         return new ISVNDirEntry[0];
95     }
96
97     public ISVNDirEntry[] getList(File JavaDoc path, SVNRevision revision, boolean recurse) throws SVNClientException {
98         unsupported();
99         return new ISVNDirEntry[0];
100     }
101
102     public ISVNDirEntry getDirEntry(SVNUrl url, SVNRevision revision) throws SVNClientException {
103         unsupported();
104         return null;
105     }
106
107     public ISVNDirEntry getDirEntry(File JavaDoc path, SVNRevision revision) throws SVNClientException {
108         unsupported();
109         return null;
110     }
111
112     public ISVNStatus getSingleStatus(File JavaDoc path) throws SVNClientException {
113         unsupported();
114         return null;
115     }
116
117     public ISVNStatus[] getStatus(File JavaDoc[] path) throws SVNClientException {
118         unsupported();
119         return new ISVNStatus[0];
120     }
121
122     public ISVNStatus[] getStatus(File JavaDoc path, boolean descend, boolean getAll) throws SVNClientException {
123         unsupported();
124         return new ISVNStatus[0];
125     }
126
127     public ISVNStatus[] getStatus(File JavaDoc path, boolean descend, boolean getAll, boolean contactServer) throws SVNClientException {
128         unsupported();
129         return new ISVNStatus[0];
130     }
131
132     public void copy(File JavaDoc srcPath, File JavaDoc destPath) throws SVNClientException {
133         unsupported();
134     }
135
136     public void copy(File JavaDoc srcPath, SVNUrl destUrl, String JavaDoc message) throws SVNClientException {
137         unsupported();
138     }
139
140     public void copy(SVNUrl srcUrl, File JavaDoc destPath, SVNRevision revision) throws SVNClientException {
141         unsupported();
142     }
143
144     public void copy(SVNUrl srcUrl, SVNUrl destUrl, String JavaDoc message, SVNRevision revision) throws SVNClientException {
145         unsupported();
146     }
147
148     public void remove(SVNUrl url[], String JavaDoc message) throws SVNClientException {
149         unsupported();
150     }
151
152     public void remove(File JavaDoc file[], boolean force) throws SVNClientException {
153         unsupported();
154     }
155
156     public void doExport(SVNUrl srcUrl, File JavaDoc destPath, SVNRevision revision, boolean force) throws SVNClientException {
157         unsupported();
158     }
159
160     public void doExport(File JavaDoc srcPath, File JavaDoc destPath, boolean force) throws SVNClientException {
161         unsupported();
162     }
163
164     public void doImport(File JavaDoc path, SVNUrl url, String JavaDoc message, boolean recurse) throws SVNClientException {
165         unsupported();
166     }
167
168     public void mkdir(SVNUrl url, String JavaDoc message) throws SVNClientException {
169         unsupported();
170     }
171
172     public void mkdir(SVNUrl url, boolean makeParents, String JavaDoc message) throws SVNClientException {
173         unsupported();
174     }
175
176     public void mkdir(File JavaDoc file) throws SVNClientException {
177         unsupported();
178     }
179
180     public void move(File JavaDoc srcPath, File JavaDoc destPath, boolean force) throws SVNClientException {
181         unsupported();
182     }
183
184     public void move(SVNUrl srcUrl, SVNUrl destUrl, String JavaDoc message, SVNRevision revision) throws SVNClientException {
185         unsupported();
186     }
187
188     public long update(File JavaDoc path, SVNRevision revision, boolean recurse) throws SVNClientException {
189         unsupported();
190         return 0;
191     }
192
193     public long[] update(File JavaDoc[] path, SVNRevision revision, boolean recurse, boolean ignoreExternals) throws SVNClientException {
194         unsupported();
195         return new long[0];
196     }
197
198     public void revert(File JavaDoc path, boolean recurse) throws SVNClientException {
199         unsupported();
200     }
201
202     public void revert(File JavaDoc[] arg0, boolean arg1) throws SVNClientException {
203         unsupported();
204     }
205     
206     public ISVNLogMessage[] getLogMessages(SVNUrl url, SVNRevision revisionStart, SVNRevision revisionEnd) throws SVNClientException {
207         unsupported();
208         return new ISVNLogMessage[0];
209     }
210
211     public ISVNLogMessage[] getLogMessages(SVNUrl url, SVNRevision revisionStart, SVNRevision revisionEnd, boolean fetchChangePath) throws SVNClientException {
212         unsupported();
213         return new ISVNLogMessage[0];
214     }
215
216     public ISVNLogMessage[] getLogMessages(File JavaDoc path, SVNRevision revisionStart, SVNRevision revisionEnd) throws SVNClientException {
217         unsupported();
218         return new ISVNLogMessage[0];
219     }
220
221     public ISVNLogMessage[] getLogMessages(File JavaDoc path, SVNRevision revisionStart, SVNRevision revisionEnd, boolean fetchChangePath) throws SVNClientException {
222         unsupported();
223         return new ISVNLogMessage[0];
224     }
225
226     public ISVNLogMessage[] getLogMessages(File JavaDoc path, SVNRevision revisionStart, SVNRevision revisionEnd, boolean stopOnCopy, boolean fetchChangePath) throws SVNClientException {
227         unsupported();
228         return new ISVNLogMessage[0];
229     }
230
231     public ISVNLogMessage[] getLogMessages(File JavaDoc path, SVNRevision revisionStart, SVNRevision revisionEnd, boolean stopOnCopy, boolean fetchChangePath, long limit) throws SVNClientException {
232         unsupported();
233         return new ISVNLogMessage[0];
234     }
235
236     public ISVNLogMessage[] getLogMessages(SVNUrl url, SVNRevision pegRevision, SVNRevision revisionStart, SVNRevision revisionEnd, boolean stopOnCopy, boolean fetchChangePath, long limit) throws SVNClientException {
237         unsupported();
238         return new ISVNLogMessage[0];
239     }
240
241     public ISVNLogMessage[] getLogMessages(SVNUrl url, String JavaDoc[] paths, SVNRevision revStart, SVNRevision revEnd, boolean stopOnCopy, boolean fetchChangePath) throws SVNClientException {
242         return new ISVNLogMessage[0];
243     }
244
245     public InputStream JavaDoc getContent(SVNUrl url, SVNRevision revision) throws SVNClientException {
246         unsupported();
247         return null;
248     }
249
250     public InputStream JavaDoc getContent(File JavaDoc path, SVNRevision revision) throws SVNClientException {
251         unsupported();
252         return null;
253     }
254
255     public void propertySet(File JavaDoc path, String JavaDoc propertyName, String JavaDoc propertyValue, boolean recurse) throws SVNClientException {
256         unsupported();
257     }
258
259     public void propertySet(File JavaDoc path, String JavaDoc propertyName, File JavaDoc propertyFile, boolean recurse) throws SVNClientException, IOException JavaDoc {
260         unsupported();
261     }
262
263     public ISVNProperty propertyGet(File JavaDoc path, String JavaDoc propertyName) throws SVNClientException {
264         unsupported();
265         return null;
266     }
267
268     public ISVNProperty propertyGet(SVNUrl url, String JavaDoc propertyName) throws SVNClientException {
269         unsupported();
270         return null;
271     }
272
273     public void propertyDel(File JavaDoc path, String JavaDoc propertyName, boolean recurse) throws SVNClientException {
274         unsupported();
275     }
276
277     public void setRevProperty(SVNUrl path, SVNRevision.Number revisionNo, String JavaDoc propName, String JavaDoc propertyData, boolean force) throws SVNClientException {
278         unsupported();
279     }
280
281     public List JavaDoc getIgnoredPatterns(File JavaDoc path) throws SVNClientException {
282         unsupported();
283         return null;
284     }
285
286     public void addToIgnoredPatterns(File JavaDoc path, String JavaDoc pattern) throws SVNClientException {
287         unsupported();
288     }
289
290     public void setIgnoredPatterns(File JavaDoc path, List JavaDoc patterns) throws SVNClientException {
291         unsupported();
292     }
293
294     public void diff(File JavaDoc oldPath, SVNRevision oldPathRevision, File JavaDoc newPath, SVNRevision newPathRevision, File JavaDoc outFile, boolean recurse) throws SVNClientException {
295         unsupported();
296     }
297
298     public void diff(File JavaDoc path, File JavaDoc outFile, boolean recurse) throws SVNClientException {
299         unsupported();
300     }
301
302     public void diff(SVNUrl oldUrl, SVNRevision oldUrlRevision, SVNUrl newUrl, SVNRevision newUrlRevision, File JavaDoc outFile, boolean recurse) throws SVNClientException {
303         unsupported();
304     }
305
306     public void diff(SVNUrl url, SVNRevision oldUrlRevision, SVNRevision newUrlRevision, File JavaDoc outFile, boolean recurse) throws SVNClientException {
307         unsupported();
308     }
309
310     public void diff(File JavaDoc path, SVNUrl url, SVNRevision urlRevision, File JavaDoc outFile, boolean recurse) throws SVNClientException {
311         unsupported();
312     }
313
314     public SVNKeywords getKeywords(File JavaDoc path) throws SVNClientException {
315         unsupported();
316         return null;
317     }
318
319     public void setKeywords(File JavaDoc path, SVNKeywords keywords, boolean recurse) throws SVNClientException {
320         unsupported();
321     }
322
323     public SVNKeywords addKeywords(File JavaDoc path, SVNKeywords keywords) throws SVNClientException {
324         unsupported();
325         return null;
326     }
327
328     public SVNKeywords removeKeywords(File JavaDoc path, SVNKeywords keywords) throws SVNClientException {
329         unsupported();
330         return null;
331     }
332
333     public ISVNAnnotations annotate(SVNUrl url, SVNRevision revisionStart, SVNRevision revisionEnd) throws SVNClientException {
334         unsupported();
335         return null;
336     }
337
338     public ISVNAnnotations annotate(File JavaDoc file, SVNRevision revisionStart, SVNRevision revisionEnd) throws SVNClientException {
339         unsupported();
340         return null;
341     }
342
343     public ISVNProperty[] getProperties(File JavaDoc path) throws SVNClientException {
344         unsupported();
345         return new ISVNProperty[0];
346     }
347
348     public ISVNProperty[] getProperties(SVNUrl url) throws SVNClientException {
349         unsupported();
350         return new ISVNProperty[0];
351     }
352
353     public void resolved(File JavaDoc path) throws SVNClientException {
354         unsupported();
355     }
356
357     public void createRepository(File JavaDoc path, String JavaDoc repositoryType) throws SVNClientException {
358         unsupported();
359     }
360
361     public void cancelOperation() throws SVNClientException {
362         unsupported();
363     }
364
365     public ISVNInfo getInfoFromWorkingCopy(File JavaDoc file) throws SVNClientException {
366         unsupported();
367         return null;
368     }
369
370     public ISVNInfo getInfo(File JavaDoc file) throws SVNClientException {
371         unsupported();
372         return null;
373     }
374
375     public ISVNInfo getInfo(SVNUrl url) throws SVNClientException {
376         unsupported();
377         return null;
378     }
379
380     public SVNUrl getRepositoryRoot(SVNUrl url) throws SVNClientException {
381         unsupported();
382         return null;
383     }
384
385     public void switchToUrl(File JavaDoc path, SVNUrl url, SVNRevision revision, boolean recurse) throws SVNClientException {
386         unsupported();
387     }
388
389     public void setConfigDirectory(File JavaDoc dir) throws SVNClientException {
390         unsupported();
391     }
392
393     public void cleanup(File JavaDoc dir) throws SVNClientException {
394         unsupported();
395     }
396     
397     public void merge(SVNUrl sVNUrl, SVNRevision sVNRevision, SVNUrl sVNUrl0, SVNRevision sVNRevision0, File JavaDoc file, boolean b, boolean b0, boolean b1, boolean b2) throws SVNClientException {
398         unsupported();
399     }
400
401     public void merge(SVNUrl sVNUrl, SVNRevision sVNRevision, SVNUrl sVNUrl0, SVNRevision sVNRevision0, File JavaDoc file, boolean b, boolean b0) throws SVNClientException {
402         unsupported();
403     }
404
405     public void merge(SVNUrl sVNUrl, SVNRevision sVNRevision, SVNUrl sVNUrl0, SVNRevision sVNRevision0, File JavaDoc file, boolean b, boolean b0, boolean b1) throws SVNClientException {
406         unsupported();
407     }
408     
409     public void lock(SVNUrl[] paths, String JavaDoc comment, boolean force) throws SVNClientException {
410         unsupported();
411     }
412
413     public void unlock(SVNUrl[] paths, boolean force) throws SVNClientException {
414         unsupported();
415     }
416
417     public void lock(File JavaDoc[] paths, String JavaDoc comment, boolean force) throws SVNClientException {
418         unsupported();
419     }
420
421     public void unlock(File JavaDoc[] paths, boolean force) throws SVNClientException {
422         unsupported();
423     }
424
425     public boolean statusReturnsRemoteInfo() {
426         return false;
427     }
428
429     public boolean canCommitAcrossWC() {
430         return false;
431     }
432
433     public String JavaDoc getAdminDirectoryName() {
434         return null;
435     }
436
437     public boolean isAdminDirectory(String JavaDoc name) {
438         return false;
439     }
440
441     public void relocate(String JavaDoc from, String JavaDoc to, String JavaDoc path, boolean recurse) throws SVNClientException {
442         unsupported();
443     }
444
445     public ISVNStatus[] getStatus(File JavaDoc file, boolean b, boolean b0, boolean b1, boolean b2) throws SVNClientException {
446         unsupported();
447         return null;
448     }
449
450     public ISVNInfo getInfo(SVNUrl sVNUrl, SVNRevision sVNRevision, SVNRevision sVNRevision0) throws SVNClientException {
451         unsupported();
452         return null;
453     }
454
455     public SVNNotificationHandler getNotificationHandler() {
456         // can't throw exception:(
457
return null;
458     }
459
460 }
461
Popular Tags