/*
  * enregistre la nouvelle réponse de la question courante met en session la question modifiée
  */
 public void saveNewReply() throws QuestionReplyException {
   WAPrimaryKey pk = newReply.getPK();
   pk.setComponentName(getComponentId());
   newReply.setPK(pk);
   getQuestionManager().createReply(newReply, getCurrentQuestion());
   getQuestion(((IdPK) getCurrentQuestion().getPK()).getIdAsLong());
   notifyReply(newReply);
 }
 public void updateCurrentReply(String title, String content) throws QuestionReplyException {
   Reply reply = getCurrentReply();
   reply.setTitle(title);
   reply.setContent(content);
   WAPrimaryKey pk = reply.getPK();
   pk.setComponentName(getComponentId());
   reply.setPK(pk);
   getQuestionManager().updateReply(reply);
   getQuestion(((IdPK) getCurrentQuestion().getPK()).getIdAsLong());
 }
 /*
  * Enregistre une FAQ
  */
 public long saveNewFAQ() throws QuestionReplyException {
   newQuestion.setStatus(2); // close
   newQuestion.setReplyNumber(1);
   newQuestion.setPublicReplyNumber(1);
   newQuestion.setPrivateReplyNumber(0);
   newReply.setPublicReply(1);
   newReply.setPrivateReply(0);
   WAPrimaryKey pk = newReply.getPK();
   pk.setComponentName(getComponentId());
   newReply.setPK(pk);
   return getQuestionManager().createQuestionReply(newQuestion, newReply);
 }
 /*
  * Modifie la réponse courante => supprime la réponse publique => deletePublicReplies() => crée
  * une nouvelle réponse publique et privée met à jour en session la question courante
  */
 public void updateCurrentReplyOLD(String title, String content) throws QuestionReplyException {
   getNewReply();
   setNewReplyContent(title, content, getCurrentReply().getPublicReply(), 1);
   WAPrimaryKey pk = newReply.getPK();
   pk.setComponentName(getComponentId());
   newReply.setPK(pk);
   long replyId = getQuestionManager().createReply(newReply, getCurrentQuestion());
   List<Long> replyIds = new ArrayList<Long>();
   replyIds.add(Long.valueOf(((IdPK) getCurrentReply().getPK()).getIdAsLong()));
   deletePublicReplies(replyIds);
   getReply(replyId);
   getQuestion(((IdPK) getCurrentQuestion().getPK()).getIdAsLong());
   notifyReply(newReply);
 }
 public void setCurrentReply(Reply reply) {
   WAPrimaryKey pk = reply.getPK();
   pk.setComponentName(getComponentId());
   reply.setPK(pk);
   this.currentReply = reply;
 }