IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.base.types.ext
Class StringConverter

java.lang.Object
  extended by com.ibm.btt.base.types.AbstractConverter
      extended by com.ibm.btt.base.types.ext.StringConverter
All Implemented Interfaces:
Conversion, TypeConstants, java.io.Externalizable, java.io.Serializable

public class StringConverter
extends AbstractConverter

This is the converter for business objects of the String type.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.ibm.btt.base.types.AbstractConverter
keyValuePairs
 
Fields inherited from interface com.ibm.btt.base.types.TypeConstants
amended, CONV_TYPE_DEFAULT, CONV_TYPE_HOST, CONV_TYPE_HTML, CONV_TYPE_OUTPUT, CONV_TYPE_SER, CONV_TYPE_XML, disabled, hidden, isAmended, isDisabled, isHidden, isMandatory, isOmitted, isReadOnly, mandatory, omitted, readOnly, TYPE_DEFAULT, TYPE_REGISTRY_INIT_SIZE
 
Constructor Summary
StringConverter()
          This constructor creates a StringConverter which supports the conversion types passed as arguments.
StringConverter(java.lang.String[] supportedConversionTypes, java.util.Hashtable keyValuePairs)
          This constructor creates a StringConverter which supports the conversion types passed as arguments.
 
Method Summary
 void formatToWriterForType(java.lang.Object value, java.lang.String conversionType, java.io.Writer writer, PropertyDescription descriptor, Hashtable parameters)
          Formats the Object using the specified conversion type and the writer passed as arguments.
 void formatToWriterForType(java.lang.Object value, java.lang.String conversionType, java.io.Writer writer, PropertyDescription descriptor, java.util.Locale locale, Hashtable parameters)
          Formats the Object using the specified conversion type, locale, and writer passed as arguments.
protected  java.lang.Object unformat(java.lang.String aString, java.lang.String convType, PropertyDescription descriptor, java.util.Locale locale)
          Converts a String into another String.
protected  java.lang.Object unformat(java.lang.String aString, java.lang.String convType, PropertyDescription descriptor, java.util.Locale locale, Hashtable parameters)
          Converts a String into another String.
 java.lang.Object unformatFromReaderForType(java.io.Reader reader, java.lang.String conversionType, PropertyDescription descriptor, Hashtable parameters)
          Converts the stream passed to a String using the appropriate conversion type.
 java.lang.Object unformatFromReaderForType(java.io.Reader reader, java.lang.String conversionType, PropertyDescription descriptor, java.util.Locale locale, Hashtable parameters)
          Uses the reader to construct an Object of the correct type using the appropriate conversion type and locale.
 
Methods inherited from class com.ibm.btt.base.types.AbstractConverter
convertFrom, convertFrom, convertFrom, convertFrom, convertFrom, convertTo, convertTo, convertTo, convertTo, convertTo, formatToWriter, formatToWriter, formatToWriter, formatToWriterForType, formatToWriterForType, getParameters, getSupportedConversionTypes, readExternal, supportsConversionType, unformatFromReader, unformatFromReader, unformatFromReader, unformatFromReader, unformatFromReaderForType, unformatFromReaderForType, validateParams, writeExternal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringConverter

public StringConverter()
                throws DSETypeException
This constructor creates a StringConverter which supports the conversion types passed as arguments.

Throws:
DSETypeException - - If the supportedConversionTypes parameter passed to the superclass is null or empty

StringConverter

public StringConverter(java.lang.String[] supportedConversionTypes,
                       java.util.Hashtable keyValuePairs)
                throws DSETypeException
This constructor creates a StringConverter which supports the conversion types passed as arguments.

Parameters:
supportedConversionTypes - String[]
keyValuePairs - Hashtable
Throws:
DSETypeException - Conversion types passed to superclass is null or empty.
Method Detail

formatToWriterForType

public void formatToWriterForType(java.lang.Object value,
                                  java.lang.String conversionType,
                                  java.io.Writer writer,
                                  PropertyDescription descriptor,
                                  Hashtable parameters)
                           throws java.io.IOException
Formats the Object using the specified conversion type and the writer passed as arguments.

Overrides:
formatToWriterForType in class AbstractConverter
Parameters:
value - Object
conversionType - String
writer - Writer
descriptor - PropertyDescription
parameters - com.ibm.btt.base.Hashtable
Throws:
java.io.IOException - - If an I/O error occurs

formatToWriterForType

public void formatToWriterForType(java.lang.Object value,
                                  java.lang.String conversionType,
                                  java.io.Writer writer,
                                  PropertyDescription descriptor,
                                  java.util.Locale locale,
                                  Hashtable parameters)
                           throws java.io.IOException
Formats the Object using the specified conversion type, locale, and writer passed as arguments.

Overrides:
formatToWriterForType in class AbstractConverter
Parameters:
value - Object
descriptor - PropertyDescriptor
writer - Writer
locale - Locale
parameters - com.ibm.btt.base.Hashtable
conversionType - String
Throws:
java.io.IOException - - If an I/O error occurs

unformat

protected java.lang.Object unformat(java.lang.String aString,
                                    java.lang.String convType,
                                    PropertyDescription descriptor,
                                    java.util.Locale locale)
                             throws DSETypeException
Converts a String into another String.

Overrides:
unformat in class AbstractConverter
Returns:
java.lang.Object
Throws:
DSETypeException

unformat

protected java.lang.Object unformat(java.lang.String aString,
                                    java.lang.String convType,
                                    PropertyDescription descriptor,
                                    java.util.Locale locale,
                                    Hashtable parameters)
                             throws DSETypeException
Converts a String into another String.

Overrides:
unformat in class AbstractConverter
Returns:
java.lang.Object
Throws:
DSETypeException

unformatFromReaderForType

public java.lang.Object unformatFromReaderForType(java.io.Reader reader,
                                                  java.lang.String conversionType,
                                                  PropertyDescription descriptor,
                                                  Hashtable parameters)
                                           throws java.io.IOException
Converts the stream passed to a String using the appropriate conversion type.

Overrides:
unformatFromReaderForType in class AbstractConverter
Parameters:
reader - Reader
conversionType - String
descriptor - PropertyDescription
parameters - com.ibm.btt.base.Hashtable
Returns:
Object
Throws:
java.io.IOException - - If an I/O error occurs

unformatFromReaderForType

public java.lang.Object unformatFromReaderForType(java.io.Reader reader,
                                                  java.lang.String conversionType,
                                                  PropertyDescription descriptor,
                                                  java.util.Locale locale,
                                                  Hashtable parameters)
                                           throws java.io.IOException
Uses the reader to construct an Object of the correct type using the appropriate conversion type and locale.

Overrides:
unformatFromReaderForType in class AbstractConverter
Parameters:
reader - Reader
conversionType - String
descriptor - PropertyDescription
locale - Locale
parameters - com.ibm.btt.base.Hashtable
Throws:
java.io.IOException - - If an I/O error occurs

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2011