org.apache.cocoon.transformation.helpers
Class VariableConfiguration

java.lang.Object
  extended by org.apache.cocoon.transformation.helpers.VariableConfiguration

public class VariableConfiguration
extends Object

An Avalon Configuration factory that allows {variables} to be replaced with values from a lookup table.

Version:
CVS $Id: VariableConfiguration.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Jeff Turner

Field Summary
static String UNSET_VAR
           
 
Constructor Summary
VariableConfiguration(Configuration conf)
          Constructor.
 
Method Summary
 void addVariable(String name, String value)
          Add a name-value pair.
 void addVariables(Parameters params)
          Add a set of name-value pairs.
 Configuration getConfiguration()
          Get a generated Configuration with interpolated variable values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNSET_VAR

public static final String UNSET_VAR
See Also:
Constant Field Values
Constructor Detail

VariableConfiguration

public VariableConfiguration(Configuration conf)
Constructor.

Parameters:
conf - Template Configuration with {variables} to marking where values should be interpolated. May be null.
Method Detail

addVariable

public void addVariable(String name,
                        String value)
Add a name-value pair.


addVariables

public void addVariables(Parameters params)
Add a set of name-value pairs.


getConfiguration

public Configuration getConfiguration()
                               throws SAXException,
                                      ConfigurationException
Get a generated Configuration with interpolated variable values.

Returns:
The Configuration passed in the constructor, with {variable} tokens in attributes and element bodies replaced with values (if specified), or null.
Throws:
SAXException
ConfigurationException


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.