IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.base.types
Interface PropertyDescription

All Known Implementing Classes:
AbstractPropertyDescriptor, BasePropertyDescriptor, DatePropertyDescriptor, DoublePropertyDescriptor, FloatPropertyDescriptor, ICollPropertyDescriptor, IntegerPropertyDescriptor, KCollPropertyDescriptor, SimplePropertyDescriptor, StringPropertyDescriptor

@ATTR(value={"id#String#REQUIRED","implClass#String#REQUIRED","refType#String#IMPLIED","initialValue#String#IMPLIED","description#String#IMPLIED","isMandatory#Boolean#IMPLIED","isMandatory#Boolean#IMPLIED","isOmitted#Boolean#IMPLIED","isHidden#Boolean#IMPLIED","isReadOnly#Boolean#IMPLIED","isDisabled#Boolean#IMPLIED"})
public interface PropertyDescription

This interface is implemented by all PropertyDescriptors that descend from the abstract implementation, AbstractPropertyDescriptor. PropertyDescriptors are responsible for describing the business object with which they are associated. Each Type has an associated PropertyDescriptor to describe the Type's default business behavior.


Method Summary
 void applyDefaultDescriptor(PropertyDescription descriptor)
          Forces this PropertyDescriptor to inherit the business rules of the passed descriptor.
 java.lang.Object cloneDescriptee(java.lang.Object value)
          Returns an independent copy of the passed Object.
 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 specified 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 specified 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 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, java.util.Locale locale)
          Formats the Object using the specified conversion type, writer, and locale 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.
 java.util.Enumeration getConverters()
          Returns an Enumeration of all converters associated with this PropertyDescriptor.
 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 described 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 a hashtable with all the extra parameters of the PropertyDescription.
 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.
 TypedData initializeInstance(TypedData businessObject)
          Initializes the businessObject attributes
 void setConversion(Conversion converter)
          Sets the converter which handles the default conversion type.
 void setConversion(java.lang.String conversionType, Conversion converter)
          Sets the converter that handles the specified conversion type.
 void setValidator(Validation validator)
          Sets the validator to be employed by this PropertyDescriptor.
 java.lang.Object unformatFromReader(java.io.Reader reader, java.lang.String conversionType)
          Uses the reader passed 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)
          Constructs an Object of the correct Type using the specified conversion type, reader, and 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 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 to an Object using the specified conversion Type and locale.
 java.lang.Object validate(java.lang.Object toValidate)
          Validates the Object by first unformatting it and then applying its 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 passed by first unformatting and then applying business rules If successful, the method returns the Object.
 java.lang.Object validate(java.lang.Object toValidate, java.lang.String convType)
          Validates the Object passed 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 passed 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 passed 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 passed 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 from the Hashtable passed as argument.
 

Method Detail

applyDefaultDescriptor

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

Parameters:
descriptor - PropertyDescription
Throws:
DSETypeException

cloneDescriptee

java.lang.Object cloneDescriptee(java.lang.Object value)
                                 throws DSETypeException
Returns an independent copy of the passed Object.

Parameters:
value - Object
Returns:
Object
Throws:
DSETypeException

convertFrom

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

Parameters:
obj - java.lang.Object
Returns:
java.lang.Object
Throws:
- - DSETypeException if the conversion type is not supported
DSETypeException

convertFrom

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.

Parameters:
obj - java.lang.Object
convType - java.lang.String
Returns:
java.lang.Object
Throws:
DSETypeException - - Thrown if the conversion type is not supported

convertFrom

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 true, the conversion, if accepted by the converter, is performed by reference.

Returns:
java.lang.Object
Throws:
DSETypeException - - Thrown if the conversion type is not supported

convertFrom

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 true, the conversion, if accepted by the converter, is performed by reference.

Returns:
java.lang.Object
Throws:
DSETypeException - - Thrown if the conversion type is not supported

convertFrom

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 true, the conversion, if accepted by the converter, is performed by reference.

Returns:
java.lang.Object
Throws:
- - DSETypeException if the conversion type is not supported
DSETypeException

convertTo

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 is converter dependent.

Parameters:
obj - java.lang.Object
Returns:
java.lang.Object
Throws:
- - DSETypeException Thrown if the conversion type is not supported
DSETypeException

convertTo

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 is converter dependent.

Parameters:
obj - java.lang.Object
convType - java.lang.String
Returns:
java.lang.Object
Throws:
DSETypeException - - Thrown if the conversion type is not supported

convertTo

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 is converter dependent. If byReference is true, the conversion, if accepted by the converter, is performed by reference.

Returns:
java.lang.Object
Throws:
DSETypeException - - Thrown if the conversion type is not supported

convertTo

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 is converter dependent. If byReference is true, the conversion, if accepted by the converter, is performed by reference.

Returns:
java.lang.Object
Throws:
DSETypeException - - Thrown if the conversion type is not supported

convertTo

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 is converter dependent. If byReference is true, the conversion, if accepted by the converter, is performed by reference.

Returns:
java.lang.Object
Throws:
DSETypeException - Thrown if the conversion type is not supported

