IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.base.types
Class AbstractPropertyDescriptor

java.lang.Object
  extended by com.ibm.btt.base.types.AbstractPropertyDescriptor
All Implemented Interfaces:
PropertyDescription, TypeConstants, java.io.Externalizable, java.io.Serializable
Direct Known Subclasses:
DatePropertyDescriptor, DoublePropertyDescriptor, FloatPropertyDescriptor, ICollPropertyDescriptor, IntegerPropertyDescriptor, KCollPropertyDescriptor, StringPropertyDescriptor

public abstract class AbstractPropertyDescriptor
extends java.lang.Object
implements PropertyDescription, TypeConstants, java.io.Externalizable

This class resides at the top of the PropertyDescriptor hierarchy and provides an abstract implementation of the PropertyDescription interface for Type specific PropertyDescriptors to extend.

See Also:
Serialized Form

Field Summary
protected static java.lang.String classNameForState
          The className for state
protected  java.util.Hashtable converters
          The converters known to this PropertyDescriptor
protected  java.util.Hashtable keyValuePairs
          The parameterization for this PropertyDescriptor, understood by concrete subclasses
 
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
AbstractPropertyDescriptor()
          This constructor creates a AbstractPropertyDescriptor object.
AbstractPropertyDescriptor(java.lang.String name, java.util.Hashtable keyValuePairs)
          This constructor creates a PropertyDescriptor with the passed name.
AbstractPropertyDescriptor(java.lang.String name, java.util.Hashtable keyValuePairs, java.lang.String typeName)
          This constructor creates a PropertyDescriptor with the passed name.
 
Method Summary
 void applyDefaultDescriptor(PropertyDescription defaultDescriptor)
          Forces this PropertyDescriptor to inherit the business rules of the passed descriptor.
 void applyDefaultDescriptorForType(PropertyDescription defaultDescriptor)
          Can be overwritten by specific subclasses if an additional behaviour is required.
abstract  java.lang.Object cloneDescriptee(java.lang.Object value)
          Returns an independent copy of the Object passed and is to be implementaed by a Type-specific subclass.
 java.lang.Object convertFrom(java.lang.Object obj)
          Converts an input object into a proper object handled by the default converter.
 java.lang.Object convertFrom(java.lang.Object obj, java.lang.String convType)
          Converts an input object into a proper object handled by the specified converter.
 java.lang.Object convertFrom(java.lang.Object obj, java.lang.String convType, boolean byReference)
          Converts an input object into a proper object handled by the specified converter.
 java.lang.Object convertFrom(java.lang.Object obj, java.lang.String convType, boolean byReference, java.util.Locale locale)
          Converts an input object into a proper object handled by the specified converter.
 java.lang.Object convertFrom(java.lang.Object obj, java.lang.String convType, boolean byReference, java.util.Locale locale, Hashtable parameters)
          Converts an input object into a proper object handled by the specified converter.
 java.lang.Object convertTo(java.lang.Object obj)
          Converts an input object, using the default converter, into a proper object handled by the invoker.
 java.lang.Object convertTo(java.lang.Object obj, java.lang.String convType)
          Converts an input object, using the specified converter, into a proper object handled by the invoker.
 java.lang.Object convertTo(java.lang.Object obj, java.lang.String convType, boolean byReference)
          Converts an input object, using the specified converter, into a proper object handled by the invoker.
 java.lang.Object convertTo(java.lang.Object obj, java.lang.String convType, boolean byReference, java.util.Locale locale)
          Converts an input object, using the specified converter, into a proper object handled by the invoker.
 java.lang.Object convertTo(java.lang.Object obj, java.lang.String convType, boolean byReference, java.util.Locale locale, Hashtable parameters)
          Converts an input object, using the specified converter, into a proper object handled by the invoker.
 java.lang.String formatToString(java.lang.Object value, java.lang.String conversionType)
          Returns the Object formatted as a String using the appropriate conversion type.
 java.lang.String formatToString(java.lang.Object value, java.lang.String conversionType, Hashtable parameters)
          Returns the Object formatted as a String using the appropriate conversion type.
 java.lang.String formatToString(java.lang.Object value, java.lang.String conversionType, java.util.Locale locale)
          Returns the Object formatted as a String using the specified conversion type and the specified locale.
 void formatToWriter(java.lang.Object value, java.lang.String conversionType, java.io.Writer writer)
          Formats the Object using the specified conversion type and writer passed as arguments.
 void formatToWriter(java.lang.Object value, java.lang.String conversionType, java.io.Writer writer, Hashtable parameters)
          Formats the Object using the specified conversion type, the writer, and the Hashtable passed as arguments.
 void formatToWriter(java.lang.Object value, java.lang.String conversionType, java.io.Writer writer, java.util.Locale locale)
          Formats the Object using the conversion type and the locale specified by the writer passed as arguments.
 void formatToWriter(java.lang.Object value, java.lang.String conversionType, java.io.Writer writer, java.util.Locale locale, Hashtable parameters)
          Formats the Object using the conversion type ,the locale, and the Hashtable specified by the writer passed as arguments.
 Conversion getConversion(java.lang.String conversionType)
          Returns the converter that handles the specified conversion type or null if the conversion type is not supported.
