Class Message

java.lang.Object
de.mid.innovator.m2msdk.util.msg.Message
All Implemented Interfaces:
MessageIF, Serializable

public class Message extends Object implements MessageIF
Message with arguments and probably additional exception. The exception itself has an object stack and a call stack. You have to create a new instance of this class for each new message, you want to use for the logger or in an exception. The message key is translated on demand.
Version:
10.1.1
Author:
jmback
See Also:
  • Constructor Details

    • Message

      public Message(String iKey, Object... iArgs)
      Get message for key and arguments.
      Parameters:
      iKey - message key
      iArgs - message arguments
  • Method Details

    • getArgs

      public ArrayList<Object> getArgs()
      Get arguments of a single message.
      Returns:
      List of arguments
    • translate

      public static String translate(String iKey, Object... iArgs)
      Get message text for message key and arguments.
      Parameters:
      iKey - message key
      iArgs - message arguments
      Returns:
      message text
    • isTranslated

      public static boolean isTranslated(String iKey)
    • getDetails

      public String getDetails()
      Description copied from interface: MessageIF
      Get the details of a message.
      Specified by:
      getDetails in interface MessageIF
      Returns:
      Detailsd of error message including call stack
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getName

      public String getName()
      Description copied from interface: MessageIF
      Get the message name, i.e. description with variable arguments
      Specified by:
      getName in interface MessageIF
      Returns:
      description of the message
    • fillObjectstack

      public void fillObjectstack(SessionInterface iSession) throws M2MException
      Fill the object stack from the progress model.
      Parameters:
      iSession - current session
      Throws:
      M2MException
    • getObjectstack

      public String getObjectstack()
    • addException

      public void addException(Throwable iT)
    • getThrowable

      public Throwable getThrowable()
    • getKey

      public String getKey()
      Get message key of a single message.
      Returns:
      qualified message key
    • setArg

      public void setArg(int iPos, Object arg)
    • remember

      public void remember()
      Description copied from interface: MessageIF
      The message is stored into cache. This is useful for messages which should be accessed later.
      Specified by:
      remember in interface MessageIF
    • addAdditionalInformation

      public void addAdditionalInformation(String string, String string2)