net.sf.tomp.xtcl.command
Class AbstractParametrizedVarCommand

java.lang.Object
  extended by net.sf.tomp.xtcl.command.AbstractCommand
      extended by net.sf.tomp.xtcl.command.VarCommand
          extended by net.sf.tomp.xtcl.command.AbstractParametrizedVarCommand
All Implemented Interfaces:
Parametrized, Command, ParametrizedCommand
Direct Known Subclasses:
Do, FilterCommand, SAXSourceCommand, TestParametrizedVarCommand

public abstract class AbstractParametrizedVarCommand
extends VarCommand
implements ParametrizedCommand

The base for parametrized VarCommands.

Author:
tomp

Field Summary
 
Fields inherited from class net.sf.tomp.xtcl.command.VarCommand
var
 
Constructor Summary
AbstractParametrizedVarCommand()
           
 
Method Summary
 void addParameterPropertiesReference(java.lang.String ref)
          Adds a reference to Properties that will be used as parameters.
protected  void propertiesToParameters(Context context)
          Resolves all the properties found in the Set of propsReferences within the Context and sets it via setParameter(k, v).
abstract  void setParameter(java.lang.String k, java.lang.Object v)
          sets the parameter
 
Methods inherited from class net.sf.tomp.xtcl.command.VarCommand
setVar
 
Methods inherited from class net.sf.tomp.xtcl.command.AbstractCommand
done, execute, initParameters, listArray, listList, listMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractParametrizedVarCommand

public AbstractParametrizedVarCommand()
Method Detail

addParameterPropertiesReference

public void addParameterPropertiesReference(java.lang.String ref)
Adds a reference to Properties that will be used as parameters. The reference may refer to a Properties object in the context (if the ref starts with a '$') or otherwise a filename.

Specified by:
addParameterPropertiesReference in interface ParametrizedCommand

setParameter

public abstract void setParameter(java.lang.String k,
                                  java.lang.Object v)
Description copied from interface: Parametrized
sets the parameter

Specified by:
setParameter in interface Parametrized
Parameters:
k - parameter name
v - parameter value
See Also:
Parametrized.setParameter(java.lang.String, java.lang.Object)

propertiesToParameters

protected void propertiesToParameters(Context context)
                               throws java.lang.Exception
Resolves all the properties found in the Set of propsReferences within the Context and sets it via setParameter(k, v).

Parameters:
context -
Throws:
java.lang.Exception


Copyright © 2004-2005 Masaryk University in Brno, Faculty of Informatics, Czech Republic. All Rights Reserved.