View Javadoc

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    *     http://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.configuration;
18  
19  import java.util.Map;
20  
21  /**
22   * Some FileSystems allow options to be passed on File operations. Users of commons
23   * configuration can implement this interface and register it with the FileSystem.
24   * @since 1.7
25   * @author <a
26   * href="http://commons.apache.org/configuration/team-list.html">Commons Configuration team</a>
27   * @version $Id: FileOptionsProvider.java 1209884 2011-12-03 10:57:38Z oheger $
28   */
29  public interface FileOptionsProvider
30  {
31      /**
32       * Key used to identify the user to be associated with the current file operations.
33       * The value associated with this key is a String identifying the current user.
34       */
35      String CURRENT_USER = "currentUser";
36  
37      /**
38       * Key used to indicate whether Webdav versioning support should be enabled.
39       * The value associated with this key is a Boolean where True indicates versioning should
40       * be enabled.
41       */
42      String VERSIONING = "versioning";
43  
44      /**
45       * Key used to identify the proxy host to connect through.
46       * The value associated with this key is a String identifying the host name of the proxy.
47       */
48      String PROXY_HOST = "proxyHost";
49  
50      /**
51       * Key used to identify the proxy port to connect through.
52       * The value associated with this key is an Integer identifying the port on the proxy.
53       */
54      String PROXY_PORT = "proxyPort";
55  
56      /**
57       * Key used to identify the maximum number of connections allowed to a single host.
58       * The value associated with this key is an Integer identifying the maximum number of
59       * connections allowed to a single host.
60       */
61      String MAX_HOST_CONNECTIONS = "maxHostConnections";
62  
63      /**
64       * Key used to identify the maximum number of connections allowed to all hosts.
65       * The value associated with this key is an Integer identifying the maximum number of
66       * connections allowed to all hosts.
67       */
68      String MAX_TOTAL_CONNECTIONS = "maxTotalConnections";
69  
70      /**
71       *
72       * @return Options to be used for this file.
73       */
74      Map<String, Object> getOptions();
75  }