protected  Conversion getConverterFromConversionType(java.lang.String conversionType)
          Returns the converter for the conversion type passed.
 java.util.Enumeration getConverters()
          Returns an Enumeration of all converters associated with this PropertyDescriptor.
protected  Conversion getDefaultConverter()
          Returns the converter for the default conversion type.
 java.lang.String getDescription()
          Returns the description of business object that this PropertyDescriptor describes.
 java.lang.Class getImplClass()
          Gets the class of the business object descripted by this PropertyDescription.
 ElementState getInitialState()
          Returns the initial business state of the business object described by this PropertyDescriptor.
 java.lang.Object getInitialValue()
          Returns the initial value of the business object described by this PropertyDescriptor.
 java.lang.String getName()
          Returns the name of this PropertyDescriptor.
 java.util.Hashtable getParameters()
          Returns the keyValuePairs hashtable.
 Type getType()
          Returns the Type of business object that this PropertyDescriptor describes.
 Validation getValidator()
          Returns the validator responsible for handling validation of the business object described.
 TypedData initializeInstance(TypedData businessObject)
          Initializes the businessObject attributes.
protected  void initializeState(ElementState iniState)
          Initializes the initialState property based on the attributes defined in the key-value pairs.
 void readExternal(java.io.ObjectInput s)
          Invokes the object creation from an ObjectInput.
 void setConversion(Conversion converter)
          Convenience method to set the converter to the default converter.
 void setConversion(java.lang.String conversionType, Conversion converter)
          Sets the converter that handles the specified conversion type.
protected  void setInitialState(ElementState iniState)
          Sets the initial business state for the PropertyDescriptor.
