3.1.9 Using and/or Extending CustomAdapterConfig Class

Some adapters can use or extend the CustomPropertyPage to enable the user to set their activation and interaction spec properties.

But most new adapters have their own property pages because this provides the Adapters with more control of how the properties display (for example, a list of values, a UI control, or a validation).

The class that the Custom adapter uses to read its configuration file, CustomAdapterConfig, is public and can be used or extended by other adapters.

The CustomAdapterConfig class retrieves lists of possible specs, properties, and connection-factories from the configuration file, customAdapter-config.xml (which is the default custom Adapter configuration file). You can use a different configuration file by extending this class and overriding the getConfigFilePath()method.

The attributes displayResourceKey and resourceBundle are optional. If activation-spec, interaction-spec, or property elements have a displayResourceKey, The framework uses the attribute value as a key to retrieve displayable text from a resource bundle available by the getDisplayString() or toString() methods. If a resource bundle is not available or the key is not found in the bundle, the key itself is used as the displayable text (hence, the class is not required to have a resource bundle).

You can pass a resource bundle to the constructor of this class, but it also can be overriden by the resourceBundle attribute on the <connection-factory> element in the configuration file.