formatToString

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

Parameters:
value - Object
conversionType - String
Returns:
String
Throws:
DSETypeException - Thrown if the formatting is unsuccessful.

formatToString

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 specified conversion type.

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

formatToString

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 locale.

Parameters:
value - Object
conversionType - String
locale - Locale
Returns:
String
Throws:
DSETypeException - - Formatting is unsuccessful

formatToWriter

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.

Parameters:
value - Object
conversionType - String
writer - Writer
Throws:
DSETypeException - - Formatting is unsuccessful

formatToWriter

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 specified conversion type, writer, and locale passed as arguments.

Parameters:
value - Object
conversionType - String
writer - Writer
locale - Locale
Throws:
DSETypeException - - Formatting is unsuccessful

getConversion

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

Parameters:
conversionType - String
Returns:
Conversion
Throws:
DSETypeException - - Conversion type is already supported

getConverters

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

Returns:
Enumeration

getDescription

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

Returns:
String

getImplClass

java.lang.Class getImplClass()
                             throws DSETypeException
Gets the class of the business object described by this PropertyDescription.

Returns:
java.lang.Class
Throws:
DSETypeException

getInitialState

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

Returns:
ElementState

getInitialValue

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

Returns:
Object

getName

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

Returns:
String

getParameters

java.util.Hashtable getParameters()
Returns a hashtable with all the extra parameters of the PropertyDescription.

Returns:
java.util.Hashtable

getType

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

Returns:
Type

getValidator

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

Returns:
Validation

initializeInstance

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

Parameters:
businessObject - com.ibm.btt.base.TypedData
Returns:
com.ibm.btt.base.TypedData
Throws:
DSETypeException

setConversion

void setConversion(Conversion converter)
                   throws DSETypeException
Sets the converter which handles the default conversion type.

Parameters:
converter - Conversion
Throws:
DSETypeException - - Conversion type is already supported

setConversion

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

Parameters:
conversionType - String
converter - Conversion
Throws:
DSETypeException - - Conversion type is already supported

setValidator

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

Parameters:
validator - Validation
Throws:
DSETypeException - - Validator cannot validate the business object described

unformatFromReader

java.lang.Object unformatFromReader(java.io.Reader reader,
                                    java.lang.String conversionType)
                                    throws DSETypeException
Uses the reader passed to construct an Object of the correct Type using the appropriate conversion type.

Parameters:
reader - Reader
conversionType - String
Returns:
Object
Throws:
DSETypeException - - Unformatting is unsuccessful.

unformatFromReader

java.lang.Object unformatFromReader(java.io.Reader reader,
                                    java.lang.String conversionType,
                                    java.util.Locale locale)
                                    throws DSETypeException
Constructs an Object of the correct Type using the specified conversion type, reader, and locale.

Parameters:
reader - Reader
conversionType - String
locale - Locale
Returns:
Object
Throws:
DSETypeException - - Unformatting is unsuccessful

unformatFromString

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.

Parameters:
value - String
conversionType - String
Returns:
Object
Throws:
DSETypeException - - Unformatting is unsuccessful

unformatFromString

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

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

unformatFromString

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

Parameters:
value - String
conversionType - String
locale - Locale
Returns:
Object
Throws:
DSETypeException - - Unformatting is unsuccessful

validate

java.lang.Object validate(java.lang.Object toValidate)
                          throws DSETypeException
Validates the Object by first unformatting it and then applying its business rules. If successful, the method returns the Object.

Parameters:
toValidate - Object
Returns:
Object
Throws:
DSETypeException - - Thrown if the validation is unsuccessful

validate

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

Parameters:
toValidate - Object
parameters - com.ibm.btt.base.Hashtable
Returns:
Object
Throws:
DSETypeException - - Thrown if the validation is unsuccessful

validate

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

Parameters:
toValidate - Object
convType - String
Returns:
Object
Throws:
DSETypeException - - Thrown if the validation is unsuccessful

validate

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

Parameters:
toValidate - Object
convType - String
parameters - com.ibm.btt.base.Hashtable
Returns:
Object
Throws:
DSETypeException - - Thrown if the validation is unsuccessful

validate

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

Parameters:
toValidate - Object
convType - String
useState - boolean
Returns:
Object
Throws:
DSETypeException - Thrown if the validation is unsuccessful

validate

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

Parameters:
toValidate - Object
convType - String
useState - boolean
parameters - com.ibm.btt.base.Hashtable
Returns:
Object
Throws:
DSETypeException - - Thrown if the validation is unsuccessful

validate

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, the method returns the Object.

Parameters:
toValidate - Object
useState - boolean
Returns:
Object
Throws:
DSETypeException - - Thrown if the validation is unsuccessful

validateParams

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

Throws:
DSETypeException - Thrown if the parameter validation fails

validateParams

void validateParams(Hashtable parameters)
                    throws DSETypeException
Validates the parameters from the Hashtable passed as argument.

Parameters:
parameters - com.ibm.btt.base.Hashtable
Throws:
DSETypeException - - Thrown if the parameter validation fails

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2011