1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.commons.vfs2.provider.webdav4;
18
19 import org.apache.commons.vfs2.FileSystem;
20 import org.apache.commons.vfs2.FileSystemOptions;
21 import org.apache.commons.vfs2.provider.http4.Http4FileSystemConfigBuilder;
22
23
24
25
26
27
28 public final class Webdav4FileSystemConfigBuilder extends Http4FileSystemConfigBuilder {
29
30 private static final Webdav4FileSystemConfigBuilder4FileSystemConfigBuilder.html#Webdav4FileSystemConfigBuilder">Webdav4FileSystemConfigBuilder BUILDER = new Webdav4FileSystemConfigBuilder();
31
32 private static final boolean DEFAULT_FOLLOW_REDIRECT = false;
33
34 private Webdav4FileSystemConfigBuilder() {
35 super("webdav4.");
36 }
37
38
39
40
41
42
43 public static Webdav4FileSystemConfigBuilder 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 @Override
75 public boolean getFollowRedirect(final FileSystemOptions opts) {
76 return getBoolean(opts, KEY_FOLLOW_REDIRECT, DEFAULT_FOLLOW_REDIRECT);
77 }
78
79
80
81
82
83
84
85 public void setVersioning(final FileSystemOptions opts, final boolean versioning) {
86 setParam(opts, "versioning", Boolean.valueOf(versioning));
87 }
88
89
90
91
92
93
94
95 public boolean isVersioning(final FileSystemOptions opts) {
96 return getBoolean(opts, "versioning", false);
97 }
98
99
100
101
102 @Override
103 protected Class<? extends FileSystem> getConfigClass() {
104 return Webdav4FileSystem.class;
105 }
106 }