IBM WebSphere Adapters Network Card User Manual


 
To access the binding configuration, do
context.get(BindingContext.BINDING_CONFIGURATION)
To access the expected type, do context.get (BindingContext.EXPECTED_TYPE)
Function selectors, data handlers, and data bindings are all configurable. This
configuration can be quite rich, providing single and multi-valued properties,
drop-downs, and user-editable tables and trees.
Every configurable artifact needs to have a Properties bean. The class name for
this bean must follow the naming convention [Artifact]Properties, where
[Artifact] is the class name of the function selector, data binding, or data handler
being configured. The properties bean contains all the artifact’s properties as
JavaBean properties. Getters and setters must be provided for every attribute.
Arrays are allowed for complex properties.
To enable the type of configuration that provides single and multi-valued
properties, drop-downs, and user-editable tables and trees, you need a
Configuration class and an EditableType class; each one using the same naming
convention as the Properties class: [Artifact]Configuration and
[Artifact]EditableType, respectively. The Configuration class must implement the
interface commonj.connector.metadata.BindingConfigurationEdit, which has one
method of note, which is public EditableType getEditableType();.
The method public EditableType getEditableType(); return the EditableType
implementation for this artifact. The EditableType class implements the
commonj.connector.metadata.discovery.EditableType interface, which contains the
following methods:
v PropertyGroup createProperties()
v void synchronizeFromBeanToPropertyGroup(Object bean, PropertyGroup pg)
v void synchronizeFromPropertyGroupToBean(PropertyGroup pg, Object bean)
The createProperties method creates an enterprise metadata discovery (EMD)
property group that can contain several properties, or even nested property
groups.
The synchronization methods provide the capability to keep the property group
synchronized with the property bean. To specify a data handler property in a data
binding, use a BindingTypeBeanProperty in the Property bean and a
WBIBindingProperty in the property group.
Implementing Enterprise Metadata Discovery to build an
interface
The com.ibm.j2ca.extension.emd.build.* package allows a simpler way to build
services with an adapter from existing types. Instead of the EMD process
generating types, it will import them and use them in a service.
Extending the adapter foundation classes to build services
Creating services that use technology-style adapters relies on being able to
implement the interfaces in the commonj.connector.metadata.build.* package or by
extending the AFC classes in com.ibm.j2ca.extension.emd.build.* package, or a
combination thereof.
To implement the interfaces that allow you to build services, you need to extend
the following adapter foundation classes:
160 WebSphere Adapters: WebSphere Adapter Toolkit User Guide