ca.sqlpower.wabit
Interface VariableContext

All Known Implementing Classes:
Layout.LayoutVarContext, SystemPropertiesVariableContext

public interface VariableContext

An interface for providing variable names and their associated values.


Method Summary
 java.util.Set<java.lang.String> getVariableNames()
          Returns the set of all defined variable names in this context.
 java.lang.Object getVariableValue(java.lang.String name, java.lang.Object defaultValue)
          Returns the value of the named variable, or the given default value if the variable is not defined.
 

Method Detail

getVariableNames

java.util.Set<java.lang.String> getVariableNames()
Returns the set of all defined variable names in this context.


getVariableValue

java.lang.Object getVariableValue(java.lang.String name,
                                  java.lang.Object defaultValue)
Returns the value of the named variable, or the given default value if the variable is not defined. If you want a reliable way to find out if a variable is defined, look it up in the set returned by getVariableNames().

Parameters:
name - The name of the variable
defaultValue - The value to return if the variable is not defined
Returns:
The value of the variable.


Copyright © 2009. All Rights Reserved.