1 /*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 *
9 * https://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17 package org.apache.commons.configuration2.io;
18
19 import java.util.Map;
20
21 /**
22 * Some FileSystems allow options to be passed on File operations. Users of Commons Configuration can implement this
23 * interface and register it with the FileSystem.
24 *
25 * @since 1.7
26 */
27 public interface FileOptionsProvider {
28
29 /**
30 * Key used to identify the user to be associated with the current file operations. The value associated with this key
31 * is a String identifying the current user.
32 */
33 String CURRENT_USER = "currentUser";
34
35 /**
36 * Key used to indicate whether WebDAV versioning support should be enabled. The value associated with this key is a
37 * Boolean where True indicates versioning should be enabled.
38 */
39 String VERSIONING = "versioning";
40
41 /**
42 * Key used to identify the proxy host to connect through. The value associated with this key is a String identifying
43 * the host name of the proxy.
44 */
45 String PROXY_HOST = "proxyHost";
46
47 /**
48 * Key used to identify the proxy port to connect through. The value associated with this key is an Integer identifying
49 * the port on the proxy.
50 */
51 String PROXY_PORT = "proxyPort";
52
53 /**
54 * Key used to identify the maximum number of connections allowed to a single host. The value associated with this key
55 * is an Integer identifying the maximum number of connections allowed to a single host.
56 */
57 String MAX_HOST_CONNECTIONS = "maxHostConnections";
58
59 /**
60 * Key used to identify the maximum number of connections allowed to all hosts. The value associated with this key is an
61 * Integer identifying the maximum number of connections allowed to all hosts.
62 */
63 String MAX_TOTAL_CONNECTIONS = "maxTotalConnections";
64
65 /**
66 * Gets the options to be used for this file.
67 *
68 * @return Options to be used for this file.
69 */
70 Map<String, Object> getOptions();
71 }