org.apache.velocity.tools.config
Class FactoryConfiguration

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
Direct Known Subclasses:
EasyFactoryConfiguration, FileFactoryConfiguration

public class FactoryConfiguration
extends CompoundConfiguration<ToolboxConfiguration>

//TODO: add ability to log all this stuff

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

Field Summary
private  java.util.List<Data> data
           
static java.lang.String GENERIC_CONFIGURATION_PATH
           
static java.lang.String STRUTS_CONFIGURATION_PATH
           
static java.lang.String VIEW_CONFIGURATION_PATH
           
 
Constructor Summary
FactoryConfiguration()
           
 
Method Summary
 void addConfiguration(FactoryConfiguration config)
           
 void addData(Data datum)
           
 void addToolbox(ToolboxConfiguration toolbox)
           
static ToolboxFactory createDefaultFactory()
           
 ToolboxFactory createFactory()
           
protected  ToolboxConfiguration findMatchingChild(ToolboxConfiguration newToolbox)
           
 java.util.List<Data> getData()
           
static FactoryConfiguration getDefault()
          Returns the "default" FactoryConfiguration.
 java.util.List<ToolboxConfiguration> getToolboxes()
           
 boolean removeData(Data datum)
           
 void removeToolbox(ToolboxConfiguration toolbox)
           
 java.lang.String toString()
           
 void 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
 

Field Detail

GENERIC_CONFIGURATION_PATH

public static final java.lang.String GENERIC_CONFIGURATION_PATH
See Also:
Constant Field Values

VIEW_CONFIGURATION_PATH

public static final java.lang.String VIEW_CONFIGURATION_PATH
See Also:
Constant Field Values

STRUTS_CONFIGURATION_PATH

public static final java.lang.String STRUTS_CONFIGURATION_PATH
See Also:
Constant Field Values

data

private java.util.List<Data> data
Constructor Detail

FactoryConfiguration

public FactoryConfiguration()
Method Detail

findMatchingChild

protected ToolboxConfiguration findMatchingChild(ToolboxConfiguration newToolbox)
Overrides:
findMatchingChild in class CompoundConfiguration<ToolboxConfiguration>

addData

public void addData(Data datum)

removeData

public boolean removeData(Data datum)

getData

public java.util.List<Data> getData()

addToolbox

public void addToolbox(ToolboxConfiguration toolbox)

removeToolbox

public void removeToolbox(ToolboxConfiguration toolbox)

getToolboxes

public java.util.List<ToolboxConfiguration> getToolboxes()

addConfiguration

public void addConfiguration(FactoryConfiguration config)

validate

public void validate()
Overrides:
validate in class CompoundConfiguration<ToolboxConfiguration>

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

createFactory

public ToolboxFactory createFactory()

getDefault

public static FactoryConfiguration getDefault()
Returns the "default" FactoryConfiguration. This includes all the standard tools developed by this project and available in the jar being used. In other words, if the velocity-tools-generic-2.x.jar is being used, then only the generic tools will be included. If the velocity-tools-struts-2.x.jar is being used, then all VelocityTools will be available. This also means that subclasses in the larger jars will override their superclasses. So, if you are using the VelocityStruts jar, then your $link reference will be a StrutsLinkTool. If you are using the VelocityView jar, it will be a standard LinkTool.


createDefaultFactory

public static ToolboxFactory createDefaultFactory()


Copyright (c) 2003-2007 Apache Software Foundation