protected  void setInitialValue(java.lang.Object value)
          Sets the initial value for the PropertyDescriptor.
 void setName(java.lang.String aName)
          Sets the name attribute.
 void setValidator(Validation validator)
          Sets the validator to be employed by this PropertyDescriptor to that passed.
 java.lang.Object unformatFromReader(java.io.Reader reader, java.lang.String conversionType)
          Uses the passed reader to construct an Object of the correct Type using the appropriate conversion type.
 java.lang.Object unformatFromReader(java.io.Reader reader, java.lang.String conversionType, java.util.Locale locale)
          Uses the reader passed to construct an Object of the correct Type using the specified conversion type and the specified locale.
 java.lang.Object unformatFromReader(java.io.Reader reader, java.lang.String conversionType, java.util.Locale locale, Hashtable parameters)
          Uses the reader passed to construct an Object of the correct Type using the specified conversion type and the specified locale.
 java.lang.Object unformatFromString(java.lang.String value, java.lang.String conversionType)
          Converts the String passed to an Object using the appropriate conversion Type.
 java.lang.Object unformatFromString(java.lang.String value, java.lang.String conversionType, Hashtable parameters)
          Converts the String passed to an Object using the appropriate conversion Type.
 java.lang.Object unformatFromString(java.lang.String value, java.lang.String conversionType, java.util.Locale locale)
          Converts the String passed to an Object using the specified conversion Type and the specified locale.
 java.lang.Object unformatFromString(java.lang.String value, java.lang.String conversionType, java.util.Locale locale, Hashtable parameters)
          Converts the String passed to an Object using the specified conversion Type, the specified locale, and the specified Hashtable.
 java.lang.Object validate(java.lang.Object toValidate)
          Validates the Object by first unformatting and then applying business rules.
 java.lang.Object validate(java.lang.Object toValidate, boolean useState)
          Validates the Object passed by first unformatting and then applying business rules.
 java.lang.Object validate(java.lang.Object toValidate, Hashtable parameters)
          Validates the Object by first unformatting and then applying business rules.
 java.lang.Object validate(java.lang.Object toValidate, java.lang.String convType)
          Validates the Object by first unformatting using the convType conversion and then applying business rules.
 java.lang.Object validate(java.lang.Object toValidate, java.lang.String convType, boolean useState)
          Validates the Object by first unformatting using the convType conversion and then applying business rules.
 java.lang.Object validate(java.lang.Object toValidate, java.lang.String convType, boolean useState, Hashtable parameters)
          Validates the Object by first unformatting using the convType conversion and then applying business rules.
 java.lang.Object validate(java.lang.Object toValidate, java.lang.String convType, Hashtable parameters)
          Validates the Object by first unformatting using the convType conversion and then applying business rules.
 void validateParams()
          Validates the parameters externaly defined for this descriptor.
 void validateParams(Hashtable parameters)
          Validates the parameters passed as a Hashtable.
 void writeExternal(java.io.ObjectOutput s)
          Provides concrete serialization handling for AbstractPropertyDescriptor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

converters

protected java.util.Hashtable converters
The converters known to this PropertyDescriptor


keyValuePairs

protected java.util.Hashtable keyValuePairs
The parameterization for this PropertyDescriptor, understood by concrete subclasses


classNameForState

protected static java.lang.String classNameForState
The className for state

Constructor Detail

AbstractPropertyDescriptor

public AbstractPropertyDescriptor()
This constructor creates a AbstractPropertyDescriptor object.


AbstractPropertyDescriptor

public AbstractPropertyDescriptor(java.lang.String name,
                                  java.util.Hashtable keyValuePairs)
                           throws DSETypeException
This constructor creates a PropertyDescriptor with the passed name.

Parameters:
name - String
Throws:
DSETypeException - Referenced - Type can not be determined from class name

AbstractPropertyDescriptor

public AbstractPropertyDescriptor(java.lang.String name,
                                  java.util.Hashtable keyValuePairs,
                                  java.lang.String typeName)
                           throws DSETypeException
This constructor creates a PropertyDescriptor with the passed name.

Parameters:
name - String
typeName - String
Throws:
DSETypeException - - Referenced Type is not found
Method Detail

applyDefaultDescriptor

public void applyDefaultDescriptor(PropertyDescription defaultDescriptor)
                            throws DSETypeException
Forces this PropertyDescriptor to inherit the business rules of the passed descriptor. Any defined business behavior is retained and overrides that of the passed descriptor.

Specified by:
applyDefaultDescriptor in interface PropertyDescription
Parameters:
defaultDescriptor - PropertyDescription
Throws:
DSETypeException - PropertyDescriptor passed as argument is not valid.

applyDefaultDescriptorForType

public void applyDefaultDescriptorForType(PropertyDescription defaultDescriptor)
Can be overwritten by specific subclasses if an additional behaviour is required.


cloneDescriptee

public abstract java.lang.Object cloneDescriptee(java.lang.Object value)
                                          throws DSETypeException
Returns an independent copy of the Object passed and is to be implementaed by a Type-specific subclass.

Specified by:
cloneDescriptee in interface PropertyDescription
Parameters:
value - Object
Returns:
Object
Throws:
DSETypeException - - Cloning is unsuccessful

convertFrom

public java.lang.Object convertFrom(java.lang.Object obj)
                             throws DSETypeException
Converts an input object into a proper object handled by the default converter.

