edu.cmu.pslc.logging

## Class TutorMessage

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

-     public final class TutorMessage
      extends Message

  The tutor message represents a logging element that originates from the tutor.
  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 inherited from class edu.cmu.pslc.logging.Message

      `ATTEMPT, CONTEXT_MSG_ELEMENT, CURRICULUM_MSG_ELEMENT, HINT_MESSAGE, HINT_REQUEST, MSG_ELEMENT, MSG_SEQUENCE_ELEMENT, RESULT, TOOL_MSG_ELEMENT, TUTOR_MSG_ELEMENT, VERSION_NUMBER, VERSION_NUMBER_ATTR`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addAction(java.lang.String action)` Adds an action to the event descriptor element.
    `void` | `addCustomField(CustomFieldElement customFieldElement)` Add custom field to custom field list given the custom field element.
    `void` | `addCustomField(java.lang.String name, java.lang.String value)` Add custom field to custom field list given the name and value.
    `void` | `addInput(java.lang.String input)` Adds an input to the event descriptor element.
    `void` | `addInterpretation(InterpretationElement interpretationElement)` Add an interpretation.
    `void` | `addSai(java.lang.String selection, java.lang.String action, java.lang.String input)` Add selection, action, and input to the event descriptor element.
    `void` | `addSelection(java.lang.String selection)` Adds a selection to the event descriptor element.
    `void` | `addSkill(SkillElement skillElement)` Add skill to skill list.
    `boolean` | `addTutorAdvice(java.lang.String tutorAdvice)` Add tutorAdvice string to a list.
    `static TutorMessage` | `create(ToolMessage toolMessage)` Creates a tutor message given a tool message.
    `ActionEvaluationElement` | `getActionEvaluationElement()` Get action evaluation element.
    `java.util.List` | `getCustomFieldList()` Get custom field list.
    `EventDescriptorElement` | `getEventDescriptorElement()` Get event descriptor element.
    `EventElement` | `getEventElement()` Get event element.
    `java.util.List` | `getInterpretationList()` Get the interpretation list.
    `java.lang.String` | `getProblemName()` Get problem name.
    `java.util.List` | `getSkillList()` Get skill list.
    `java.util.List` | `getTutorAdviceList()` Get tutor advice list.
    `void` | `setActionEvaluationElement(ActionEvaluationElement actionEvaluationElement)` Set action evaluation element.
    `void` | `setAsCorrectAttemptResponse()` Set action evaluation element to correct.
    `void` | `setAsCorrectAttemptResponse(java.lang.String subtype)` Set action evaluation element to correct given a subtype.
    `void` | `setAsHintResponse()` Set action evaluation element to hint.
    `void` | `setAsHintResponse(java.lang.String subtype)` Set action evaluation element to hint given a subtype.
    `void` | `setAsIncorrectAttemptResponse()` Set action evaluation element to incorrect.
    `void` | `setAsIncorrectAttemptResponse(java.lang.String subtype)` Set action evaluation element to incorrect given a subtype.
    `void` | `setEventElement(EventElement eventElement)` Set event element.
    `void` | `setProblemName(java.lang.String problemName)` Set problem name.
    `void` | `setReplayElement(java.lang.String replayText)` Set replay element.
    `void` | `setToolMessage(ToolMessage toolMessage)` Set tool message.
    `java.lang.String` | `toString()` To string method calls toString(boolean) method.
    `java.lang.String` | `toString(boolean logMetaFlag)` To string method.

    - ### Methods inherited from class edu.cmu.pslc.logging.Message

      `generateGUID, getContextMessageId, getMetaElement, getSessionId, getSource, getTimeString, getTimeZone, getUserId, setContextMessageId, setSource, setTimeString`

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

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

- - ### Method Detail

    - #### create

          public static TutorMessage create(ToolMessage toolMessage)

      Creates a tutor message given a tool message.
      Parameters:
        `toolMessage` - the tool message
      Returns:
        the new tutor message

    - #### getProblemName

          public java.lang.String getProblemName()

      Get problem name.
      Returns:
        the problem name

    - #### setProblemName

          public void setProblemName(java.lang.String problemName)

      Set problem name.
      Parameters:
        `problemName` - the problem name

    - #### getEventElement

          public EventElement getEventElement()

      Get event element.
      Returns:
        the event element

    - #### setEventElement

          public void setEventElement(EventElement eventElement)

      Set event element.
      Parameters:
        `eventElement` - the event element

    - #### setToolMessage

          public void setToolMessage(ToolMessage toolMessage)

      Set tool message.
      Parameters:
        `toolMessage` - the tool message

    - #### setAsCorrectAttemptResponse

          public void setAsCorrectAttemptResponse()

      Set action evaluation element to correct.

    - #### setAsCorrectAttemptResponse

          public void setAsCorrectAttemptResponse(java.lang.String subtype)

      Set action evaluation element to correct given a subtype.
      Parameters:
        `subtype` - the subtype

    - #### setAsIncorrectAttemptResponse

          public void setAsIncorrectAttemptResponse()

      Set action evaluation element to incorrect.

    - #### setAsIncorrectAttemptResponse

          public void setAsIncorrectAttemptResponse(java.lang.String subtype)

      Set action evaluation element to incorrect given a subtype.
      Parameters:
        `subtype` - the subtype

    - #### setAsHintResponse

          public void setAsHintResponse()

      Set action evaluation element to hint.

    - #### setAsHintResponse

          public void setAsHintResponse(java.lang.String subtype)

      Set action evaluation element to hint given a subtype.
      Parameters:
        `subtype` - the subtype

    - #### getEventDescriptorElement

          public EventDescriptorElement getEventDescriptorElement()

      Get event descriptor element.
      Returns:
        the event descriptor element

    - #### addSai

          public void addSai(java.lang.String selection,
                    java.lang.String action,
                    java.lang.String input)

      Add selection, action, and input to the event descriptor element.
      Parameters:
        `selection` - the selection
        `action` - the action
        `input` - the input

    - #### addSelection

          public void addSelection(java.lang.String selection)

      Adds a selection to the event descriptor element.
      Parameters:
        `selection` - the selection

    - #### addAction

          public void addAction(java.lang.String action)

      Adds an action to the event descriptor element.
      Parameters:
        `action` - the action

    - #### addInput

          public void addInput(java.lang.String input)

      Adds an input to the event descriptor element.
      Parameters:
        `input` - the input

    - #### getActionEvaluationElement

          public ActionEvaluationElement getActionEvaluationElement()

      Get action evaluation element.
      Returns:
        the action evaluation element

    - #### setActionEvaluationElement

          public void setActionEvaluationElement(ActionEvaluationElement actionEvaluationElement)

      Set action evaluation element.
      Parameters:
        `actionEvaluationElement` - the action evaluation element

    - #### getTutorAdviceList

          public java.util.List getTutorAdviceList()

      Get tutor advice list.
      Returns:
        the tutor advice list

    - #### addTutorAdvice

          public boolean addTutorAdvice(java.lang.String tutorAdvice)

      Add tutorAdvice string to a list. Note that the DataShop only uses the first item in the list.
      Parameters:
        `tutorAdvice` - the tutor advice string
      Returns:
        true if advice added to list, false if null or zero length.

    - #### getSkillList

          public java.util.List getSkillList()

      Get skill list.
      Returns:
        the skill list

    - #### addSkill

          public void addSkill(SkillElement skillElement)

      Add skill to skill list.
      Parameters:
        `skillElement` - the skill element

    - #### getInterpretationList

          public java.util.List getInterpretationList()

      Get the interpretation list.
      Returns:
        a list of interpretation elements

    - #### addInterpretation

          public void addInterpretation(InterpretationElement interpretationElement)

      Add an interpretation.
      Parameters:
        `interpretationElement` - the interpretation element

    - #### getCustomFieldList

          public java.util.List getCustomFieldList()

      Get custom field list.
      Returns:
        a list of custom fields elements

    - #### addCustomField

          public void addCustomField(java.lang.String name,
                            java.lang.String value)

      Add custom field to custom field list given the name and value.
      Parameters:
        `name` - the name
        `value` - the value

    - #### addCustomField

          public void addCustomField(CustomFieldElement customFieldElement)

      Add custom field to custom field list given the custom field element.
      Parameters:
        `customFieldElement` - the custom field element

    - #### setReplayElement

          public void setReplayElement(java.lang.String replayText)

      Set replay element.
      Parameters:
        `replayText` - the replay text

    - #### toString

          public java.lang.String toString()

      To string method calls toString(boolean) method.
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        the string to display

    - #### toString

          public java.lang.String toString(boolean logMetaFlag)

      To string method.
      Specified by:
        `toString` in class `Message`
      Parameters:
        `logMetaFlag` - whether to display the meta element
      Returns:
        the string to display

Copyright (c) 2015 - Pittsburgh Science of Learning Center