IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.base.types
Class ICollConverter

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

public class ICollConverter
extends AbstractConverter

This class provides an extension point for all specific Converters that support conversion of compound business objects which are IndexedCollections.

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_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
ICollConverter()
          This constructor creates an ICollConverter that supports the conversion types passed as an argument.
ICollConverter(java.lang.String[] supportedConversionTypes, java.util.Hashtable keyValuePairs)
          This constructor creates an ICollConverter that supports the conversion types passed as an argument.
 
Method Summary
 java.lang.Object convertFrom(java.lang.Object obj, java.lang.String convType, PropertyDescription pd, boolean byReference, java.util.Locale locale)
          Converts an input object into a proper object handled by the converter.
 java.lang.Object convertTo(java.lang.Object obj, java.lang.String convType, PropertyDescription pd, boolean byReference, java.util.Locale locale)
          Converts an input IndexedCollection into a proper object handled by the invoker.
 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.
 java.lang.Object unformatFromReaderForType(java.io.Reader reader, java.lang.String conversionType, PropertyDescription descriptor, Hashtable parameters)
          Uses the passed reader to construct an Object of the correct Type 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 passed 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, convertTo, convertTo, convertTo, convertTo, formatToWriter, formatToWriter, formatToWriter, formatToWriterForType, formatToWriterForType, getParameters, getSupportedConversionTypes, readExternal, supportsConversionType, unformat, unformat, 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

ICollConverter

public ICollConverter()
               throws DSETypeException
This constructor creates an ICollConverter that supports the conversion types passed as an argument.

Throws:
DSETypeException - - Conversion types passed to superclass is null or empty

ICollConverter

public ICollConverter(java.lang.String[] supportedConversionTypes,
                      java.util.Hashtable keyValuePairs)
               throws DSETypeException
This constructor creates an ICollConverter that supports the conversion types passed as an argument.

Throws:
DSETypeException - - Conversion types passed to superclass is null or empty
Method Detail

convertFrom

public java.lang.Object convertFrom(java.lang.Object obj,
                                    java.lang.String convType,
                                    PropertyDescription pd,
                                    boolean byReference,
                                    java.util.Locale locale)
                             throws DSETypeException
Converts an input object into a proper object handled by the converter. The invoker sets the output object into the data element. If byReference is true, the conversion, if accepted by the converter, is performed by reference. For the ws convType, this method converts the received kColl into a java.util.Hashtable. The appropriate converter is called for each of the elements.

Specified by:
convertFrom in interface Conversion
Overrides:
convertFrom in class AbstractConverter
Parameters:
obj - java.lang.Object
convType - java.lang.String
pd - com.ibm.btt.base.types.PropertyDescription
byReference - boolean
locale - Locale
Returns:
java.lang.Object
Throws:
DSETypeException

convertTo

public java.lang.Object convertTo(java.lang.Object obj,
                                  java.lang.String convType,
                                  PropertyDescription pd,
                                  boolean byReference,
                                  java.util.Locale locale)
                           throws DSETypeException
Converts an input IndexedCollection into a proper object handled by the invoker. The output object can be used by the invoker for different purposes and its type is converter dependent. If byReference is true, the conversion, if accepted by the converter, is performed by reference. Note that for the ws convType, this method converts the received iColl into a java.util.Vector and calls the proper converter for each of the elements. This is because the IndexedCollection type does not accept converting by reference.

Specified by:
convertTo in interface Conversion
Overrides:
convertTo in class AbstractConverter
Parameters:
obj - java.lang.Object
convType - java.lang.String
pd - com.ibm.btt.base.types.PropertyDescription
byReference - boolean
locale - Locale
Returns:
java.lang.Object
Throws:
DSETypeException

formatToWriterForType

public void formatToWriterForType(java.lang.Object value,
                                  java.lang.String conversionType,
                                  java.io.Writer writer,
                                  PropertyDescription descriptor,
                                  Hashtable parameters)
                           throws java.lang.Exception
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:
- - Exception Formatting is unsuccessful
java.lang.Exception

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.lang.Exception
Formats the Object using the specified conversion type, locale, and writer passed as arguments.

Overrides:
formatToWriterForType in class AbstractConverter
Parameters:
value - Object
conversionType - String
descriptor - PropertyDescription
writer - Writer
locale - Locale
parameters - com.ibm.btt.base.Hashtable
Throws:
- - Exception Formatting is unsuccessful
java.lang.Exception

unformatFromReaderForType

public java.lang.Object unformatFromReaderForType(java.io.Reader reader,
                                                  java.lang.String conversionType,
                                                  PropertyDescription descriptor,
                                                  Hashtable parameters)
                                           throws java.lang.Exception
Uses the passed reader to construct an Object of the correct Type 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:
DSETypeException - - Unformatting is unsuccessful
java.lang.Exception - Unformatting is unsuccessful

unformatFromReaderForType

public java.lang.Object unformatFromReaderForType(java.io.Reader reader,
                                                  java.lang.String conversionType,
                                                  PropertyDescription descriptor,
                                                  java.util.Locale locale,
                                                  Hashtable parameters)
                                           throws java.lang.Exception
Uses the passed 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:
- - Exception Unformatting is unsuccessful
java.lang.Exception

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2009