Class SilverpeasQuestionManager
java.lang.Object
org.silverpeas.components.questionreply.service.SilverpeasQuestionManager
- All Implemented Interfaces:
QuestionManager
-
Method Summary
Modifier and TypeMethodDescriptionvoidcloseQuestions(Collection<Long> questionIds) longcreateQuestion(Question question) Create and persist a question with targeted recipient (be careful recipient doesn't have question identifier set)longcreateQuestionReply(Question question, Reply reply) Save and persist question and reply given in parameterlongcreateQuestionReply(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) protected booleanisSortable(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) protected voidupdateWysiwygContent(Reply reply)
-
Method Details
-
createQuestion
Create and persist a question with targeted recipient (be careful recipient doesn't have question identifier set)- Specified by:
createQuestionin interfaceQuestionManager- Parameters:
question- the question to create- Returns:
- the generated question identifier
- Throws:
QuestionReplyException- if an error occurs
-
createReply
- Specified by:
createReplyin interfaceQuestionManager- Throws:
QuestionReplyException
-
closeQuestions
- Specified by:
closeQuestionsin interfaceQuestionManager- Throws:
QuestionReplyException
-
openQuestions
- Specified by:
openQuestionsin interfaceQuestionManager- Throws:
QuestionReplyException
-
updateQuestionRecipients
- Specified by:
updateQuestionRecipientsin interfaceQuestionManager- Throws:
QuestionReplyException
-
updateQuestionRepliesPublicStatus
public void updateQuestionRepliesPublicStatus(Collection<Long> questionIds) throws QuestionReplyException - Specified by:
updateQuestionRepliesPublicStatusin interfaceQuestionManager- Throws:
QuestionReplyException
-
updateQuestionRepliesPrivateStatus
public void updateQuestionRepliesPrivateStatus(Collection<Long> questionIds) throws QuestionReplyException - Specified by:
updateQuestionRepliesPrivateStatusin interfaceQuestionManager- Throws:
QuestionReplyException
-
updateRepliesPublicStatus
public void updateRepliesPublicStatus(Collection<Long> replyIds, Question question) throws QuestionReplyException - Specified by:
updateRepliesPublicStatusin interfaceQuestionManager- Throws:
QuestionReplyException
-
updateRepliesPrivateStatus
public void updateRepliesPrivateStatus(Collection<Long> replyIds, Question question) throws QuestionReplyException - Specified by:
updateRepliesPrivateStatusin interfaceQuestionManager- Throws:
QuestionReplyException
-
updateQuestion
- Specified by:
updateQuestionin interfaceQuestionManager- Throws:
QuestionReplyException
-
updateReply
- Specified by:
updateReplyin interfaceQuestionManager- Throws:
QuestionReplyException
-
deleteQuestionAndReplies
- Specified by:
deleteQuestionAndRepliesin interfaceQuestionManager- Throws:
QuestionReplyException
-
getAllReplies
- Specified by:
getAllRepliesin interfaceQuestionManager- Throws:
QuestionReplyException
-
getQuestion
- Specified by:
getQuestionin interfaceQuestionManager- Throws:
QuestionReplyException
-
getQuestionAndReplies
- Specified by:
getQuestionAndRepliesin interfaceQuestionManager- Throws:
QuestionReplyException
-
getQuestionsByIds
- Specified by:
getQuestionsByIdsin interfaceQuestionManager- Throws:
QuestionReplyException
-
getQuestionReplies
public List<Reply> getQuestionReplies(long questionId, String instanceId) throws QuestionReplyException - Specified by:
getQuestionRepliesin interfaceQuestionManager- Throws:
QuestionReplyException
-
getQuestionPublicReplies
public List<Reply> getQuestionPublicReplies(long questionId, String instanceId) throws QuestionReplyException - Specified by:
getQuestionPublicRepliesin interfaceQuestionManager- Throws:
QuestionReplyException
-
getQuestionPrivateReplies
public List<Reply> getQuestionPrivateReplies(long questionId, String instanceId) throws QuestionReplyException - Specified by:
getQuestionPrivateRepliesin interfaceQuestionManager- Throws:
QuestionReplyException
-
getQuestionRecipients
- Specified by:
getQuestionRecipientsin interfaceQuestionManager- Throws:
QuestionReplyException
-
getReply
- Specified by:
getReplyin interfaceQuestionManager- Throws:
QuestionReplyException
-
getSendQuestions
public List<Question> getSendQuestions(String userId, String instanceId) throws QuestionReplyException - Specified by:
getSendQuestionsin interfaceQuestionManager- Throws:
QuestionReplyException
-
getReceiveQuestions
public List<Question> getReceiveQuestions(String userId, String instanceId) throws QuestionReplyException - Specified by:
getReceiveQuestionsin interfaceQuestionManager- Throws:
QuestionReplyException
-
getQuestions
- Specified by:
getQuestionsin interfaceQuestionManager- Throws:
QuestionReplyException
-
getAllQuestions
- Specified by:
getAllQuestionsin interfaceQuestionManager- Throws:
QuestionReplyException
-
getAllQuestionsByCategory
public List<Question> getAllQuestionsByCategory(String instanceId, String categoryId) throws QuestionReplyException - Specified by:
getAllQuestionsByCategoryin interfaceQuestionManager- Throws:
QuestionReplyException
-
getPublicQuestions
- Specified by:
getPublicQuestionsin interfaceQuestionManager- Throws:
QuestionReplyException
-
createQuestionReply
Save and persist question and reply given in parameter- Specified by:
createQuestionReplyin interfaceQuestionManager- Parameters:
question- the new questionreply- the answer linked to the given question- Returns:
- the created question identifier
- Throws:
QuestionReplyException- if an error occurs
-
createQuestionReply
public long createQuestionReply(Question question, Reply reply, List<org.silverpeas.core.pdc.pdc.model.PdcPosition> positions) throws QuestionReplyException Description copied from interface:QuestionManagerCreates 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.- Specified by:
createQuestionReplyin interfaceQuestionManager- 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
-
updateWysiwygContent
-
isSortable
-