org.apache.velocity.tools.config
Class ToolboxConfiguration

java.lang.Object
  extended by org.apache.velocity.tools.config.Configuration
      extended by org.apache.velocity.tools.config.CompoundConfiguration<ToolConfiguration>
          extended by org.apache.velocity.tools.config.ToolboxConfiguration
All Implemented Interfaces:
Comparable<Configuration>

public class ToolboxConfiguration
extends CompoundConfiguration<ToolConfiguration>

This class handles configuration info for the Toolbox instances that will eventually be produced by ToolboxFactory. It contains ToolConfigurations for tools which will be managed by those toolboxes, as well the toolboxes' scope and any other Propertys which you intend to be available to all the tools in the toolbox.

Most users will not find themselves directly using the API of this class.

NOTE: Two instances of this class are considered equal() if their scopes are equal. This is not the intuitive behavior at this level but is done to facilitate intuitive behavior in the higher APIs, which are much more likely to be used directly.

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

Constructor Summary
ToolboxConfiguration()
           
 
Method Summary
 void addTool(ToolConfiguration tool)
           
 int compareTo(Configuration conf)
           
 boolean equals(Object obj)
           
 String getScope()
           
 ToolConfiguration getTool(String key)
           
 Collection<ToolConfiguration> getTools()
           
 int hashCode()
           
 void removeTool(ToolConfiguration tool)
           
 void setScope(String scope)
           
 void setTools(Collection<ToolConfiguration> tools)
           
 String toString()
           
 void validate()
           
 
Methods inherited from class org.apache.velocity.tools.config.CompoundConfiguration
addChild, addConfiguration, appendChildren, getChild, getChildren, hasChildren, removeChild, setChildren
 
Methods inherited from class org.apache.velocity.tools.config.Configuration
addConfiguration, addProperty, appendProperties, getProperties, getProperty, getPropertyMap, hasProperties, removeProperty, removeProperty, setProperties, setProperty, setPropertyMap
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ToolboxConfiguration

public ToolboxConfiguration()
Method Detail

setScope

public void setScope(String scope)

getScope

public String getScope()

addTool

public void addTool(ToolConfiguration tool)

removeTool

public void removeTool(ToolConfiguration tool)

getTool

public ToolConfiguration getTool(String key)

getTools

public Collection<ToolConfiguration> getTools()

setTools

public void setTools(Collection<ToolConfiguration> tools)

validate

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

compareTo

public int compareTo(Configuration conf)
Specified by:
compareTo in interface Comparable<Configuration>
Overrides:
compareTo in class Configuration

hashCode

public int hashCode()
Overrides:
hashCode in class CompoundConfiguration<ToolConfiguration>

equals

public boolean equals(Object obj)
Overrides:
equals in class CompoundConfiguration<ToolConfiguration>

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2002-2011 The Apache Software Foundation. All Rights Reserved.