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:
createQuestionin interfaceQuestionManager- Parameters:
question- the question to create- Returns:
- the generated question identifier
- Throws:
QuestionReplyException- if an error occurs
-
createReply
public long createReply(Reply reply, Question question) throws QuestionReplyException
- Specified by:
createReplyin interfaceQuestionManager- Throws:
QuestionReplyException
-
closeQuestions
public void closeQuestions(Collection<Long> questionIds) throws QuestionReplyException
- Specified by:
closeQuestionsin interfaceQuestionManager- Throws:
QuestionReplyException
-
openQuestions
public void openQuestions(Collection<Long> questionIds) throws QuestionReplyException
- Specified by:
openQuestionsin interfaceQuestionManager- Throws:
QuestionReplyException
-
updateQuestionRecipients
public void updateQuestionRecipients(Question question) throws QuestionReplyException
- 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
public void updateQuestion(Question question) throws QuestionReplyException
- Specified by:
updateQuestionin interfaceQuestionManager- Throws:
QuestionReplyException
-
updateReply
public void updateReply(Reply reply) throws QuestionReplyException
- Specified by:
updateReplyin interfaceQuestionManager- Throws:
QuestionReplyException
-
deleteQuestionAndReplies
public void deleteQuestionAndReplies(Collection<Long> questionIds) throws QuestionReplyException
- Specified by:
deleteQuestionAndRepliesin interfaceQuestionManager- Throws:
QuestionReplyException
-
getAllReplies
public List<Reply> getAllReplies(long questionId, String instanceId) throws QuestionReplyException
- Specified by:
getAllRepliesin interfaceQuestionManager- Throws:
QuestionReplyException
-
getQuestion
public Question getQuestion(long questionId) throws QuestionReplyException
- Specified by:
getQuestionin interfaceQuestionManager- Throws:
QuestionReplyException
-
getQuestionAndReplies
public Question getQuestionAndReplies(long questionId) throws QuestionReplyException
- Specified by:
getQuestionAndRepliesin interfaceQuestionManager- Throws:
QuestionReplyException
-
getQuestionsByIds
public List<Question> getQuestionsByIds(List<String> ids) throws QuestionReplyException
- 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
public List<Recipient> getQuestionRecipients(long questionId) throws QuestionReplyException
- Specified by:
getQuestionRecipientsin interfaceQuestionManager- Throws:
QuestionReplyException
-
getReply
public Reply getReply(long replyId) throws QuestionReplyException
- 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
public List<Question> getQuestions(String instanceId) throws QuestionReplyException
- Specified by:
getQuestionsin interfaceQuestionManager- Throws:
QuestionReplyException
-
getAllQuestions
public List<Question> getAllQuestions(String instanceId) throws QuestionReplyException
- Specified by:
getAllQuestionsin interfaceQuestionManager- Throws:
QuestionReplyException
-
getAllQuestionsByCategory
public List<Question> getAllQuestionsByCategory(String instanceId, String categoryId) throws QuestionReplyException
- Specified by:
getAllQuestionsByCategoryin interfaceQuestionManager- Throws:
QuestionReplyException
-
getPublicQuestions
public List<Question> getPublicQuestions(String instanceId) throws QuestionReplyException
- Specified by:
getPublicQuestionsin interfaceQuestionManager- Throws:
QuestionReplyException
-
createQuestionReply
public long createQuestionReply(Question question, Reply reply) throws QuestionReplyException
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
-
updateWysiwygContent
protected void updateWysiwygContent(Reply reply)
-
isSortable
protected boolean isSortable(String instanceId)
-
-