Specified by:
convertFrom in interface PropertyDescription
Parameters:
obj - java.lang.Object
Returns:
java.lang.Object
Throws:
DSETypeException - if the conversion type is not supported

convertFrom

public java.lang.Object convertFrom(java.lang.Object obj,
                                    java.lang.String convType)
                             throws DSETypeException
Converts an input object into a proper object handled by the specified converter.

Specified by:
convertFrom in interface PropertyDescription
Parameters:
obj - java.lang.Object
convType - java.lang.String
Returns:
java.lang.Object
Throws:
DSETypeException - if the conversion type is not supported

convertFrom

public java.lang.Object convertFrom(java.lang.Object obj,
                                    java.lang.String convType,
                                    boolean byReference)
                             throws DSETypeException
Converts an input object into a proper object handled by the specified converter. If byReference is set to true, the conversion, if accepted by the converter, is performed by reference.

Specified by:
convertFrom in interface PropertyDescription
Returns:
java.lang.Object
Throws:
DSETypeException - if the conversion type is not supported

convertFrom

public java.lang.Object convertFrom(java.lang.Object obj,
                                    java.lang.String convType,
                                    boolean byReference,
                                    java.util.Locale locale)
                             throws DSETypeException
Converts an input object into a proper object handled by the specified converter. If byReference is set to true, the conversion, if accepted by the converter, is performed by reference.

Specified by:
convertFrom in interface PropertyDescription
Returns:
java.lang.Object
Throws:
DSETypeException - if the conversion type is not supported

convertFrom

public java.lang.Object convertFrom(java.lang.Object obj,
                                    java.lang.String convType,
                                    boolean byReference,
                                    java.util.Locale locale,
                                    Hashtable parameters)
                             throws DSETypeException
Converts an input object into a proper object handled by the specified converter. If byReference is set to true, the conversion, if accepted by the converter, is performed by reference.

Specified by:
convertFrom in interface PropertyDescription
Returns:
java.lang.Object
Throws:
DSETypeException - if the conversion type is not supported

convertTo

public java.lang.Object convertTo(java.lang.Object obj)
                           throws DSETypeException
Converts an input object, using the default converter, into a proper object handled by the invoker. The output object can be used by the invoker for different purposes and its type will be converter dependant.

Specified by:
convertTo in interface PropertyDescription
Parameters:
obj - java.lang.Object
Returns:
java.lang.Object
Throws:
DSETypeException - if the conversion type is not supported

convertTo

public java.lang.Object convertTo(java.lang.Object obj,
                                  java.lang.String convType)
                           throws DSETypeException
Converts an input object, using the specified converter, into a proper object handled by the invoker. The output object can be used by the invoker for different purposes and its type will be converter dependant.

Specified by:
convertTo in interface PropertyDescription
Parameters:
obj - java.lang.Object
convType - java.lang.String
Returns:
java.lang.Object
Throws:
DSETypeException - if the conversion type is not supported

convertTo

public java.lang.Object convertTo(java.lang.Object obj,
                                  java.lang.String convType,
                                  boolean byReference)
                           throws DSETypeException
Converts an input object, using the specified converter, into a proper object handled by the invoker. The output object can be used by the invoker for different purposes and its type will be converter dependant. If byReference is set to true, the conversion, if accepted by the converter, is performed by reference.

Specified by:
convertTo in interface PropertyDescription
Returns:
java.lang.Object
Throws:
DSETypeException - if the conversion type is not supported

convertTo

public java.lang.Object convertTo(java.lang.Object obj,
                                  java.lang.String convType,
                                  boolean byReference,
                                  java.util.Locale locale)
                           throws DSETypeException
Converts an input object, using the specified converter, into a proper object handled by the invoker. The output object can be used by the invoker for different purposes and its type will be converter dependant. If byReference is set to true, the conversion, if accepted by the converter, is performed by reference.

Specified by:
convertTo in interface PropertyDescription
Returns:
java.lang.Object
Throws:
DSETypeException - if the conversion type is not supported

convertTo

