com.opensymphony.webwork.util
Class WebWorkTypeConverter

java.lang.Object
  extended byognl.DefaultTypeConverter
      extended bycom.opensymphony.webwork.util.WebWorkTypeConverter
All Implemented Interfaces:
ognl.TypeConverter

public abstract class WebWorkTypeConverter
extends ognl.DefaultTypeConverter

Base class for type converters used in WebWork. This class provides two abstract methods that are used to convert both to and from strings -- the critical functionality that is core to WebWork's type coversion system.

Type converts do not have to use this class. It is merely a helper base class.


Constructor Summary
WebWorkTypeConverter()
           
 
Method Summary
abstract  Object convertFromString(Map context, String[] values, Class toClass)
          Converts one or more String values to the specified class.
abstract  String convertToString(Map context, Object o)
          Converts the specified object to a String.
 Object convertValue(Map context, Object o, Class toClass)
           
 
Methods inherited from class ognl.DefaultTypeConverter
convertValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebWorkTypeConverter

public WebWorkTypeConverter()
Method Detail

convertValue

public Object convertValue(Map context,
                           Object o,
                           Class toClass)

convertFromString

public abstract Object convertFromString(Map context,
                                         String[] values,
                                         Class toClass)
Converts one or more String values to the specified class.

Parameters:
context - the action context
values - the String values to be converted, such as those submitted from an HTML form
toClass - the class to convert to
Returns:
the converted object

convertToString

public abstract String convertToString(Map context,
                                       Object o)
Converts the specified object to a String.

Parameters:
context - the action context
o - the object to be converted
Returns:
the converted String

WebWork Project Page