001    /*
002     * Licensed to the Apache Software Foundation (ASF) under one or more
003     * contributor license agreements.  See the NOTICE file distributed with
004     * this work for additional information regarding copyright ownership.
005     * The ASF licenses this file to You under the Apache License, Version 2.0
006     * (the "License"); you may not use this file except in compliance with
007     * the License.  You may obtain a copy of the License at
008     *
009     *     http://www.apache.org/licenses/LICENSE-2.0
010     *
011     * Unless required by applicable law or agreed to in writing, software
012     * distributed under the License is distributed on an "AS IS" BASIS,
013     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014     * See the License for the specific language governing permissions and
015     * limitations under the License.
016     */
017    package org.apache.commons.configuration;
018    
019    import java.util.Map;
020    
021    /**
022     * Some FileSystems allow options to be passed on File operations. Users of commons
023     * configuration can implement this interface and register it with the FileSystem.
024     * @since 1.7
025     * @author <a
026     * href="http://commons.apache.org/configuration/team-list.html">Commons Configuration team</a>
027     * @version $Id: FileOptionsProvider.java 1209884 2011-12-03 10:57:38Z oheger $
028     */
029    public interface FileOptionsProvider
030    {
031        /**
032         * Key used to identify the user to be associated with the current file operations.
033         * The value associated with this key is a String identifying the current user.
034         */
035        String CURRENT_USER = "currentUser";
036    
037        /**
038         * Key used to indicate whether Webdav versioning support should be enabled.
039         * The value associated with this key is a Boolean where True indicates versioning should
040         * be enabled.
041         */
042        String VERSIONING = "versioning";
043    
044        /**
045         * Key used to identify the proxy host to connect through.
046         * The value associated with this key is a String identifying the host name of the proxy.
047         */
048        String PROXY_HOST = "proxyHost";
049    
050        /**
051         * Key used to identify the proxy port to connect through.
052         * The value associated with this key is an Integer identifying the port on the proxy.
053         */
054        String PROXY_PORT = "proxyPort";
055    
056        /**
057         * Key used to identify the maximum number of connections allowed to a single host.
058         * The value associated with this key is an Integer identifying the maximum number of
059         * connections allowed to a single host.
060         */
061        String MAX_HOST_CONNECTIONS = "maxHostConnections";
062    
063        /**
064         * Key used to identify the maximum number of connections allowed to all hosts.
065         * The value associated with this key is an Integer identifying the maximum number of
066         * connections allowed to all hosts.
067         */
068        String MAX_TOTAL_CONNECTIONS = "maxTotalConnections";
069    
070        /**
071         *
072         * @return Options to be used for this file.
073         */
074        Map<String, Object> getOptions();
075    }