public java.lang.Object convertTo(java.lang.Object obj,
                                  java.lang.String convType,
                                  boolean byReference,
                                  java.util.Locale locale,
                                  Hashtable parameters)
                           throws DSETypeException
Converts an input object, using the specified converter, into a proper object handled by the invoker. The output object can be used by the invoker for different purposes and its type will be converter dependant. If byReference is set to true, the conversion, if accepted by the converter, is performed by reference.

Specified by:
convertTo in interface PropertyDescription
Returns:
java.lang.Object
Throws:
DSETypeException - if the conversion type is not supported

formatToString

public java.lang.String formatToString(java.lang.Object value,
                                       java.lang.String conversionType)
                                throws DSETypeException
Returns the Object formatted as a String using the appropriate conversion type.

Specified by:
formatToString in interface PropertyDescription
Parameters:
value - Object
conversionType - String
Returns:
String
Throws:
DSETypeException - Formatting is unsuccessful.

formatToString

public java.lang.String formatToString(java.lang.Object value,
                                       java.lang.String conversionType,
                                       Hashtable parameters)
                                throws DSETypeException
Returns the Object formatted as a String using the appropriate conversion type.

Specified by:
formatToString in interface PropertyDescription
Parameters:
value - Object
conversionType - String
parameters - com.ibm.btt.base.Hashtable
Returns:
String
Throws:
DSETypeException - Formatting is unsuccessful.

formatToString

public java.lang.String formatToString(java.lang.Object value,
                                       java.lang.String conversionType,
                                       java.util.Locale locale)
                                throws DSETypeException
Returns the Object formatted as a String using the specified conversion type and the specified locale.

Specified by:
formatToString in interface PropertyDescription
Parameters:
value - Object
conversionType - String
locale - Locale
Returns:
String
Throws:
DSETypeException - Formatting is unsuccessful.

formatToWriter

public void formatToWriter(java.lang.Object value,
                           java.lang.String conversionType,
                           java.io.Writer writer)
                    throws DSETypeException
Formats the Object using the specified conversion type and writer passed as arguments. If the conversion type is not supported, the default convertion type is used.

Specified by:
formatToWriter in interface PropertyDescription
Parameters:
value - Object
conversionType - String
writer - Writer
Throws:
DSETypeException - - Formatting is unsuccessful

formatToWriter

public void formatToWriter(java.lang.Object value,
                           java.lang.String conversionType,
                           java.io.Writer writer,
                           Hashtable parameters)
                    throws DSETypeException
Formats the Object using the specified conversion type, the writer, and the Hashtable passed as arguments. If the conversion type is not supported, the default convertion type is used.

Parameters:
value - Object
conversionType - String
parameters - com.ibm.btt.base.Hashtable
writer - Writer
Throws:
DSETypeException

formatToWriter

public void formatToWriter(java.lang.Object value,
                           java.lang.String conversionType,
                           java.io.Writer writer,
                           java.util.Locale locale)
                    throws DSETypeException
Formats the Object using the conversion type and the locale specified by the writer passed as arguments. If the conversion type is not supported, the default convertion type is used.

Specified by:
formatToWriter in interface PropertyDescription
Parameters:
value - Object
conversionType - String
writer - Writer
locale - Locale
Throws:
DSETypeException - Formatting is unsuccessful.

formatToWriter

public void formatToWriter(java.lang.Object value,
                           java.lang.String conversionType,
                           java.io.Writer writer,
                           java.util.Locale locale,
                           Hashtable parameters)
                    throws DSETypeException
Formats the Object using the conversion type ,the locale, and the Hashtable specified by the writer passed as arguments. If the conversion type is not supported, the default convertion type is used.

Parameters:
value - Object
conversionType - String
writer - Writer
locale - Locale
parameters - com.ibm.btt.base.Hashtable
Throws:
DSETypeException - Formatting is unsuccessful.

getConversion

public Conversion getConversion(java.lang.String conversionType)
Returns the converter that handles the specified conversion type or null if the conversion type is not supported.

Specified by:
getConversion in interface PropertyDescription
Parameters:
conversionType - String
Returns:
Conversion

getConverterFromConversionType

