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.vfs2.impl;
18  
19  import java.util.ArrayList;
20  import java.util.List;
21  
22  /**
23   * This class describes the configuration for a provider.
24   * <p>
25   * Used by digester in StandardFileSystemManager
26   * </p>
27   */
28  public class ProviderConfiguration {
29  
30      private String className;
31      private final List<String> schemes = new ArrayList<>(10);
32      private final List<String> dependencies = new ArrayList<>(10);
33  
34      /**
35       * Constructs a new instance.
36       */
37      public ProviderConfiguration() {
38      }
39  
40      /**
41       * Gets the class name.
42       *
43       * @return the class name.
44       */
45      public String getClassName() {
46          return className;
47      }
48  
49      /**
50       * Gets the dependency.
51       *
52       * @return the dependency.
53       */
54      public List<String> getDependencies() {
55          return dependencies;
56      }
57  
58      /**
59       * Gets the schema.
60       *
61       * @return the scheme.
62       */
63      public List<String> getSchemes() {
64          return schemes;
65      }
66  
67      /**
68       * Always returns false.
69       *
70       * @return false.
71       */
72      public boolean isDefault() {
73          return false;
74      }
75  
76      /**
77       * sets the class name.
78       *
79       * @param className the class name.
80       */
81      public void setClassName(final String className) {
82          this.className = className;
83      }
84  
85      /**
86       * Sets the dependency.
87       *
88       * @param dependency the dependency.
89       */
90      public void setDependency(final String dependency) {
91          dependencies.add(dependency);
92      }
93  
94      /**
95       * Sets the scheme.
96       *
97       * @param scheme the scheme.
98       */
99      public void setScheme(final String scheme) {
100         schemes.add(scheme);
101     }
102 }