Previous Topic: ValidatorsNext Topic: Exceptions


Converters

A converter is a Java class that converts data to and from specific formats. The CA IAM CS infrastructure uses converters to convert data between the format of the CA IAM CS LDAP type model and your endpoint's type model.

Converters are responsible for adjusting attribute values to and from the format and types expected by the endpoint system to which the connector communicates. For example, CA IAM CS represents a Date type in the XML format 2006-12-25 whereas a given endpoint can use a US date style, for example, 12/25/06.

Configuring a converter allows a connector implementation to be concerned with the endpoint format, while an LDAP client has the format transparently transformed into its native format. Although format and type conversions can be performed in a connector implementation, a converter lets you separate this formatting code from the connector implementation and reuse it in other connectors.

Fields that require converters usually need matching validators. Validators are evaluated before converters, and support detailed localized error messages, which converters do not. Converters can assume that they receive valid input data.

Converters must be able to map both from the values for LDAP attributes to their equivalent connector values (convertToConnector()), and the reverse direction (convertFromConnector()).

Several provided converters to handle common scenarios can be found in the packages com.ca.jcs.converter.attr and com.ca.jcs.converter.meta. These packages have global scope and therefore are registered in the file conf/server_jcs.xml.

As well as running on attribute values, the converters are applied to RDN components of a DN. For example, ForceCaseConverter is used to force appropriate components of a DN into upper case (for ORA connector) due to inconsistency in the native system.

Note: See Converter and Validator Plug-Ins Registration for instructions about how to register converter plug-ins.