com.silverpeas.questionReply.control
Class SilverpeasQuestionManager

java.lang.Object
  extended by com.silverpeas.questionReply.control.SilverpeasQuestionManager
All Implemented Interfaces:
QuestionManager

@Named(value="questionManager")
public class SilverpeasQuestionManager
extends Object
implements QuestionManager


Method Summary
 void closeQuestions(Collection<Long> questionIds)
           
 long createQuestion(Question question)
           
 long createQuestionReply(Question question, Reply reply)
          Create and persist a question reply
 long createReply(Reply reply, Question question)
           
 void deleteQuestionAndReplies(Collection<Long> questionIds)
           
 List<Question> getAllQuestions(String instanceId)
           
 List<Question> getAllQuestionsByCategory(String instanceId, String categoryId)
           
 List<Reply> getAllReplies(long questionId, String instanceId)
           
 List<Question> getPublicQuestions(String instanceId)
           
 Question getQuestion(long questionId)
           
 Question getQuestionAndReplies(long questionId)
           
 List<Reply> getQuestionPrivateReplies(long questionId, String instanceId)
           
 List<Reply> getQuestionPublicReplies(long questionId, String instanceId)
           
 List<Recipient> getQuestionRecipients(long questionId)
           
 List<Reply> getQuestionReplies(long questionId, String instanceId)
           
 List<Question> getQuestions(String instanceId)
           
 List<Question> getQuestionsByIds(List<String> ids)
           
 List<Question> getReceiveQuestions(String userId, String instanceId)
           
 Reply getReply(long replyId)
           
 List<Question> getSendQuestions(String userId, String instanceId)
           
protected  boolean isSortable(String instanceId)
           
 void openQuestions(Collection<Long> questionIds)
           
 void updateQuestion(Question question)
           
 void updateQuestionRecipients(Question question)
           
 void updateQuestionRepliesPrivateStatus(Collection<Long> questionIds)
           
 void updateQuestionRepliesPublicStatus(Collection<Long> questionIds)
           
 void updateRepliesPrivateStatus(Collection<Long> replyIds, Question question)
           
 void updateRepliesPublicStatus(Collection<Long> replyIds, Question question)
           
 void updateReply(Reply reply)
           
protected  void updateWysiwygContent(Reply reply)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createQuestion

public long createQuestion(Question question)
                    throws QuestionReplyException
Specified by:
createQuestion in interface QuestionManager
Throws:
QuestionReplyException

createReply

public long createReply(Reply reply,
                        Question question)
                 throws QuestionReplyException
Specified by:
createReply in interface QuestionManager
Throws:
QuestionReplyException

closeQuestions

public void closeQuestions(Collection<Long> questionIds)
                    throws QuestionReplyException
Specified by:
closeQuestions in interface QuestionManager
Throws:
QuestionReplyException

openQuestions

public void openQuestions(Collection<Long> questionIds)
                   throws QuestionReplyException
Specified by:
openQuestions in interface QuestionManager
Throws:
QuestionReplyException

updateQuestionRecipients

public void updateQuestionRecipients(Question question)
                              throws QuestionReplyException
Specified by:
updateQuestionRecipients in interface QuestionManager
Throws:
QuestionReplyException

updateQuestionRepliesPublicStatus

public void updateQuestionRepliesPublicStatus(Collection<Long> questionIds)
                                       throws QuestionReplyException
Specified by:
updateQuestionRepliesPublicStatus in interface QuestionManager
Throws:
QuestionReplyException

updateQuestionRepliesPrivateStatus

public void updateQuestionRepliesPrivateStatus(Collection<Long> questionIds)
                                        throws QuestionReplyException
Specified by:
updateQuestionRepliesPrivateStatus in interface QuestionManager
Throws:
QuestionReplyException

updateRepliesPublicStatus

public void updateRepliesPublicStatus(Collection<Long> replyIds,
                                      Question question)
                               throws QuestionReplyException
Specified by:
updateRepliesPublicStatus in interface QuestionManager
Throws:
QuestionReplyException

updateRepliesPrivateStatus

public void updateRepliesPrivateStatus(Collection<Long> replyIds,
                                       Question question)
                                throws QuestionReplyException
Specified by:
updateRepliesPrivateStatus in interface QuestionManager
Throws:
QuestionReplyException

updateQuestion

public void updateQuestion(Question question)
                    throws QuestionReplyException
