Interface QuestionManager
- All Known Implementing Classes:
SilverpeasQuestionManager
public interface QuestionManager
-
Method Summary
Modifier and TypeMethodDescriptionvoidcloseQuestions(Collection<Long> questionIds) longcreateQuestion(Question question) longcreateQuestionReply(Question question, Reply reply) Create and persist a question replylongcreateQuestionReply(Question question, Reply reply, List<org.silverpeas.core.pdc.pdc.model.PdcPosition> positions) Creates and persists a question with its reply, and classifies the question on the PdC on the specified positions.longcreateReply(Reply reply, Question question) voiddeleteQuestionAndReplies(Collection<Long> questionIds) getAllQuestions(String instanceId) getAllQuestionsByCategory(String instanceId, String categoryId) getAllReplies(long questionId, String instanceId) getPublicQuestions(String instanceId) getQuestion(long questionId) getQuestionAndReplies(long questionId) getQuestionPrivateReplies(long questionId, String instanceId) getQuestionPublicReplies(long questionId, String instanceId) getQuestionRecipients(long questionId) getQuestionReplies(long questionId, String instanceId) getQuestions(String instanceId) getQuestionsByIds(List<String> ids) getReceiveQuestions(String userId, String instanceId) getReply(long replyId) getSendQuestions(String userId, String instanceId) voidopenQuestions(Collection<Long> questionIds) voidupdateQuestion(Question question) voidupdateQuestionRecipients(Question question) voidupdateQuestionRepliesPrivateStatus(Collection<Long> questionIds) voidupdateQuestionRepliesPublicStatus(Collection<Long> questionIds) voidupdateRepliesPrivateStatus(Collection<Long> replyIds, Question question) voidupdateRepliesPublicStatus(Collection<Long> replyIds, Question question) voidupdateReply(Reply reply)
-
Method Details
-
createQuestion
- Throws:
QuestionReplyException
-
createReply
- Throws:
QuestionReplyException
-
closeQuestions
- Throws:
QuestionReplyException
-
openQuestions
- Throws:
QuestionReplyException
-
updateQuestionRecipients
- Throws:
QuestionReplyException
-
updateQuestionRepliesPublicStatus
- Throws:
QuestionReplyException
-
updateQuestionRepliesPrivateStatus
- Throws:
QuestionReplyException
-
updateRepliesPublicStatus
void updateRepliesPublicStatus(Collection<Long> replyIds, Question question) throws QuestionReplyException - Throws:
QuestionReplyException
-
updateRepliesPrivateStatus
void updateRepliesPrivateStatus(Collection<Long> replyIds, Question question) throws QuestionReplyException - Throws:
QuestionReplyException
-
updateQuestion
- Throws:
QuestionReplyException
-
updateReply
- Throws:
QuestionReplyException
-
deleteQuestionAndReplies
- Throws:
QuestionReplyException
-
getAllReplies
- Throws:
QuestionReplyException
-
getQuestion
- Throws:
QuestionReplyException
-
getQuestionAndReplies
- Throws:
QuestionReplyException
-
getQuestionsByIds
- Throws:
QuestionReplyException
-
getQuestionReplies
- Throws:
QuestionReplyException
-
getQuestionPublicReplies
List<Reply> getQuestionPublicReplies(long questionId, String instanceId) throws QuestionReplyException - Throws:
QuestionReplyException
-
getQuestionPrivateReplies
List<Reply> getQuestionPrivateReplies(long questionId, String instanceId) throws QuestionReplyException - Throws:
QuestionReplyException
-
getQuestionRecipients
- Throws:
QuestionReplyException
-
getReply
- Throws:
QuestionReplyException
-
getSendQuestions
- Throws:
QuestionReplyException
-
getReceiveQuestions
- Throws:
QuestionReplyException
-
getQuestions
- Throws:
QuestionReplyException
-
getAllQuestions
- Throws:
QuestionReplyException
-
getAllQuestionsByCategory
List<Question> getAllQuestionsByCategory(String instanceId, String categoryId) throws QuestionReplyException - Throws:
QuestionReplyException
-
getPublicQuestions
- Throws:
QuestionReplyException
-
createQuestionReply
Create and persist a question reply- Parameters:
question- the new questionreply- the answer linked to the given question- Returns:
- long identifier of the created question
- Throws:
QuestionReplyException
-
createQuestionReply
long createQuestionReply(Question question, Reply reply, List<org.silverpeas.core.pdc.pdc.model.PdcPosition> positions) throws QuestionReplyException Creates and persists a question with its reply, and classifies the question on the PdC on the specified positions. The question is classified before the subscribers are notified about the reply, and without alerting the subscribers on the PdC about the classification: they are notified about the reply with the other subscribers.- Parameters:
question- the new questionreply- the answer linked to the given questionpositions- the positions on the PdC on which the question has to be classified. If empty, the question isn't classified.- Returns:
- long identifier of the created question
- Throws:
QuestionReplyException- if an error occurs
-