edu.cmu.pslc.logging

## Class Message

- java.lang.Object
- - edu.cmu.pslc.logging.Message

- Direct Known Subclasses:
    ContextMessage, PlainMessage, ToolMessage, TutorMessage

      public abstract class Message
      extends java.lang.Object

  The message class is an abstract class to describe any type of message that DataShop accepts.
  Version:
    $Revision: 9303 $
    Last modified by: $Author: mkomisin $
    Last modified on: $Date: 2013-05-30 11:30:09 -0400 (Thu, 30 May 2013) $
  Author:
    Alida Skogsholm

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `ATTEMPT` .
    `static java.lang.String` | `CONTEXT_MSG_ELEMENT` .
    `static java.lang.String` | `CURRICULUM_MSG_ELEMENT` .
    `static java.lang.String` | `HINT_MESSAGE` .
    `static java.lang.String` | `HINT_REQUEST` .
    `static java.lang.String` | `MSG_ELEMENT` .
    `static java.lang.String` | `MSG_SEQUENCE_ELEMENT` .
    `static java.lang.String` | `RESULT` .
    `static java.lang.String` | `TOOL_MSG_ELEMENT` .
    `static java.lang.String` | `TUTOR_MSG_ELEMENT` .
    `static java.lang.String` | `VERSION_NUMBER` .
    `static java.lang.String` | `VERSION_NUMBER_ATTR` .

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.lang.String` | `generateGUID(java.lang.String prefix)` Generate a unique identifier with a prefix.
    `java.lang.String` | `getContextMessageId()` Get context message id.
    `MetaElement` | `getMetaElement()` Get meta element.
    `java.lang.String` | `getSessionId()` Get session id.
    `java.lang.String` | `getSource()` Get source.
    `java.lang.String` | `getTimeString()` Get time as a string.
    `java.lang.String` | `getTimeZone()` Get time zone.
    `java.lang.String` | `getUserId()` Get user id as a string.
    `void` | `setContextMessageId(java.lang.String id)` Set context message id.
    `void` | `setSource(java.lang.String source)` Set source.
    `void` | `setTimeString(java.lang.String timeString)` Set time as a string.
    `abstract java.lang.String` | `toString(boolean logMetaFlag)` To string method.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### MSG_SEQUENCE_ELEMENT

          public static final java.lang.String MSG_SEQUENCE_ELEMENT

      .
      See Also:
        Constant Field Values

    - #### VERSION_NUMBER_ATTR

          public static final java.lang.String VERSION_NUMBER_ATTR

      .
      See Also:
        Constant Field Values

    - #### VERSION_NUMBER

          public static final java.lang.String VERSION_NUMBER

      .
      See Also:
        Constant Field Values

    - #### TOOL_MSG_ELEMENT

          public static final java.lang.String TOOL_MSG_ELEMENT

      .
      See Also:
        Constant Field Values

    - #### TUTOR_MSG_ELEMENT

          public static final java.lang.String TUTOR_MSG_ELEMENT

      .
      See Also:
        Constant Field Values

    - #### CONTEXT_MSG_ELEMENT

          public static final java.lang.String CONTEXT_MSG_ELEMENT

      .
      See Also:
        Constant Field Values

    - #### CURRICULUM_MSG_ELEMENT

          public static final java.lang.String CURRICULUM_MSG_ELEMENT

      .
      See Also:
        Constant Field Values

    - #### MSG_ELEMENT

          public static final java.lang.String MSG_ELEMENT

      .
      See Also:
        Constant Field Values

    - #### ATTEMPT

          public static final java.lang.String ATTEMPT

      .
      See Also:
        Constant Field Values

    - #### RESULT

          public static final java.lang.String RESULT

      .
      See Also:
        Constant Field Values

    - #### HINT_REQUEST

          public static final java.lang.String HINT_REQUEST

      .
      See Also:
        Constant Field Values

    - #### HINT_MESSAGE

          public static final java.lang.String HINT_MESSAGE

      .
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### toString

          public abstract java.lang.String toString(boolean logMetaFlag)

      To string method.
      Parameters:
        `logMetaFlag` - whether or not to display the meta element
      Returns:
        the string to display

    - #### generateGUID

          public static java.lang.String generateGUID(java.lang.String prefix)

      Generate a unique identifier with a prefix. Returns toString() of a new instance of java.rmi.server.UID.
      Parameters:
        `prefix` - the prefix to prepend to the GUID
      Returns:
        prefix plus the UID.toString() result

    - #### getContextMessageId

          public java.lang.String getContextMessageId()

      Get context message id.
      Returns:
        the context message id

    - #### setContextMessageId

          public void setContextMessageId(java.lang.String id)

      Set context message id.
      Parameters:
        `id` - the context message id

    - #### getMetaElement

          public MetaElement getMetaElement()

      Get meta element.
      Returns:
        the meta element

    - #### getUserId

          public java.lang.String getUserId()

      Get user id as a string.
      Returns:
        the user id as a string

    - #### getSessionId

          public java.lang.String getSessionId()

      Get session id.
      Returns:
        the session id as a string

    - #### getTimeString

          public java.lang.String getTimeString()

      Get time as a string.
      Returns:
        the time as a string

    - #### setTimeString

          public void setTimeString(java.lang.String timeString)

      Set time as a string.
      Parameters:
        `timeString` - time as a string

    - #### getTimeZone

          public java.lang.String getTimeZone()

      Get time zone.
      Returns:
        the time zone

    - #### getSource

          public java.lang.String getSource()

      Get source.
      Returns:
        the source

    - #### setSource

          public void setSource(java.lang.String source)

      Set source.
      Parameters:
        `source` - the source

Copyright (c) 2015 - Pittsburgh Science of Learning Center