IBM WebSphere Multichannel Bank Transformation Toolkit, Version 7.1

Typed data elements

Typed data elements represent business objects such as Date, ProductNumber, and Money. They differ from non-typed data elements because they contain information about the type of business objects they represent and conform to the object's business rules. For example, a typed data element identifies how the toolkit displays the business object it represents and it also identifies what validation must occur when the toolkit changes an attribute value. To hold this information, typed data elements have one or more property descriptors. Non-typed data elements do not have a property descriptor.

You can work with both typed and non-typed data elements as they can co-exist at runtime. This means you can design and implement the data required for a service or process using the appropriate data elements (typed or non-typed). The only difference in runtime is that with non-typed data elements, the getDescriptor method returns null and with typed data elements, the getDescriptor method returns an object implementing the PropertyDescription interface. Once you have the property descriptor, you can use it to validate, format, unformat or clone the typed data element.

The following diagram shows the classes used to implement typed data elements and their relationships:

Diagram of the relationship between simple and compound type data elements.

In WebSphere® Multichannel Bank Transformation Toolkit version 7.0, or earlier, a typed data infrastructure was provided with sample typed data elements. The sample typed data elements had the following problems:
In WebSphere Multichannel Bank Transformation Toolkit version 7.1, the problems with the sample typed data elements in version 7.0 and earlier versions have been resolved. The WebSphere Multichannel Bank Transformation Toolkit version 7.1 typed data elements have the following features:
Note that when you edit data definitions, if the data field has an associated type, the following requirements must be met when providing type-related parameters:
WebSphere Multichannel Bank Transformation Toolkit provides the following four typed data elements by default: The default typed data elements extend BasicType.

BasicType

BasicType is the base type from which all other types extend. It is also the new recommended type to be used for extending custom, project-specific types.
Descriptor
ImplClass : com.ibm.btt.base.types.impl.BasePropertyDescriptor
Converter
ImplClass : com.ibm.btt.base.types.impl.BaseConverter
Validator
ImplClass : com.ibm.btt.base.types.impl.BaseValidator
isMandatory (boolean)
If true, the end user must provide a value to the data field managed by this type before submitting any request. All subclasses of this type support the isMandatory parameter.

String

The String type extends from BasicType and is used for general string-based input.
Descriptor
ImplClass : com.ibm.btt.base.types.impl.SimplePropertyDescriptor
Converter
ImplClass : com.ibm.btt.base.types.impl.StringConverter
Validator
ImplClass : com.ibm.btt.base.types.impl.StringValidator
minimumLength (int)
Is the minimum length of characters for an input of this type to be valid.
maximumLength (int)
Is the maximum length of characters for an input of this type to be valid.
regExp (string)
Is a regular expression string that is used to match the input string for validation. For example, the regExp="\d{10}" regular expression will validate whether the input string is 10 numbers.

Date

The Date type extends from BasicType and is used for date input.
Descriptor
ImplClass : com.ibm.btt.base.types.impl.SimplePropertyDescriptor
Converter
ImplClass : com.ibm.btt.base.types.impl.DateConverter
pattern (String)
Pattern to be used when formatting and validating input. The default pattern is yyyy-MM-dd.
Validator
ImplClass : com.ibm.btt.base.types.impl.DateValidator
minimumDate (String)
Is the lower limit of the date value input. Supported formats: yyyy-MM-dd. Example: 2010-03-27. today+*y*m*d. Examples: today, today + 2y, today + 2m + 2d, etc. today-*y*m*d. Examples: today, today - 3y, today - 5d
maximumDate (String)
Is the lower limit of the date value input. The format is the same as the minimumDate parameter.

Number

The Number type extends from BasicType, and is used for input and output of numeric data.
Descriptor
ImplClass : com.ibm.btt.base.types.impl.SimplePropertyDescriptor
Converter
ImplClass : com.ibm.btt.base.types.impl.NumberConverter
numberType (fixed list of choices)
Is an enumerated value with one of the following types: byte, short, integer, long, double, float or bigDecimal. The default value is bigDecimal.
pattern (String)
Is the pattern used to format the number. If no value is specified, the default behavior is to use the locale-specific formatting. The pattern formate follows java number, for example: #,0000
decimalPlaces (int, mandatory if numberType is not a scalar type)
Is the length of the decimal part of the number. It overrides the setting of number pattern. For example: 4 represent there are 4 number after the decimal points.
Validator
ImplClass : com.ibm.btt.base.types.impl.NumberValidator
minimumNumber (same type specified in numberType)
Is the lower limit for valid data of this type.
maximumNumber (same type specified in numberType)
Is the upper limit for valid data of this type.

CurrencyNumber

The CurrencyNumber type extends from Number and is used for input and output of money amounts.
Descriptor
ImplClass : com.ibm.btt.base.types.impl.SimplePropertyDescriptor
Convertor
ImplClass : com.ibm.btt.base.types.impl.CurrencyConverter
numberType (fixed list of choices)
Is an enumerated value with one of the following types: byte, short, integer, long, double, float or bigDecimal. The default value is bigDecimal.
pattern (String)
Is the pattern used to format the number. If no value is specified, the default behavior is to use the locale-specific formatting. It is same to the number type.
decimalPlaces (int, mandatory if numberType is not a scalar type)
Is the length of the decimal part of the number. It overrides the setting of number pattern. It is same to the number type.
currency (String)
One currency setting to assign a type for the currency. For example: USD represents U.S. Dollars, CNY represents Chinese yuan
Validator
ImplClass : com.ibm.btt.base.types.impl.CurrencyValidator
minimumNumber (same type specified in numberType)
Is the lower limit for valid data of this type.
maximumNumber (same type specified in numberType)
Is the upper limit for valid data of this type.


Feedback