Package com.adobe.xfa
Class LogMessage
- java.lang.Object
-
- com.adobe.xfa.LogMessage
-
public final class LogMessage extends java.lang.Object
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
Fields Modifier and Type Field Description static int
MSG_FATAL_ERROR
static int
MSG_IGNORE
static int
MSG_INFORMATION
static int
MSG_TRACE
static int
MSG_VALIDATION_ERROR
static int
MSG_VALIDATION_WARNING
static int
MSG_WARNING
-
Constructor Summary
Constructors Constructor Description LogMessage()
Default ConstructorLogMessage(int nId, java.lang.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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
count()
Return a count of the number of LogMessageData objects in this object's collection.LogMessageData
get(int index)
Reference the nIndex'th LogMessageData object in this object's collection.int
getSeverity()
Get the severity for this message.void
insertMessage(int nId, java.lang.String sText, int eSeverity, java.lang.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, java.lang.String sLocale)
Insert a new message from a jfException object.void
insertMessage(MsgFormatPos oSource, int eSeverity, java.lang.String sLocale)
Insert a new message from a jfFormatPos object.void
insertValidationError(java.lang.String sValidationMsg, java.lang.String sSOMExpression, java.lang.String sLocale)
Insert a new message from a jfFormatPos object.void
insertValidationWarning(java.lang.String sValidationMsg, java.lang.String sSOMExpression, java.lang.String sLocale)
Insert a new message from a jfFormatPos object.void
setSeverity(int eSeverity)
Set the severity for this message.
-
-
-
Field Detail
-
MSG_FATAL_ERROR
public static final int MSG_FATAL_ERROR
- See Also:
- Constant Field Values
-
MSG_IGNORE
public static final int MSG_IGNORE
- See Also:
- Constant Field Values
-
MSG_INFORMATION
public static final int MSG_INFORMATION
- See Also:
- Constant Field Values
-
MSG_TRACE
public static final int MSG_TRACE
- See Also:
- Constant Field Values
-
MSG_VALIDATION_ERROR
public static final int MSG_VALIDATION_ERROR
- See Also:
- Constant Field Values
-
MSG_VALIDATION_WARNING
public static final int MSG_VALIDATION_WARNING
- See Also:
- Constant Field Values
-
MSG_WARNING
public static final int MSG_WARNING
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
LogMessage
public LogMessage()
Default Constructor
-
LogMessage
public LogMessage(ExFull oSource, int eSeverity)
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
public LogMessage(int nId, java.lang.String sText, int eSeverity)
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
public LogMessage(MsgFormatPos oSource, int eSeverity)
Construct a log message from a jfFormatPos object.- Parameters:
oSource
- - contains message Id and texteSeverity
- - the message severity
-
-
Method Detail
-
count
public int count()
Return a count of the number of LogMessageData objects in this object's collection.- Returns:
- the count.
-
get
public LogMessageData get(int index)
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
public void insertMessage(ExFull oSource, int eSeverity, java.lang.String sLocale)
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
public void insertMessage(int nId, java.lang.String sText, int eSeverity, java.lang.String sLocale)
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
public void insertMessage(MsgFormatPos oSource, int eSeverity, java.lang.String sLocale)
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
public void insertValidationError(java.lang.String sValidationMsg, java.lang.String sSOMExpression, java.lang.String sLocale)
Insert a new message from a jfFormatPos object. Create the date and time from a desired locale.- Parameters:
sValidationMsg
- the validation error textsLocale
- the desired locale to create the date and time fromsSOMExpression
- the SOM expression for the node that caused the validation error
-
insertValidationWarning
public void insertValidationWarning(java.lang.String sValidationMsg, java.lang.String sSOMExpression, java.lang.String sLocale)
Insert a new message from a jfFormatPos object. Create the date and time from a desired locale.- Parameters:
sValidationMsg
- the validation warning textsLocale
- the desired locale to create the date and time fromsSOMExpression
- the SOM expression for the node that caused the validation warning
-
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
-
-