protected Conversion getConverterFromConversionType(java.lang.String conversionType)
                                             throws DSETypeException
Returns the converter for the conversion type passed.

Returns:
Conversion
Throws:
DSETypeException - if the requested conversionType is not supported

getConverters

public java.util.Enumeration getConverters()
Returns an Enumeration of all converters associated with this PropertyDescriptor.

Specified by:
getConverters in interface PropertyDescription
Returns:
Enumeration

getDefaultConverter

protected Conversion getDefaultConverter()
                                  throws DSETypeException
Returns the converter for the default conversion type.

Returns:
Conversion
Throws:
DSETypeException - if the requested conversionType is not supported

getDescription

public java.lang.String getDescription()
Returns the description of business object that this PropertyDescriptor describes.

Specified by:
getDescription in interface PropertyDescription
Returns:
String

getImplClass

public java.lang.Class getImplClass()
                             throws DSETypeException
Gets the class of the business object descripted by this PropertyDescription. To be overwritten by specific descriptors.

Specified by:
getImplClass in interface PropertyDescription
Returns:
java.lang.Class
Throws:
DSETypeException

getInitialState

public ElementState getInitialState()
Returns the initial business state of the business object described by this PropertyDescriptor.

Specified by:
getInitialState in interface PropertyDescription
Returns:
int

getInitialValue

public java.lang.Object getInitialValue()
Returns the initial value of the business object described by this PropertyDescriptor.

Specified by:
getInitialValue in interface PropertyDescription
Returns:
Object

getName

public java.lang.String getName()
Returns the name of this PropertyDescriptor.

Specified by:
getName in interface PropertyDescription
Returns:
String

getParameters

public java.util.Hashtable getParameters()
Returns the keyValuePairs hashtable.

Specified by:
getParameters in interface PropertyDescription
Returns:
java.util.Hashtable

getType

public Type getType()
Returns the Type of business object that this PropertyDescriptor describes.

Specified by:
getType in interface PropertyDescription
Returns:
Type

getValidator

public Validation getValidator()
Returns the validator responsible for handling validation of the business object described.

Specified by:
getValidator in interface PropertyDescription
Returns:
Validation

initializeInstance

public TypedData initializeInstance(TypedData businessObject)
                             throws DSETypeException
Initializes the businessObject attributes.

Specified by:
initializeInstance in interface PropertyDescription
Parameters:
businessObject - com.ibm.btt.base.TypedData
Returns:
com.ibm.btt.base.TypedData
Throws:
DSETypeException

initializeState

protected void initializeState(ElementState iniState)
Initializes the initialState property based on the attributes defined in the key-value pairs.


readExternal

public void readExternal(java.io.ObjectInput s)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Invokes the object creation from an ObjectInput.

Specified by:
readExternal in interface java.io.Externalizable
Parameters:
s - java.io.ObjectInput
Throws:
java.io.IOException.
java.lang.ClassNotFoundException.
java.io.IOException
java.lang.ClassNotFoundException

setConversion

public void setConversion(Conversion converter)
                   throws DSETypeException
Convenience method to set the converter to the default converter.

Specified by:
setConversion in interface PropertyDescription
Parameters:
converter - Conversion
Throws:
DSETypeException - Conversion type is already supported.

setConversion

public void setConversion(java.lang.String conversionType,
                          Conversion converter)
                   throws DSETypeException
Sets the converter that handles the specified conversion type.

Specified by:
setConversion in interface PropertyDescription
Parameters:
conversionType - String
converter - Conversion
Throws:
DSETypeException - Conversion type is already supported.

setInitialState

protected void setInitialState(ElementState iniState)
Sets the initial business state for the PropertyDescriptor.


setInitialValue

protected void setInitialValue(java.lang.Object value)
Sets the initial value for the PropertyDescriptor.

Parameters:
value - Object

setName

public void setName(java.lang.String aName)
Sets the name attribute.

Parameters:
aName - java.lang.String

setValidator

public void setValidator(Validation validator)
                  throws DSETypeException
Sets the validator to be employed by this PropertyDescriptor to that passed.

