com.opensymphony.workflow.util
Class DefaultVariableResolver

java.lang.Object
  extended by com.opensymphony.workflow.util.DefaultVariableResolver
All Implemented Interfaces:
VariableResolver, Serializable

public class DefaultVariableResolver
extends Object
implements VariableResolver, Serializable

Author:
Hani Suleiman (hani@formicary.net) Date: Oct 14, 2003 Time: 11:58:12 PM
See Also:
Serialized Form

Constructor Summary
DefaultVariableResolver()
           
 
Method Summary
 com.opensymphony.provider.BeanProvider getBeanProvider()
           
 Object getVariableFromMaps(String var, Map transientVars, com.opensymphony.module.propertyset.PropertySet ps)
           
 void setBeanProvider(com.opensymphony.provider.BeanProvider beanProvider)
           
 Object translateVariables(String s, Map transientVars, com.opensymphony.module.propertyset.PropertySet ps)
          Parses a string for instances of "${foo}" and returns a string with all instances replaced with the string value of the foo object (foo.toString()).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultVariableResolver

public DefaultVariableResolver()
Method Detail

setBeanProvider

public void setBeanProvider(com.opensymphony.provider.BeanProvider beanProvider)

getBeanProvider

public com.opensymphony.provider.BeanProvider getBeanProvider()

getVariableFromMaps

public Object getVariableFromMaps(String var,
                                  Map transientVars,
                                  com.opensymphony.module.propertyset.PropertySet ps)

translateVariables

public Object translateVariables(String s,
                                 Map transientVars,
                                 com.opensymphony.module.propertyset.PropertySet ps)
Parses a string for instances of "${foo}" and returns a string with all instances replaced with the string value of the foo object (foo.toString()). If the string being passed in only refers to a single variable and contains no other characters (for example: ${foo}), then the actual object is returned instead of converting it to a string.

Specified by:
translateVariables in interface VariableResolver

OpenSymphony Workflow Project Page