Interface QuestionContainerService
-
- All Known Implementing Classes:
DefaultQuestionContainerService
public interface QuestionContainerService
- Author:
- neysseri
-
-
Method Summary
-
-
-
Method Detail
-
get
static QuestionContainerService get()
-
recordReplyToQuestionContainerByUser
void recordReplyToQuestionContainerByUser(QuestionContainerPK questionContainerPK, String userId, Map<String,List<String>> reply)
- Parameters:
questionContainerPK
- the question container identifieruserId
- the user identifierreply
-
-
recordReplyToQuestionContainerByUser
void recordReplyToQuestionContainerByUser(QuestionContainerPK questionContainerPK, String userId, Map<String,List<String>> reply, String comment, boolean isAnonymousComment)
- Parameters:
questionContainerPK
- the question container identifieruserId
- the user identifierreply
-comment
-isAnonymousComment
-
-
getSuggestions
Collection<QuestionResult> getSuggestions(QuestionContainerPK questionContainerPK)
- Parameters:
questionContainerPK
- the question container identifier- Returns:
-
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 identifierquestionPK
-answerPK
-- Returns:
- QuestionResult
-
getQuestionContainerHeaders
Collection<QuestionContainerHeader> getQuestionContainerHeaders(List<QuestionContainerPK> pks)
- Parameters:
pks
- A collection of QuestionContainer id- Returns:
-
getQuestionContainer
QuestionContainerDetail getQuestionContainer(QuestionContainerPK questionContainerPK, String userId)
- Parameters:
questionContainerPK
- the question container identifieruserId
- the user identifier- Returns:
-
getQuestionContainerByParticipationId
QuestionContainerDetail getQuestionContainerByParticipationId(QuestionContainerPK questionContainerPK, String userId, int participationId)
- Parameters:
questionContainerPK
- the question container identifieruserId
- the user identifierparticipationId
-- Returns:
-
getNotClosedQuestionContainers
Collection<QuestionContainerHeader> getNotClosedQuestionContainers(QuestionContainerPK questionContainerPK)
- Parameters:
questionContainerPK
- the question container identifier- Returns:
-
getOpenedQuestionContainers
Collection<QuestionContainerHeader> getOpenedQuestionContainers(QuestionContainerPK questionContainerPK)
- Parameters:
questionContainerPK
- the question container identifier- Returns:
-
getClosedQuestionContainers
Collection<QuestionContainerHeader> getClosedQuestionContainers(QuestionContainerPK questionContainerPK)
- Parameters:
questionContainerPK
- the question container identifier- Returns:
-
getInWaitQuestionContainers
Collection<QuestionContainerHeader> getInWaitQuestionContainers(QuestionContainerPK questionContainerPK)
- Parameters:
questionContainerPK
- the question container identifier- 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:
-
createQuestionContainer
QuestionContainerPK createQuestionContainer(QuestionContainerPK questionContainerPK, QuestionContainerDetail questionContainerDetail, String userId)
- Parameters:
questionContainerPK
- the question container identifierquestionContainerDetail
-userId
- the user identifier- Returns:
-
deleteQuestionContainer
void deleteQuestionContainer(QuestionContainerPK questionContainerPK)
- Parameters:
questionContainerPK
- the question container identifier
-
deleteVotes
void deleteVotes(QuestionContainerPK questionContainerPK)
-
updateQuestionContainerHeader
void updateQuestionContainerHeader(QuestionContainerHeader questionContainerHeader)
- Parameters:
questionContainerHeader
-
-
updateQuestions
void updateQuestions(QuestionContainerPK questionContainerPK, Collection<Question> questions)
- Parameters:
questionContainerPK
- the question container identifierquestions
-
-
getAveragePoints
float getAveragePoints(QuestionContainerPK questionContainerPK)
- Parameters:
questionContainerPK
- the question container identifier- Returns:
-
getOpenedQuestionContainersAndUserScores
Collection<QuestionContainerHeader> getOpenedQuestionContainersAndUserScores(QuestionContainerPK questionContainerPK, String userId)
- Parameters:
questionContainerPK
- the question container identifieruserId
- the user identifier- Returns:
-
getQuestionContainersWithScores
Collection<QuestionContainerHeader> getQuestionContainersWithScores(QuestionContainerPK questionContainerPK)
- Parameters:
questionContainerPK
- the question container identifier- Returns:
-
getQuestionContainersWithUserScores
Collection<QuestionContainerHeader> getQuestionContainersWithUserScores(QuestionContainerPK questionContainerPK, String userId)
- Parameters:
questionContainerPK
- the question container identifieruserId
-- Returns:
-
getUserScoresByFatherId
Collection<ScoreDetail> getUserScoresByFatherId(QuestionContainerPK questionContainerPK, String userId)
- Parameters:
questionContainerPK
- the question container identifieruserId
- the user identifier- Returns:
-
getBestScoresByFatherId
Collection<ScoreDetail> getBestScoresByFatherId(QuestionContainerPK questionContainerPK, int nbBestScores)
- Parameters:
questionContainerPK
- the question container identifiernbBestScores
-- Returns:
-
getAverageScoreByFatherId
float getAverageScoreByFatherId(QuestionContainerPK questionContainerPK)
- Parameters:
questionContainerPK
- the question container identifier- Returns:
-
getScoresByFatherId
Collection<ScoreDetail> getScoresByFatherId(QuestionContainerPK questionContainerPK)
- Parameters:
questionContainerPK
- the question container identifier- Returns:
-
getUserNbParticipationsByFatherId
int getUserNbParticipationsByFatherId(QuestionContainerPK questionContainerPK, String userId)
- Parameters:
questionContainerPK
- the question container identifieruserId
- the user identifier- Returns:
-
getUserScoreByFatherIdAndParticipationId
ScoreDetail getUserScoreByFatherIdAndParticipationId(QuestionContainerPK questionContainerPK, String userId, int participationId)
- Parameters:
questionContainerPK
- the question container identifieruserId
- the user identifierparticipationId
-- Returns:
-
updateScore
void updateScore(QuestionContainerPK questionContainerPK, ScoreDetail scoreDetail)
- Parameters:
questionContainerPK
- the question container identifierscoreDetail
-
-
deleteIndex
void deleteIndex(QuestionContainerPK pk)
- Parameters:
pk
-
-
getSilverObjectId
int getSilverObjectId(QuestionContainerPK pk)
-
getHTMLQuestionPath
String getHTMLQuestionPath(QuestionContainerDetail questionDetail)
-
getQuestionContainerHeader
QuestionContainerHeader getQuestionContainerHeader(QuestionContainerPK questionContainerPK)
-
exportCSV
List<CSVRow> exportCSV(QuestionContainerDetail questionContainer, boolean addScore)
create export file- Parameters:
questionContainer
- : QuestionContainerDetailaddScore
- : boolean- Returns:
- export file name : String
-
getWorstScoresByFatherId
Collection<ScoreDetail> getWorstScoresByFatherId(QuestionContainerPK questionContainerPK, int nbScores)
-
-