Class AbstractFileLocationStrategy.AbstractBuilder<T extends FileLocationStrategy, B extends AbstractFileLocationStrategy.AbstractBuilder<T,B>>
java.lang.Object
org.apache.commons.io.build.AbstractSupplier<T,B>
org.apache.commons.configuration2.io.AbstractFileLocationStrategy.AbstractBuilder<T,B>
- Type Parameters:
T- The type ofFileLocationStrategyto build.B- The builder type.
- All Implemented Interfaces:
org.apache.commons.io.function.IOSupplier<T>
- Direct Known Subclasses:
AbstractFileLocationStrategy.StrategyBuilder, CombinedLocationStrategy.Builder, HomeDirectoryLocationStrategy.Builder
- Enclosing class:
AbstractFileLocationStrategy
public abstract static class AbstractFileLocationStrategy.AbstractBuilder<T extends FileLocationStrategy, B extends AbstractFileLocationStrategy.AbstractBuilder<T,B>>
extends org.apache.commons.io.build.AbstractSupplier<T,B>
Builds new instances for subclasses.
As of version 2.15.0, by default, the only URL schemes allowed are file and jar. To override this default, you can either use the system
property org.apache.commons.configuration2.io.FileLocationStrategy.schemes or build a subclass of AbstractFileLocationStrategy.
The system property org.apache.commons.configuration2.io.FileLocationStrategy.schemes String value must be a comma-separated list of schemes,
where the default is "file,jar", and the complete list is "file,http,https,jar".
The root builder for AbstractFileLocationStrategy is AbstractFileLocationStrategy.AbstractBuilder where you define allowed schemes and hosts through its setter
methods.
See AbstractFileLocationStrategy learn how to grant an deny URL schemes and hosts.
- Since:
- 2.15.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets enabled URL-based hosts, empty means all are enabled.setHostsRegEx(Set<String> hosts) Sets enabled URL-based hosts, empty means all are enabled.setSchemes(Set<String> schemes) Sets enabled URL-based schemes, empty means all are enabled.Methods inherited from class org.apache.commons.io.build.AbstractSupplier
asThisMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.commons.io.function.IOSupplier
asSupplier, get, getUnchecked
-
Constructor Details
-
AbstractBuilder
public AbstractBuilder()Constructs a new instance for subclasses.
-
-
Method Details
-
setHosts
-
setHostsRegEx
-
setSchemes
-