edu.cmu.pslc.logging

## Class ContextMessage

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

-     public final class ContextMessage
      extends Message

  The context message class.
  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` | `addCondition(ConditionElement conditionElement)` Add condition element.
    `void` | `addCondition(java.lang.String conditionName)` Add condition name.
    `void` | `addCustomField(CustomFieldElement customFieldElement)` Add custom field.
    `void` | `addCustomField(java.lang.String name, java.lang.String value)` Add custom field.
    `void` | `addDfa(java.lang.String dfa)` Add DFA.
    `void` | `addInstructor(java.lang.String instructor)` Set instructor.
    `void` | `addSkill(SkillElement skillElement)` Add skill element.
    `static ContextMessage` | `create(java.lang.String name, MetaElement meta)` Static public method which creates a new context message.
    `static ContextMessage` | `createContinueProblem(MetaElement meta)` Creates new continue problem event.
    `static ContextMessage` | `createStartProblem(MetaElement meta)` Creates a new start problem event.
    `ClassElement` | `getClassElement()` Returns the class element.
    `java.util.List` | `getConditionList()` Returns the condition list.
    `java.util.List` | `getCustomFieldList()` Returns the custom field list.
    `DatasetElement` | `getDatasetElement()` Returns the dataset element.
    `java.util.List` | `getDfaList()` Returns the DFA list.
    `java.lang.String` | `getNameAttribute()` Returns the name attribute.
    `java.util.List` | `getSkillList()` Returns the skill list.
    `void` | `setClassDescription(java.lang.String description)` Set description.
    `void` | `setClassName(java.lang.String name)` Set class name.
    `void` | `setDataset(DatasetElement datasetElement)` Add dataset element.
    `void` | `setPeriod(java.lang.String period)` Set period.
    `void` | `setSchool(java.lang.String school)` Set school name.
    `java.lang.String` | `toString()` To string method which displays meta element.
    `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

    - #### createStartProblem

          public static ContextMessage createStartProblem(MetaElement meta)

      Creates a new start problem event.
      Parameters:
        `meta` - the meta element
      Returns:
        the context message

    - #### createContinueProblem

          public static ContextMessage createContinueProblem(MetaElement meta)

      Creates new continue problem event.
      Parameters:
        `meta` - the meta element
      Returns:
        the context message

    - #### create

          public static ContextMessage create(java.lang.String name,
                              MetaElement meta)

      Static public method which creates a new context message.
      Parameters:
        `name` - the name
        `meta` - the meta element
      Returns:
        the context message

    - #### setClassName

          public void setClassName(java.lang.String name)

      Set class name.
      Parameters:
        `name` - the class name

    - #### setSchool

          public void setSchool(java.lang.String school)

      Set school name.
      Parameters:
        `school` - the school name

    - #### setPeriod

          public void setPeriod(java.lang.String period)

      Set period.
      Parameters:
        `period` - the period

    - #### setClassDescription

          public void setClassDescription(java.lang.String description)

      Set description.
      Parameters:
        `description` - the description

    - #### addInstructor

          public void addInstructor(java.lang.String instructor)

      Set instructor.
      Parameters:
        `instructor` - the instructor

    - #### addDfa

          public void addDfa(java.lang.String dfa)

      Add DFA.
      Parameters:
        `dfa` - the dfa

    - #### addSkill

          public void addSkill(SkillElement skillElement)

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

    - #### setDataset

          public void setDataset(DatasetElement datasetElement)

      Add dataset element.
      Parameters:
        `datasetElement` - the dataset element

    - #### addCondition

          public void addCondition(java.lang.String conditionName)

      Add condition name.
      Parameters:
        `conditionName` - the condition name

    - #### addCondition

          public void addCondition(ConditionElement conditionElement)

      Add condition element.
      Parameters:
        `conditionElement` - the condition element

    - #### addCustomField

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

      Add custom field.
      Parameters:
        `name` - the name
        `value` - the value

    - #### addCustomField

          public void addCustomField(CustomFieldElement customFieldElement)

      Add custom field.
      Parameters:
        `customFieldElement` - the custom field element

    - #### toString

          public java.lang.String toString()

      To string method which displays meta element.
      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

    - #### getNameAttribute

          public java.lang.String getNameAttribute()

      Returns the name attribute.
      Returns:
        the nameAttribute

    - #### getClassElement

          public ClassElement getClassElement()

      Returns the class element.
      Returns:
        the classElement

    - #### getDfaList

          public java.util.List getDfaList()

      Returns the DFA list.
      Returns:
        the dfaList

    - #### getSkillList

          public java.util.List getSkillList()

      Returns the skill list.
      Returns:
        the skillList

    - #### getDatasetElement

          public DatasetElement getDatasetElement()

      Returns the dataset element.
      Returns:
        the datasetElement

    - #### getConditionList

          public java.util.List getConditionList()

      Returns the condition list.
      Returns:
        the conditionList

    - #### getCustomFieldList

          public java.util.List getCustomFieldList()

      Returns the custom field list.
      Returns:
        the customFieldList

Copyright (c) 2015 - Pittsburgh Science of Learning Center