Specified by:
setValidator in interface PropertyDescription
Parameters:
validator - Validation
Throws:
DSETypeException - Validator cannot validate the business object described.

unformatFromReader

public java.lang.Object unformatFromReader(java.io.Reader reader,
                                           java.lang.String conversionType)
                                    throws DSETypeException
Uses the passed reader to construct an Object of the correct Type using the appropriate conversion type. If conversion type is not supported, the default conversion type is used. Parameters required by the specific type converter may be taken from the owner descriptor by using the descriptor passed as an argument.

Specified by:
unformatFromReader in interface PropertyDescription
Parameters:
reader - Reader
conversionType - String
Returns:
Object
Throws:
DSETypeException - Unformatting is unsuccessful.

unformatFromReader

public java.lang.Object unformatFromReader(java.io.Reader reader,
                                           java.lang.String conversionType,
                                           java.util.Locale locale)
                                    throws DSETypeException
Uses the reader passed to construct an Object of the correct Type using the specified conversion type and the specified locale. If conversion type is not supported, the default conversion type is used.

Specified by:
unformatFromReader in interface PropertyDescription
Parameters:
reader - Reader
conversionType - String
locale - Locale
Returns:
Object
Throws:
DSETypeException - Unformatting is unsuccessful.

unformatFromReader

public java.lang.Object unformatFromReader(java.io.Reader reader,
                                           java.lang.String conversionType,
                                           java.util.Locale locale,
                                           Hashtable parameters)
                                    throws DSETypeException
Uses the reader passed to construct an Object of the correct Type using the specified conversion type and the specified locale. If conversion type is not supported, the default conversion type is used.

Parameters:
reader - Reader
conversionType - String
locale - Locale
parameters - com.ibm.btt.base.Hashtable
Returns:
Object
Throws:
DSETypeException - Unformatting is unsuccessful.

unformatFromString

public java.lang.Object unformatFromString(java.lang.String value,
                                           java.lang.String conversionType)
                                    throws DSETypeException
Converts the String passed to an Object using the appropriate conversion Type.

Specified by:
unformatFromString in interface PropertyDescription
Parameters:
value - String
conversionType - String
Returns:
Object
Throws:
DSETypeException - Unformatting is unsuccessful.

unformatFromString

public java.lang.Object unformatFromString(java.lang.String value,
                                           java.lang.String conversionType,
                                           Hashtable parameters)
                                    throws DSETypeException
Converts the String passed to an Object using the appropriate conversion Type.

Specified by:
unformatFromString in interface PropertyDescription
Parameters:
value - String
conversionType - String
parameters - com.ibm.btt.base.Hashtable
Returns:
Object
Throws:
DSETypeException - Unformatting is unsuccessful.

unformatFromString

public java.lang.Object unformatFromString(java.lang.String value,
                                           java.lang.String conversionType,
                                           java.util.Locale locale)
                                    throws DSETypeException
Converts the String passed to an Object using the specified conversion Type and the specified locale.

Specified by:
unformatFromString in interface PropertyDescription
Parameters:
value - String
conversionType - String
locale - Locale
Returns:
Object
Throws:
DSETypeException - Unformatting is unsuccessful.

unformatFromString

public java.lang.Object unformatFromString(java.lang.String value,
                                           java.lang.String conversionType,
                                           java.util.Locale locale,
                                           Hashtable parameters)
                                    throws DSETypeException
Converts the String passed to an Object using the specified conversion Type, the specified locale, and the specified Hashtable.

Parameters:
value - String
conversionType - String
locale - Locale
parameters - com.ibm.btt.base.Hashtable
Returns:
Object
Throws:
DSETypeException - Unformatting is unsuccessful.

validate

public java.lang.Object validate(java.lang.Object toValidate)
                          throws DSETypeException
Validates the Object by first unformatting and then applying business rules. If successful, this method returns the Object. Otherwise, this method throws the appropriate exception.

Specified by:
validate in interface PropertyDescription
Parameters:
toValidate - Object
Returns:
Object
Throws:
DSETypeException - Validation is unsuccessful.

validate

public java.lang.Object validate(java.lang.Object toValidate,
                                 Hashtable parameters)
                          throws DSETypeException