Specified by:
updateQuestion in interface QuestionManager
Throws:
QuestionReplyException

updateReply

public void updateReply(Reply reply)
                 throws QuestionReplyException
Specified by:
updateReply in interface QuestionManager
Throws:
QuestionReplyException

deleteQuestionAndReplies

public void deleteQuestionAndReplies(Collection<Long> questionIds)
                              throws QuestionReplyException
Specified by:
deleteQuestionAndReplies in interface QuestionManager
Throws:
QuestionReplyException

getAllReplies

public List<Reply> getAllReplies(long questionId,
                                 String instanceId)
                          throws QuestionReplyException
Specified by:
getAllReplies in interface QuestionManager
Throws:
QuestionReplyException

getQuestion

public Question getQuestion(long questionId)
                     throws QuestionReplyException
Specified by:
getQuestion in interface QuestionManager
Throws:
QuestionReplyException

getQuestionAndReplies

public Question getQuestionAndReplies(long questionId)
                               throws QuestionReplyException
Specified by:
getQuestionAndReplies in interface QuestionManager
Throws:
QuestionReplyException

getQuestionsByIds

public List<Question> getQuestionsByIds(List<String> ids)
                                 throws QuestionReplyException
Specified by:
getQuestionsByIds in interface QuestionManager
Throws:
QuestionReplyException

getQuestionReplies

public List<Reply> getQuestionReplies(long questionId,
                                      String instanceId)
                               throws QuestionReplyException
Specified by:
getQuestionReplies in interface QuestionManager
Throws:
QuestionReplyException

getQuestionPublicReplies

public List<Reply> getQuestionPublicReplies(long questionId,
                                            String instanceId)
                                     throws QuestionReplyException
Specified by:
getQuestionPublicReplies in interface QuestionManager
Throws:
QuestionReplyException

getQuestionPrivateReplies

public List<Reply> getQuestionPrivateReplies(long questionId,
                                             String instanceId)
                                      throws QuestionReplyException
Specified by:
getQuestionPrivateReplies in interface QuestionManager
Throws:
QuestionReplyException

getQuestionRecipients

public List<Recipient> getQuestionRecipients(long questionId)
                                      throws QuestionReplyException
Specified by:
getQuestionRecipients in interface QuestionManager
Throws:
QuestionReplyException

getReply

public Reply getReply(long replyId)
               throws QuestionReplyException
Specified by:
getReply in interface QuestionManager
Throws:
QuestionReplyException

getSendQuestions

public List<Question> getSendQuestions(String userId,
                                       String instanceId)
                                throws QuestionReplyException
Specified by:
getSendQuestions in interface QuestionManager
Throws:
QuestionReplyException

getReceiveQuestions

public List<Question> getReceiveQuestions(String userId,
                                          String instanceId)
                                   throws QuestionReplyException
Specified by:
getReceiveQuestions in interface QuestionManager
Throws:
QuestionReplyException

getQuestions

public List<Question> getQuestions(String instanceId)
                            throws QuestionReplyException
Specified by:
getQuestions in interface QuestionManager
Throws:
QuestionReplyException

getAllQuestions

public List<Question> getAllQuestions(String instanceId)
                               throws QuestionReplyException
Specified by:
getAllQuestions in interface QuestionManager
Throws:
QuestionReplyException

getAllQuestionsByCategory

public List<Question> getAllQuestionsByCategory(String instanceId,
                                                String categoryId)
                                         throws QuestionReplyException
Specified by:
getAllQuestionsByCategory in interface QuestionManager
Throws:
QuestionReplyException

getPublicQuestions

public List<Question> getPublicQuestions(String instanceId)
                                  throws QuestionReplyException
Specified by:
getPublicQuestions in interface QuestionManager
Throws:
QuestionReplyException

createQuestionReply

public long createQuestionReply(Question question,
                                Reply reply)
                         throws QuestionReplyException
Description copied from interface: QuestionManager
Create and persist a question reply

Specified by:
createQuestionReply in interface QuestionManager
Parameters:
question - the new question
reply - the answer linked to the given question
Returns:
long identifier of the created question
Throws:
QuestionReplyException

updateWysiwygContent

protected void updateWysiwygContent(Reply reply)
                             throws org.silverpeas.wysiwyg.WysiwygException
Throws:
org.silverpeas.wysiwyg.WysiwygException

isSortable

protected boolean isSortable(String instanceId)


Copyright © 2016 Silverpeas. All Rights Reserved.