com.ibm.bpc.clientcore.converter
Interface SimpleConverter


public interface SimpleConverter

A SimpleConverter converts an object from or to a String representation (without any assumptions about the context). Implement this interface to provide basic conversion between string and object representations. Return null value to indicate any error conditions. It is the client's responsibility to handle them.


Field Summary
static java.lang.String COPYRIGHT
           
 
Method Summary
 java.lang.Object getAsObject(java.lang.String value, java.util.Locale l)
          Parse string into a Java object.
 java.lang.String getAsString(java.lang.Object obj, java.util.Locale l)
          Convert object to a string in the given locale.
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
See Also:
Constant Field Values
Method Detail

getAsString

public java.lang.String getAsString(java.lang.Object obj,
                                    java.util.Locale l)
Convert object to a string in the given locale. The default timezone should used for the conversion.

Parameters:
obj - The application object or data
l - The target locale
Returns:
A string representation of the object or null if error occurred

getAsObject

public java.lang.Object getAsObject(java.lang.String value,
                                    java.util.Locale l)
Parse string into a Java object. The default timezone should used for the conversion.

Parameters:
value - The (possibly localized) string representation for the object
l - The locale into which the string was translated
Returns:
An object as represented by the string value. or null if error occurred