org.apache.velocity.tools.config
Class PropertiesFactoryConfiguration

java.lang.Object
  extended by org.apache.velocity.tools.config.Configuration<C>
      extended by org.apache.velocity.tools.config.CompoundConfiguration<ToolboxConfiguration>
          extended by org.apache.velocity.tools.config.FactoryConfiguration
              extended by org.apache.velocity.tools.config.FileFactoryConfiguration
                  extended by org.apache.velocity.tools.config.PropertiesFactoryConfiguration

public class PropertiesFactoryConfiguration
extends FileFactoryConfiguration

NOTE: "property", "data", and "toolbox" are essentially reserved words do not use them as tool keys or toolbox scopes.

This reads in a configuration such as: tools.toolbox = request,application tools.property.locale = en_us tools.property.locale.class = java.util.Locale tools.property.locale.converter = org.apache.velocity.tools.config.LocaleConverter tools.request.property.xhtml = true tools.request.render = org.apache.velocity.tools.view.ViewRenderTool tools.request.render.parse.depth = 5 tools.request.search = com.foo.tools.MySearchTool tools.request.search.itemsPerPage = 10 tools.application.math = org.apache.velocity.tools.generic.MathTool tools.data.foo = bar tools.data.foo.class = java.lang.String tools.data.foo.converter = org.apache.commons.beanutils.converter.StringConverter tools.data.version = 1.0 tools.data.version.type = number tools.data.debug = false tools.data.debug.type = boolean

Version:
$Id: PropertiesFactoryConfiguration.java 511959 2007-02-26 19:24:39Z nbubna $
Author:
Nathan Bubna

Field Summary
 
Fields inherited from class org.apache.velocity.tools.config.FactoryConfiguration
GENERIC_CONFIGURATION_PATH, STRUTS_CONFIGURATION_PATH, VIEW_CONFIGURATION_PATH
 
Constructor Summary
PropertiesFactoryConfiguration()
           
 
Method Summary
 void read(org.apache.commons.collections.ExtendedProperties factory)
           
 void read(java.io.InputStream input)
          Reads an properties file from an InputStream and uses it to configure this FactoryConfiguration.
protected  void readData(org.apache.commons.collections.ExtendedProperties dataset)
           
protected  void readProperties(org.apache.commons.collections.ExtendedProperties configProps, Configuration config)
           
protected  void readToolboxes(org.apache.commons.collections.ExtendedProperties factory)
           
protected  void readTools(org.apache.commons.collections.ExtendedProperties tools, ToolboxConfiguration toolbox)
           
protected  void setProperties(org.apache.commons.collections.ExtendedProperties props, Data data)
           
 
Methods inherited from class org.apache.velocity.tools.config.FileFactoryConfiguration
read, read, read
 
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.CompoundConfiguration
addChild, addConfiguration, appendChildren, getChildren, hasChildren, removeChild
 
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
 

Constructor Detail

PropertiesFactoryConfiguration

public PropertiesFactoryConfiguration()
Method Detail

read

public void read(java.io.InputStream input)
          throws java.io.IOException

Reads an properties file from an InputStream and uses it to configure this FactoryConfiguration.

Specified by:
read in class FileFactoryConfiguration
Parameters:
input - the InputStream to read from
Throws:
java.io.IOException

read

public void read(org.apache.commons.collections.ExtendedProperties factory)

readProperties

protected void readProperties(org.apache.commons.collections.ExtendedProperties configProps,
                              Configuration config)

readToolboxes

protected void readToolboxes(org.apache.commons.collections.ExtendedProperties factory)

readTools

protected void readTools(org.apache.commons.collections.ExtendedProperties tools,
                         ToolboxConfiguration toolbox)

readData

protected void readData(org.apache.commons.collections.ExtendedProperties dataset)

setProperties

protected void setProperties(org.apache.commons.collections.ExtendedProperties props,
                             Data data)


Copyright (c) 2003-2007 Apache Software Foundation