Translation actions and UPoC SubClasses
There are five UPoC subclasses concerned with user code in the context of message translation.
A common use for user code in translations is to manipulate the fields that are associated with an xlate operation before that operation is performed by the engine. For example, COPY, MATH, or TABLE. Four UPoC subclasses are provided for this purpose. Two subclasses deal with the fields as strings, and two which use different classes represent fields. depending on the type of field.
- Number of
Inval
fields: 1Treat all fields as strings?
-
xlateString
: Yes -
xlateObject
: No
-
- Number of
Inval
fields: More than 1Treat all fields as strings?
-
xlateStrings
: Yes -
xlateObjects
: No
-
The required interface style, which method is invoked by the engine, is determined by the options configured in the translation specification by the Translation Configurator.
A fifth UPoC subclass for translation, XLTCall
, is provided for Translate CALL operations. In this case, the
CALL method is invoked by the engine.
Each of the classes has one method. All are given an XPM object as an
input parameter. All except XLTCall
are given a
representation of the input values to the Xlate action.
-
XLTString
has anxlateString
method, taking a single string input value and returning a single object output. -
XLTStrings
has anxlateStrings
method, taking a vector of string input values and returning a Vector of Object output values. -
XLTObject
has anxlateObject
method, taking a single object input value and returning an object output. Conversion between system field types and Java classes is performed automatically as specified in the API documentation of the Datum class. -
XLTObjects
has anXlateObjects
method, taking a vector of object input values and returning a Vector of Object output values. Conversion between system field types and Java classes is performed automatically as specified in the API documentation of the Datum class. -
XLTCall
has aprocess
method that has no return and is given no input values. To do anything, the implementation of this method must use the methods of the XPM object that is passed in.