public class ECMessageHelper
extends java.lang.Object
ECMessage
objects.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
static java.lang.String |
SYSTEM_RESOURCE
This is the default value of the system resource bundle.
|
static java.lang.String |
USER_RESOURCE
This is the default value of the user resource bundle.
|
Constructor and Description |
---|
ECMessageHelper() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
doubleTheApostrophy(java.lang.String theString)
This method inserts an additional apostrophe if the message text contains
an apostrophe.
|
static java.lang.Object[] |
generateMsgParms(java.lang.Object parm1)
This method creates an array of
Object s to be used as
parameters to be passed to a message. |
static java.lang.Object[] |
generateMsgParms(java.lang.Object parm1,
java.lang.Object parm2)
This method creates an array of
Object s to be used as
parameters to be passed to a message. |
static java.lang.Object[] |
generateMsgParms(java.lang.Object parm1,
java.lang.Object parm2,
java.lang.Object parm3)
This method creates an array of
Object s to be used as
parameters to be passed to a message. |
static java.lang.Object[] |
generateMsgParms(java.lang.Object parm1,
java.lang.Object parm2,
java.lang.Object parm3,
java.lang.Object parm4)
This method creates an array of
Object s to be used as
parameters to be passed to a message. |
static java.lang.Object[] |
generateMsgParms(java.lang.Object parm1,
java.lang.Object parm2,
java.lang.Object parm3,
java.lang.Object parm4,
java.lang.Object parm5)
This method creates an array of
Object s to be used as
parameters to be passed to a message. |
static java.lang.Object[] |
generateMsgParms(java.lang.Object parm1,
java.lang.Object parm2,
java.lang.Object parm3,
java.lang.Object parm4,
java.lang.Object parm5,
java.lang.Object parm6)
This method creates an array of
Object s to be used as
parameters to be passed to a message. |
static java.lang.String |
getCorrectiveActionMessage(ECMessage ecmsg,
java.util.Locale locale)
This method gets the textual description of the corrective action
message.
|
static java.lang.String |
getExceptionStackTrace(java.lang.Throwable e)
This method gets a
String object that contains the stack
trace of the exception passed as an argument. |
static java.lang.String |
getMessage(ECMessage ecmsg,
java.lang.Object[] params,
java.util.Locale locale)
This method gets the textual description of a message based on its type
(user or system message).
|
static java.lang.String |
getResourceBundleName(ECMessage ecmsg)
This method gets the resource bundle that contains the textual
description of the
ECMessage object passed as an argument. |
static java.lang.String |
getSystemMessage(ECMessage ecmsg,
java.lang.Object[] parms)
This method gets the textual description of the system message passed as
argument.
|
static java.lang.String |
getSystemMessage(ECMessage ecmsg,
java.lang.Object[] parms,
java.util.Locale locale)
This method gets the textual description of the system message passed as
argument.
|
static java.lang.String |
getUserMessage(ECMessage ecmsg,
java.lang.Object[] parms,
java.util.Locale locale)
This method gets the textual description of the user message.
|
public static final java.lang.String COPYRIGHT
public static final java.lang.String USER_RESOURCE
public static final java.lang.String SYSTEM_RESOURCE
public static java.lang.String doubleTheApostrophy(java.lang.String theString)
theString
- This is the message text.public static java.lang.Object[] generateMsgParms(java.lang.Object parm1)
Object
s to be used as
parameters to be passed to a message.parm1
- This is the value of the parameter to be substituted into the
message text.public static java.lang.Object[] generateMsgParms(java.lang.Object parm1, java.lang.Object parm2)
Object
s to be used as
parameters to be passed to a message.parm1
- This is the value of the first parameter to be substituted
into the message text.parm2
- This is the value of the second parameter to be substituted
into the message text.public static java.lang.Object[] generateMsgParms(java.lang.Object parm1, java.lang.Object parm2, java.lang.Object parm3)
Object
s to be used as
parameters to be passed to a message.parm1
- This is the value of the first parameter to be substituted
into the message text.parm2
- This is the value of the second parameter to be substituted
into the message text.parm3
- This is the value of the third parameter to be substituted
into the message text.public static java.lang.Object[] generateMsgParms(java.lang.Object parm1, java.lang.Object parm2, java.lang.Object parm3, java.lang.Object parm4)
Object
s to be used as
parameters to be passed to a message.parm1
- This is the value of the first parameter to be substituted
into the message text.parm2
- This is the value of the second parameter to be substituted
into the message text.parm3
- This is the value of the third parameter to be substituted
into the message text.parm4
- This is the value of the fourth parameter to be substituted
into the message text.public static java.lang.Object[] generateMsgParms(java.lang.Object parm1, java.lang.Object parm2, java.lang.Object parm3, java.lang.Object parm4, java.lang.Object parm5)
Object
s to be used as
parameters to be passed to a message.parm1
- This is the value of the first parameter to be substituted
into the message text.parm2
- This is the value of the second parameter to be substituted
into the message text.parm3
- This is the value of the third parameter to be substituted
into the message text.parm4
- This is the value of the fourth parameter to be substituted
into the message text.parm5
- This is the value of the fifth parameter to be substituted
into the message text.public static java.lang.Object[] generateMsgParms(java.lang.Object parm1, java.lang.Object parm2, java.lang.Object parm3, java.lang.Object parm4, java.lang.Object parm5, java.lang.Object parm6)
Object
s to be used as
parameters to be passed to a message.parm1
- This is the value of the first parameter to be substituted
into the message text.parm2
- This is the value of the second parameter to be substituted
into the message text.parm3
- This is the value of the third parameter to be substituted
into the message text.parm4
- This is the value of the fourth parameter to be substituted
into the message text.parm5
- This is the value of the fifth parameter to be substituted
into the message text.parm6
- This is the value of the fifth parameter to be substituted
into the message text.public static java.lang.String getExceptionStackTrace(java.lang.Throwable e)
String
object that contains the stack
trace of the exception passed as an argument.e
- This is a Throwable
object that contains stack
trace information.String
object that contains
the indicated stack trace.public static java.lang.String getMessage(ECMessage ecmsg, java.lang.Object[] params, java.util.Locale locale)
ecmsg
- This is the message objectparams
- This is an array of Object
s used for placeholders
replacement in the message text.locale
- This is the locale used to retrieve the messagepublic static java.lang.String getResourceBundleName(ECMessage ecmsg)
ECMessage
object passed as an argument.ecmsg
- This is the message object.public static java.lang.String getSystemMessage(ECMessage ecmsg, java.lang.Object[] parms)
ecmsg
- This is the message object.params
- This is an array of Object
s used for placeholders
replacement in the message text.public static java.lang.String getSystemMessage(ECMessage ecmsg, java.lang.Object[] parms, java.util.Locale locale)
ecmsg
- This is the message objectparams
- This is an array of Object
s used for placeholders
replacement in the message text.locale
- This is the locale used to retrieve the messagepublic static java.lang.String getUserMessage(ECMessage ecmsg, java.lang.Object[] parms, java.util.Locale locale)
ecmsg
- This is the message object.parms
- This is an array of Object
s used for placeholders
replacement in the message text.locale
- This is the locale used to identify the resource bundle
containing the translated message.public static java.lang.String getCorrectiveActionMessage(ECMessage ecmsg, java.util.Locale locale)
ecmsg
- This is the message object.locale
- This is the locale used to identify the resource bundle
containing the translated message.