1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.commons.vfs.impl;
18
19 import org.apache.commons.vfs.FileSystemConfigBuilder;
20 import org.apache.commons.vfs.FileSystemException;
21 import org.apache.commons.vfs.FileSystemOptions;
22 import org.apache.commons.vfs.UserAuthenticator;
23
24 /***
25 * Default options usable for all filesystems
26 */
27 public class DefaultFileSystemConfigBuilder extends FileSystemConfigBuilder
28 {
29 private final static DefaultFileSystemConfigBuilder builder = new DefaultFileSystemConfigBuilder();
30
31 public static DefaultFileSystemConfigBuilder getInstance()
32 {
33 return builder;
34 }
35
36 /***
37 * Sets the user authenticator to get authentication informations
38 */
39 public void setUserAuthenticator(FileSystemOptions opts, UserAuthenticator userAuthenticator) throws FileSystemException
40 {
41 setParam(opts, "userAuthenticator", userAuthenticator);
42 }
43
44 /***
45 * @see #setUserAuthenticator
46 */
47 public UserAuthenticator getUserAuthenticator(FileSystemOptions opts)
48 {
49 return (UserAuthenticator) getParam(opts, "userAuthenticator");
50 }
51
52 protected Class getConfigClass()
53 {
54 return DefaultFileSystemConfigBuilder.class;
55 }
56 }