Retrieves a message from the ODA
message file.
Syntax
public String getMsg(int msgNum, int msgType);
public String getMsg(int msgNum, int msgType, msgParameters);
public String getMsg(int msgNum, int msgType, Vector paramArray);
Parameters
- msgNum
- Specifies the message number from the message file.
- msgParameters
- Is an optional list of up to three String parameter values,
each corresponding to a parameter in the message list.
- msgType
- Is the type of message, specified as one of the following message-type
constants:
ODKConstant.XRD_FATAL
ODKConstant.XRD_ERROR
ODKConstant.XRD_URGENTWARNING
ODKConstant.XRD_WARNING
ODKConstant.XRD_INFO
- paramArray
- Is an optional list of parameters, as a Java Vector, to be
inserted in the message's parameters.
Exceptions
- IllegalArgumentException
- Thrown if the msgType argument is not valid.
Return values
A String that contains the text associated with the specified
message number. If message parameters have been provided, these values
have been inserted as appropriate into the message. If
msgNum is not valid, the method returns
null.
Notes
The getMsg() method retrieves a message from a message
file. It identifies the name of this file from the
MessageFile startup property, which the ODK automatically includes
with the ODA startup properties. The getMsg() method
provides the following forms:
- The first form retrieves a message with the specified message number
(msgNum) from the ODA message file.
- The second form also retrieves the message with the specified message
number (msgNum) from the ODA message file. It also provides
the ability to specify up to three String message parameters
(msgParameters) to be inserted in the message before retrieving
it.
- The third form also sends a message from the ODA message file and provides
message parameters. However, with this form you can send the message
parameters as elements in a Java Vector,
paramArray.
For information on ODA message files, see Message files. For information on message parameters, see Using parameter values.
See also
trace()
