Package com.adobe.xfa

Class 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.
    • Constructor Summary

      Constructors 
      Constructor Description
      LogMessage()
      Default Constructor
      LogMessage​(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.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 text
        eSeverity - - 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 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 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 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,
                                  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 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,
                                  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 text
        eSeverity - - the message severity
        sLocale - - 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 text
        sLocale - the desired locale to create the date and time from
        sSOMExpression - 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 text
        sLocale - the desired locale to create the date and time from
        sSOMExpression - 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