org.apache.velocity.tools.config
Class FileFactoryConfiguration
java.lang.Object
org.apache.velocity.tools.config.Configuration<C>
org.apache.velocity.tools.config.CompoundConfiguration<ToolboxConfiguration>
org.apache.velocity.tools.config.FactoryConfiguration
org.apache.velocity.tools.config.FileFactoryConfiguration
- Direct Known Subclasses:
- PropertiesFactoryConfiguration, XmlFactoryConfiguration
public abstract class FileFactoryConfiguration
- extends FactoryConfiguration
Provides support for reading a configuration file from a specified path,
This frees the user from having to obtain an InputStream themselves.
- Version:
- $Id: XmlFactoryConfiguration.java 511959 2007-02-26 19:24:39Z nbubna $
- Author:
- Nathan Bubna
Method Summary |
abstract void |
read(java.io.InputStream input)
Reads an configuration from an InputStream . |
void |
read(java.lang.String path)
Reads a configuration file from the specified file path
and sets up the configuration from that. |
void |
read(java.lang.String path,
boolean required)
|
void |
read(java.lang.String path,
boolean required,
org.apache.velocity.runtime.log.Log log)
|
Methods inherited from class org.apache.velocity.tools.config.FactoryConfiguration |
addConfiguration, addData, addToolbox, createDefaultFactory, createFactory, findMatchingChild, getData, getDefault, getToolboxes, removeData, removeToolbox, toString, validate |
Methods inherited from class org.apache.velocity.tools.config.Configuration |
addConfiguration, addProperty, appendProperties, getConvertableProperties, getProperties, getSimpleProperties, hasProperties, removeProperty, removeProperty, setProperty, setProperty |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
FileFactoryConfiguration
public FileFactoryConfiguration()
read
public abstract void read(java.io.InputStream input)
throws java.io.IOException
Reads an configuration from an InputStream
.
- Parameters:
input
- the InputStream to read from
- Throws:
java.io.IOException
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 ResourceNotFoundException
will be thrown.
- Parameters:
path
- the path to the file to be read from
read
public void read(java.lang.String path,
boolean required)
read
public void read(java.lang.String path,
boolean required,
org.apache.velocity.runtime.log.Log log)
Copyright (c) 2003-2007 Apache Software Foundation