IBM WebSphere Multichannel Bank Transformation Toolkit, Version 7.1

Declaring a new data type

To create a project-specific data type, a technical developer must first declare the new type in the type.xml file.

The declaration consists of the following components:
Shown below is a sample definition of a type:
<type id="Currency" implClass="com.ibm.btt.base.DataField">
		<Descriptor id="typeDefault" implClass="com.ibm.btt.base.types.impl.SimplePropertyDescriptor">
	     	<Converter convTypes="default" implClass="com.ibm.btt.base.types.impl.CurrencyConverter">
				</Converter>
				<Validator implClass="com.ibm.btt.base.types.impl.CurrencyValidator"/>
		</Descriptor>
</type>

Type id

The id is the name of the type. The type id must be unique.

Implementation class

impClass defines the implementation class of the type. For a simple type that has only one property, the implementation class is com.ibm.btt.base.DataField. For a compound type that has multiple properties, the implementation class is com.ibm.dse.base.KeyedCollection or com.ibm.btt.base.IndexedCollection.

Property descriptor

The property descriptor specifies the default business rules and behavior for a data type. A property descriptor can have one validator, which is used to check instance data, and one or multiple converters, which are used to transform instance data into a different format. A simple type has only one property descriptor. A compound type has multiple property descriptors.

In most cases, a technical developer does not need to implement their own property descriptor class. WebSphere® Multichannel Bank Transformation Toolkit provides the SimplePropertyDescriptor property descriptor class for simple types, KCollPropertyDescriptor and ICollPropertyDescriptor for compound types, and StringDescriptor, IntegerDescriptor, FloatDescriptor, and DateDescriptor for basic types. A technical developer can also implement their own property descriptor by extending AbstractPropertyDescriptor, which is the parent property descriptor class for all property descriptors. Figure 1 shows the hierarchy of property descriptor classes.

Figure 1. Hierarchy of the property descriptor classes.Hierarchy of the property descriptor classes.


Feedback