Validates the Object by first unformatting and then applying business rules. If successful, this method returns the Object. Otherwise, this method throws the appropriate exception.

Specified by:
validate in interface PropertyDescription
Parameters:
toValidate - Object
parameters - com.ibm.btt.base.Hashtable
Returns:
Object
Throws:
DSETypeException - Validation is unsuccessful.

validate

public java.lang.Object validate(java.lang.Object toValidate,
                                 java.lang.String convType)
                          throws DSETypeException
Validates the Object by first unformatting using the convType conversion and then applying business rules. If the convType is not supported, the default convType is used. If successful, this method returns the Object. Otherwise, this method throws the appropriate exception.

Specified by:
validate in interface PropertyDescription
Parameters:
toValidate - Object
convType - String
Returns:
Object
Throws:
DSETypeException - Validation is unsuccessful.

validate

public java.lang.Object validate(java.lang.Object toValidate,
                                 java.lang.String convType,
                                 Hashtable parameters)
                          throws DSETypeException
Validates the Object by first unformatting using the convType conversion and then applying business rules. If the convType is not supported, the default convType is used. If successful, this method returns the Object. Otherwise, this method throws the appropriate exception.

Specified by:
validate in interface PropertyDescription
Parameters:
toValidate - Object
convType - String
parameters - com.ibm.btt.base.Hashtable
Returns:
Object
Throws:
DSETypeException - Validation is unsuccessful.

validate

public java.lang.Object validate(java.lang.Object toValidate,
                                 java.lang.String convType,
                                 boolean useState)
                          throws DSETypeException
Validates the Object by first unformatting using the convType conversion and then applying business rules. If the convType is not supported, the default conversion type is used. If the state boolean is true, the method performs the validation based on the initial state attribute. If successful, this method returns the Object. Otherwise, this method throws the appropriate exception.

Specified by:
validate in interface PropertyDescription
Parameters:
toValidate - Object
convType - String
useState - boolean
Returns:
Object
Throws:
DSETypeException - Validation is unsuccessful.

validate

public java.lang.Object validate(java.lang.Object toValidate,
                                 java.lang.String convType,
                                 boolean useState,
                                 Hashtable parameters)
                          throws DSETypeException
Validates the Object by first unformatting using the convType conversion and then applying business rules. If the convType is not supported, the default conversion type is used.If the state boolean is true, the method performs the validation based on the initial state attribute. If successful, this method returns the Object. Otherwise, this method throws the appropriate exception.

Specified by:
validate in interface PropertyDescription
Parameters:
toValidate - Object
convType - String
useState - boolean
parameters - com.ibm.btt.base.Hashtable
Returns:
Object
Throws:
DSETypeException - Validation is unsuccessful.

validate

public java.lang.Object validate(java.lang.Object toValidate,
                                 boolean useState)
                          throws DSETypeException
Validates the Object passed by first unformatting and then applying business rules. If the state boolean is true, the method performs the validation based on the initial state attribute. If successful, this method returns the Object. Otherwise, this method throws the appropriate exception.

Specified by:
validate in interface PropertyDescription
Parameters:
toValidate - Object
useState - boolean
Returns:
Object
Throws:
DSETypeException - Validation is unsuccessful.

validateParams

public void validateParams()
                    throws DSETypeException
Validates the parameters externaly defined for this descriptor.

Specified by:
validateParams in interface PropertyDescription
Throws:
DSETypeException - If parameter validation fails

validateParams

public void validateParams(Hashtable parameters)
                    throws DSETypeException
Validates the parameters passed as a Hashtable.

Specified by:
validateParams in interface PropertyDescription
Parameters:
parameters - com.ibm.btt.base.Hashtable
Throws:
DSETypeException - If parameter validation fails

writeExternal

public void writeExternal(java.io.ObjectOutput s)
                   throws java.io.IOException
Provides concrete serialization handling for AbstractPropertyDescriptor.

Specified by:
writeExternal in interface java.io.Externalizable
Parameters:
s - java.io.ObjectOutput
Throws:
java.io.IOException

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2009