Class AbstractMatrixExportHandler

java.lang.Object
ch.tocco.nice2.optional.survey.impl.action.export.questionhandlers.AbstractQuestionExportHandler
ch.tocco.nice2.optional.survey.impl.action.export.questionhandlers.AbstractMatrixExportHandler
All Implemented Interfaces:
QuestionExportHandler
Direct Known Subclasses:
MatrixQuestionExportHandler, TextChoiceQuestionExportHandler

public abstract class AbstractMatrixExportHandler extends AbstractQuestionExportHandler
abstract class that handles matrix specific methods - get answers sorted by x axis - get label from x axis - get values for selected answers
  • Constructor Details

    • AbstractMatrixExportHandler

      public AbstractMatrixExportHandler()
  • Method Details

    • getSurveyAnswersSortedByMatrixX

      protected EntityList getSurveyAnswersSortedByMatrixX(SurveyBean surveyBean)
      resolve all answers from the question and order them by the x axis sorting
      Parameters:
      surveyBean - the bean to get the question from
      Returns:
      the ordered entity list
    • getLabelFromAxis

      protected String getLabelFromAxis(Entity sourceEntity, String axis)
      get the label from a related axis
      Parameters:
      sourceEntity - entity from which to get the axis
      axis - which axis to get (x or y)
      Returns:
      the label or an empty string if no axis is related
    • getListForChoice

      protected List<Object> getListForChoice(Entity answer, SurveyBean surveyBean)
      either returns the values for a selected or unselected answer values for selected answer (1, points) values for unselected answer (0, "")
      Parameters:
      answer - the answer to check
      surveyBean - the bean to get the selected answers from
      Returns:
      a list of values to display