net.sf.tomp.xtcl.command
Class PropertiesToContext

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.PropertiesToContext
All Implemented Interfaces:
Command

public class PropertiesToContext
extends VarCommand

Puts all key=value pairs from the Properties separately to the Context. Prefix of the variable name may be specified, default '$'.

Author:
tomp

Field Summary
protected  java.lang.String prefix
          Prefix of the variable name
 
Fields inherited from class net.sf.tomp.xtcl.command.VarCommand
var
 
Constructor Summary
PropertiesToContext()
           
 
Method Summary
 int execute(Context context)
          Puts all key=value pairs from the Properties separately to the Context.
 void setPrefix(java.lang.String v)
          sets Prefix of the variable name
 java.lang.String toString()
           
 
Methods inherited from class net.sf.tomp.xtcl.command.VarCommand
setVar
 
Methods inherited from class net.sf.tomp.xtcl.command.AbstractCommand
done, initParameters, listArray, listList, listMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

prefix

protected java.lang.String prefix
Prefix of the variable name

Constructor Detail

PropertiesToContext

public PropertiesToContext()
Method Detail

setPrefix

public void setPrefix(java.lang.String v)
sets Prefix of the variable name

Parameters:
v - Prefix of the variable name

execute

public int execute(Context context)
            throws java.lang.Exception
Puts all key=value pairs from the Properties separately to the Context.

Specified by:
execute in interface Command
Overrides:
execute in class AbstractCommand
Parameters:
context -
Returns:
always succeeds, i.e. 0
Throws:
java.lang.Exception - never

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
"PROPERTIES-TO-CONTEXT " + var + " prefix=" + prefix;


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