Interface QuestionContainerService

    • Method Detail

      • recordReplyToQuestionContainerByUser

        void recordReplyToQuestionContainerByUser​(QuestionContainerPK questionContainerPK,
                                                  String userId,
                                                  Map<String,​List<String>> reply)
        Parameters:
        questionContainerPK - the question container identifier
        userId - the user identifier
        reply -
      • recordReplyToQuestionContainerByUser

        void recordReplyToQuestionContainerByUser​(QuestionContainerPK questionContainerPK,
                                                  String userId,
                                                  Map<String,​List<String>> reply,
                                                  String comment,
                                                  boolean isAnonymousComment)
        Parameters:
        questionContainerPK - the question container identifier
        userId - the user identifier
        reply -
        comment -
        isAnonymousComment -
      • getSuggestion

        QuestionResult getSuggestion​(String userId,
                                     QuestionPK questionPK,
                                     AnswerPK answerPK)
        Return the suggestion of the user, for the question and the answer
        Parameters:
        userId - the user identifier
        questionPK -
        answerPK -
        Returns:
        QuestionResult
      • getQuestionContainerByParticipationId

        QuestionContainerDetail getQuestionContainerByParticipationId​(QuestionContainerPK questionContainerPK,
                                                                      String userId,
                                                                      int participationId)
        Parameters:
        questionContainerPK - the question container identifier
        userId - the user identifier
        participationId -
        Returns:
      • closeQuestionContainer

        void closeQuestionContainer​(QuestionContainerPK questionContainerPK)
        Parameters:
        questionContainerPK - the question container identifier
      • openQuestionContainer

        void openQuestionContainer​(QuestionContainerPK questionContainerPK)
        Parameters:
        questionContainerPK - the question container identifier
      • getNbVotersByQuestionContainer

        int getNbVotersByQuestionContainer​(QuestionContainerPK questionContainerPK)
        Parameters:
        questionContainerPK - the question container identifier
        Returns:
      • deleteQuestionContainer

        void deleteQuestionContainer​(QuestionContainerPK questionContainerPK)
        Parameters:
        questionContainerPK - the question container identifier
      • updateQuestionContainerHeader

        void updateQuestionContainerHeader​(QuestionContainerHeader questionContainerHeader)
        Parameters:
        questionContainerHeader -
      • updateQuestions

        void updateQuestions​(QuestionContainerPK questionContainerPK,
                             Collection<Question> questions)
        Parameters:
        questionContainerPK - the question container identifier
        questions -
      • getAveragePoints

        float getAveragePoints​(QuestionContainerPK questionContainerPK)
        Parameters:
        questionContainerPK - the question container identifier
        Returns:
      • getUserScoresByFatherId

        Collection<ScoreDetail> getUserScoresByFatherId​(QuestionContainerPK questionContainerPK,
                                                        String userId)
        Parameters:
        questionContainerPK - the question container identifier
        userId - the user identifier
        Returns:
      • getBestScoresByFatherId

        Collection<ScoreDetail> getBestScoresByFatherId​(QuestionContainerPK questionContainerPK,
                                                        int nbBestScores)
        Parameters:
        questionContainerPK - the question container identifier
        nbBestScores -
        Returns:
      • getAverageScoreByFatherId

        float getAverageScoreByFatherId​(QuestionContainerPK questionContainerPK)
        Parameters:
        questionContainerPK - the question container identifier
        Returns:
      • getUserNbParticipationsByFatherId

        int getUserNbParticipationsByFatherId​(QuestionContainerPK questionContainerPK,
                                              String userId)
        Parameters:
        questionContainerPK - the question container identifier
        userId - the user identifier
        Returns:
      • getUserScoreByFatherIdAndParticipationId

        ScoreDetail getUserScoreByFatherIdAndParticipationId​(QuestionContainerPK questionContainerPK,
                                                             String userId,
                                                             int participationId)
        Parameters:
        questionContainerPK - the question container identifier
        userId - the user identifier
        participationId -
        Returns:
      • updateScore

        void updateScore​(QuestionContainerPK questionContainerPK,
                         ScoreDetail scoreDetail)
        Parameters:
        questionContainerPK - the question container identifier
        scoreDetail -
      • exportCSV

        List<CSVRow> exportCSV​(QuestionContainerDetail questionContainer,
                               boolean addScore)
        create export file
        Parameters:
        questionContainer - : QuestionContainerDetail
        addScore - : boolean
        Returns:
        export file name : String