Class SilverpeasQuestionManager
- java.lang.Object
-
- org.silverpeas.components.questionreply.service.SilverpeasQuestionManager
-
- All Implemented Interfaces:
QuestionManager
@Service public class SilverpeasQuestionManager extends Object implements QuestionManager
-
-
Method Summary
-
-
-
Method Detail
-
createQuestion
public long createQuestion(Question question) throws QuestionReplyException
Create and persist a question with targeted recipient (be careful recipient doesn't have question identifier set)- Specified by:
createQuestion
in interfaceQuestionManager
- Parameters:
question
- the question to create- Returns:
- the generated question identifier
- Throws:
QuestionReplyException
-
createReply
public long createReply(Reply reply, Question question) throws QuestionReplyException
- Specified by:
createReply
in interfaceQuestionManager
- Throws:
QuestionReplyException
-
closeQuestions
public void closeQuestions(Collection<Long> questionIds) throws QuestionReplyException
- Specified by:
closeQuestions
in interfaceQuestionManager
- Throws:
QuestionReplyException
-
openQuestions
public void openQuestions(Collection<Long> questionIds) throws QuestionReplyException
- Specified by:
openQuestions
in interfaceQuestionManager
- Throws:
QuestionReplyException
-
updateQuestionRecipients
public void updateQuestionRecipients(Question question) throws QuestionReplyException
- Specified by:
updateQuestionRecipients
in interfaceQuestionManager
- Throws:
QuestionReplyException
-
updateQuestionRepliesPublicStatus
public void updateQuestionRepliesPublicStatus(Collection<Long> questionIds) throws QuestionReplyException
- Specified by:
updateQuestionRepliesPublicStatus
in interfaceQuestionManager
- Throws:
QuestionReplyException
-
updateQuestionRepliesPrivateStatus
public void updateQuestionRepliesPrivateStatus(Collection<Long> questionIds) throws QuestionReplyException
- Specified by:
updateQuestionRepliesPrivateStatus
in interfaceQuestionManager
- Throws:
QuestionReplyException
-
updateRepliesPublicStatus
public void updateRepliesPublicStatus(Collection<Long> replyIds, Question question) throws QuestionReplyException
- Specified by:
updateRepliesPublicStatus
in interfaceQuestionManager
- Throws:
QuestionReplyException
-
updateRepliesPrivateStatus
public void updateRepliesPrivateStatus(Collection<Long> replyIds, Question question) throws QuestionReplyException
- Specified by:
updateRepliesPrivateStatus
in interfaceQuestionManager
- Throws:
QuestionReplyException
-
updateQuestion
public void updateQuestion(Question question) throws QuestionReplyException
- Specified by:
updateQuestion
in interfaceQuestionManager
- Throws:
QuestionReplyException
-
updateReply
public void updateReply(Reply reply) throws QuestionReplyException
- Specified by:
updateReply
in interfaceQuestionManager
- Throws:
QuestionReplyException
-
deleteQuestionAndReplies
public void deleteQuestionAndReplies(Collection<Long> questionIds) throws QuestionReplyException
- Specified by:
deleteQuestionAndReplies
in interfaceQuestionManager
- Throws:
QuestionReplyException
-
getAllReplies
public List<Reply> getAllReplies(long questionId, String instanceId) throws QuestionReplyException
- Specified by:
getAllReplies
in interfaceQuestionManager
- Throws:
QuestionReplyException
-
getQuestion
public Question getQuestion(long questionId) throws QuestionReplyException
- Specified by:
getQuestion
in interfaceQuestionManager
- Throws:
QuestionReplyException
-
getQuestionAndReplies
public Question getQuestionAndReplies(long questionId) throws QuestionReplyException
- Specified by:
getQuestionAndReplies
in interfaceQuestionManager
- Throws:
QuestionReplyException
-
getQuestionsByIds
public List<Question> getQuestionsByIds(List<String> ids) throws QuestionReplyException
- Specified by:
getQuestionsByIds
in interfaceQuestionManager
- Throws:
QuestionReplyException
-
getQuestionReplies
public List<Reply> getQuestionReplies(long questionId, String instanceId) throws QuestionReplyException
- Specified by:
getQuestionReplies
in interfaceQuestionManager
- Throws:
QuestionReplyException
-
getQuestionPublicReplies
public List<Reply> getQuestionPublicReplies(long questionId, String instanceId) throws QuestionReplyException
- Specified by:
getQuestionPublicReplies
in interfaceQuestionManager
- Throws:
QuestionReplyException
-
getQuestionPrivateReplies
public List<Reply> getQuestionPrivateReplies(long questionId, String instanceId) throws QuestionReplyException
- Specified by:
getQuestionPrivateReplies
in interfaceQuestionManager
- Throws:
QuestionReplyException
-
getQuestionRecipients
public List<Recipient> getQuestionRecipients(long questionId) throws QuestionReplyException
- Specified by:
getQuestionRecipients
in interfaceQuestionManager
- Throws:
QuestionReplyException
-
getReply
public Reply getReply(long replyId) throws QuestionReplyException
- Specified by:
getReply
in interfaceQuestionManager
- Throws:
QuestionReplyException
-
getSendQuestions
public List<Question> getSendQuestions(String userId, String instanceId) throws QuestionReplyException
- Specified by:
getSendQuestions
in interfaceQuestionManager
- Throws:
QuestionReplyException
-
getReceiveQuestions
public List<Question> getReceiveQuestions(String userId, String instanceId) throws QuestionReplyException
- Specified by:
getReceiveQuestions
in interfaceQuestionManager
- Throws:
QuestionReplyException
-
getQuestions
public List<Question> getQuestions(String instanceId) throws QuestionReplyException
- Specified by:
getQuestions
in interfaceQuestionManager
- Throws:
QuestionReplyException
-
getAllQuestions
public List<Question> getAllQuestions(String instanceId) throws QuestionReplyException
- Specified by:
getAllQuestions
in interfaceQuestionManager
- Throws:
QuestionReplyException
-
getAllQuestionsByCategory
public List<Question> getAllQuestionsByCategory(String instanceId, String categoryId) throws QuestionReplyException
- Specified by:
getAllQuestionsByCategory
in interfaceQuestionManager
- Throws:
QuestionReplyException
-
getPublicQuestions
public List<Question> getPublicQuestions(String instanceId) throws QuestionReplyException
- Specified by:
getPublicQuestions
in interfaceQuestionManager
- Throws:
QuestionReplyException
-
createQuestionReply
public long createQuestionReply(Question question, Reply reply) throws QuestionReplyException
Save and persist question and reply given in parameter- Specified by:
createQuestionReply
in interfaceQuestionManager
- Parameters:
question
- the new questionreply
- the answer linked to the given question- Returns:
- the created question identifier
- Throws:
QuestionReplyException
-
updateWysiwygContent
protected void updateWysiwygContent(Reply reply)
-
isSortable
protected boolean isSortable(String instanceId)
-
-