1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.commons.vfs2.provider.webdav;
18
19 import org.apache.commons.vfs2.FileSystem;
20 import org.apache.commons.vfs2.FileSystemOptions;
21 import org.apache.commons.vfs2.provider.http.HttpFileSystemConfigBuilder;
22
23
24
25
26
27
28 public final class WebdavFileSystemConfigBuilder extends HttpFileSystemConfigBuilder {
29
30 private static final WebdavFileSystemConfigBuilderFileSystemConfigBuilder.html#WebdavFileSystemConfigBuilder">WebdavFileSystemConfigBuilder BUILDER = new WebdavFileSystemConfigBuilder();
31
32 private static final boolean DEFAULT_FOLLOW_REDIRECT = false;
33
34 private WebdavFileSystemConfigBuilder() {
35 super("webdav.");
36 }
37
38
39
40
41
42
43 public static HttpFileSystemConfigBuilder getInstance() {
44 return BUILDER;
45 }
46
47
48
49
50
51
52
53 public void setCreatorName(final FileSystemOptions opts, final String creatorName) {
54 setParam(opts, "creatorName", creatorName);
55 }
56
57
58
59
60
61
62
63 public String getCreatorName(final FileSystemOptions opts) {
64 return getString(opts, "creatorName");
65 }
66
67
68
69
70
71
72
73
74
75 @Override
76 public boolean getFollowRedirect(final FileSystemOptions opts) {
77 return getBoolean(opts, KEY_FOLLOW_REDIRECT, DEFAULT_FOLLOW_REDIRECT);
78 }
79
80
81
82
83
84
85
86 public void setVersioning(final FileSystemOptions opts, final boolean versioning) {
87 setParam(opts, "versioning", Boolean.valueOf(versioning));
88 }
89
90
91
92
93
94
95
96 public boolean isVersioning(final FileSystemOptions opts) {
97 return getBoolean(opts, "versioning", false);
98 }
99
100
101
102
103 @Override
104 protected Class<? extends FileSystem> getConfigClass() {
105 return WebdavFileSystem.class;
106 }
107 }