Package com.adobe.xfa

Class LogMessage

java.lang.Object
com.adobe.xfa.LogMessage

public final class LogMessage extends 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 Details

  • Constructor Details

    • 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 text
      eSeverity - - the message severity
    • LogMessage

      public LogMessage(int nId, String sText, int eSeverity)
      Construct a log message given a message Id and a string representing the message text.
      Parameters:
      nId - - the message Id
      sText - - the message text
      eSeverity - - the message severity
    • LogMessage

      public LogMessage(MsgFormatPos oSource, int eSeverity)
      Construct a log message from a jfFormatPos object.
      Parameters:
      oSource - - contains message Id and text
      eSeverity - - 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

      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, 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 text
      eSeverity - - the message severity
      sLocale - - 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, String sText, int eSeverity, 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 Id
      sText - - the message text
      eSeverity - - the message severity
      sLocale - - the desired locale to create the date and time from
    • insertMessage

      public void insertMessage(MsgFormatPos oSource, int eSeverity, 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 text
      eSeverity - - the message severity
      sLocale - - the desired locale to create the date and time from
    • insertValidationError

      public void insertValidationError(String sValidationMsg, String sSOMExpression, String sLocale)
      Insert a new message from a jfFormatPos object. Create the date and time from a desired locale.
      Parameters:
      sValidationMsg - the validation error text
      sSOMExpression - the SOM expression for the node that caused the validation error
      sLocale - the desired locale to create the date and time from
    • insertValidationWarning

      public void insertValidationWarning(String sValidationMsg, String sSOMExpression, String sLocale)
      Insert a new message from a jfFormatPos object. Create the date and time from a desired locale.
      Parameters:
      sValidationMsg - the validation warning text
      sSOMExpression - the SOM expression for the node that caused the validation warning
      sLocale - 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