Package org.apache.velocity.tools.config
Class FileFactoryConfiguration
- java.lang.Object
-
- org.apache.velocity.tools.config.Configuration
-
- org.apache.velocity.tools.config.CompoundConfiguration<ToolboxConfiguration>
-
- org.apache.velocity.tools.config.FactoryConfiguration
-
- org.apache.velocity.tools.config.FileFactoryConfiguration
-
- All Implemented Interfaces:
java.lang.Comparable<Configuration>
- Direct Known Subclasses:
PropertiesFactoryConfiguration,XmlFactoryConfiguration
public abstract class FileFactoryConfiguration extends FactoryConfiguration
Provides support for reading a configuration file from a specified path.- Version:
- $Id: XmlFactoryConfiguration.java 511959 2007-02-26 19:24:39Z nbubna $
- Author:
- Nathan Bubna
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedFileFactoryConfiguration(java.lang.Class clazz, java.lang.String id)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected java.net.URLfindURL(java.lang.String path)voidread(java.lang.String path)Reads a configuration file from the specified file path and sets up the configuration from that.voidread(java.lang.String path, boolean required)voidread(java.lang.String path, boolean required, org.slf4j.Logger log)voidread(java.net.URL url)voidread(java.net.URL url, boolean required)protected voidread(java.net.URL url, boolean required, org.slf4j.Logger log)protected abstract voidreadImpl(java.net.URL url)Reads an configuration from anURL.-
Methods inherited from class org.apache.velocity.tools.config.FactoryConfiguration
addConfiguration, addData, addSource, addToolbox, createFactory, equals, getData, getData, getData, getSource, getSources, getToolbox, getToolboxes, hasData, hashCode, removeData, removeToolbox, setData, setSource, setToolboxes, toString, toString, validate
-
Methods inherited from class org.apache.velocity.tools.config.CompoundConfiguration
addChild, addChildren, addConfiguration, appendChildren, getChild, getChildren, hasChildren, removeChild, setChildren
-
Methods inherited from class org.apache.velocity.tools.config.Configuration
addConfiguration, addProperty, appendProperties, compareTo, getProperties, getProperty, getPropertyMap, hasProperties, removeProperty, removeProperty, setProperties, setProperty, setPropertyMap
-
-
-
-
Method Detail
-
readImpl
protected abstract void readImpl(java.net.URL url) throws java.io.IOExceptionReads an configuration from an
URL.- Parameters:
url- the InputStream to read from- Throws:
java.io.IOException- if a problem occurs
-
read
public void read(java.lang.String path)
Reads a configuration file from the specified file path and sets up the configuration from that. If the file does not exist, a
ResourceNotFoundExceptionwill be thrown.- Parameters:
path- the path to the file to be read from
-
read
public void read(java.net.URL url)
-
read
public void read(java.lang.String path, boolean required)
-
read
public void read(java.net.URL url, boolean required)
-
read
public void read(java.lang.String path, boolean required, org.slf4j.Logger log)
-
findURL
protected java.net.URL findURL(java.lang.String path)
-
read
protected void read(java.net.URL url, boolean required, org.slf4j.Logger log)
-
-