Package com.adobe.xfa
Class LogMessage
java.lang.Object
com.adobe.xfa.LogMessage
Class LogMessage represents a collection of one or more log message(s). Log
messages may be constructed from existing jfException and jfFormatPos objects
or by specifying a message Id along with a string representing the message
text. If a log message is constructed through the default constructor then
call insertMessage to insert a new message into the LogMessage object. As
with the constructors, new log messages constructed from calling
insertMessage may be constructed from existing jfException and jfFormatPos
objects or by specifying a message Id along with a string representing the
message text.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
-
Constructor Summary
ConstructorsConstructorDescriptionDefault ConstructorLogMessage
(int nId, String sText, int eSeverity) Construct a log message given a message Id and a string representing the message text.LogMessage
(ExFull oSource, int eSeverity) Construct a log message from a jfException object.LogMessage
(MsgFormatPos oSource, int eSeverity) Construct a log message from a jfFormatPos object. -
Method Summary
Modifier and TypeMethodDescriptionint
count()
Return a count of the number of LogMessageData objects in this object's collection.get
(int index) Reference the nIndex'th LogMessageData object in this object's collection.int
Get the severity for this message.void
insertMessage
(int nId, String sText, int eSeverity, String sLocale) Insert a new message given a message Id and a string representing the text of the message.void
insertMessage
(ExFull oSource, int eSeverity, String sLocale) Insert a new message from a jfException object.void
insertMessage
(MsgFormatPos oSource, int eSeverity, String sLocale) Insert a new message from a jfFormatPos object.void
insertValidationError
(String sValidationMsg, String sSOMExpression, String sLocale) Insert a new message from a jfFormatPos object.void
insertValidationWarning
(String sValidationMsg, String sSOMExpression, String sLocale) Insert a new message from a jfFormatPos object.void
setSeverity
(int eSeverity) Set the severity for this message.
-
Field Details
-
MSG_FATAL_ERROR
public static final int MSG_FATAL_ERROR- See Also:
-
MSG_IGNORE
public static final int MSG_IGNORE- See Also:
-
MSG_INFORMATION
public static final int MSG_INFORMATION- See Also:
-
MSG_TRACE
public static final int MSG_TRACE- See Also:
-
MSG_VALIDATION_ERROR
public static final int MSG_VALIDATION_ERROR- See Also:
-
MSG_VALIDATION_WARNING
public static final int MSG_VALIDATION_WARNING- See Also:
-
MSG_WARNING
public static final int MSG_WARNING- See Also:
-
-
Constructor Details
-
LogMessage
public LogMessage()Default Constructor -
LogMessage
Construct a log message from a jfException object.
oSource may contain more than one error message therefore this message will be a collection of LogMessageData objects. All messages will have the same eSeverity and date-time stamp.- Parameters:
oSource
- - contains message Id and texteSeverity
- - the message severity
-
LogMessage
Construct a log message given a message Id and a string representing the message text.- Parameters:
nId
- - the message IdsText
- - the message texteSeverity
- - the message severity
-
LogMessage
Construct a log message from a jfFormatPos object.- Parameters:
oSource
- - contains message Id and texteSeverity
- - the message severity
-
-
Method Details
-
count
public int count()Return a count of the number of LogMessageData objects in this object's collection.- Returns:
- the count.
-
get
Reference the nIndex'th LogMessageData object in this object's collection.- Parameters:
index
- - the index of LogMessageData object to return. Must be in the range 0 to Count() - 1.- Returns:
- the nIndex'th LogMessageData object.
-
getSeverity
public int getSeverity()Get the severity for this message.
See enum LogMessage::LogMessageSeverity for possible return values.- Returns:
- an LogMessageSeverity, representing the severity for this message.
-
insertMessage
Insert a new message from a jfException object. Create the date and time from a desired locale.- Parameters:
oSource
- - contains message Id and texteSeverity
- - the message severitysLocale
- - the desired locale to create the date and time from
oSource may contain more than one error message therefore this message will be a collection of LogMessageData objects. All messages will have the same eSeverity and date-time stamp.
-
insertMessage
Insert a new message given a message Id and a string representing the text of the message. Create the date and time from a desired locale.- Parameters:
nId
- - the message IdsText
- - the message texteSeverity
- - the message severitysLocale
- - the desired locale to create the date and time from
-
insertMessage
Insert a new message from a jfFormatPos object. Create the date and time from a desired locale.- Parameters:
oSource
- - contains message Id and texteSeverity
- - the message severitysLocale
- - the desired locale to create the date and time from
-
insertValidationError
Insert a new message from a jfFormatPos object. Create the date and time from a desired locale.- Parameters:
sValidationMsg
- the validation error textsSOMExpression
- the SOM expression for the node that caused the validation errorsLocale
- the desired locale to create the date and time from
-
insertValidationWarning
Insert a new message from a jfFormatPos object. Create the date and time from a desired locale.- Parameters:
sValidationMsg
- the validation warning textsSOMExpression
- the SOM expression for the node that caused the validation warningsLocale
- the desired locale to create the date and time from
-
setSeverity
public void setSeverity(int eSeverity) Set the severity for this message.
See enum LogMessage::LogMessageSeverity for possible values.- Parameters:
eSeverity
- the severity of this message
-