Package com.agiletec.plugins.jpcontentfeedback.aps.system.services.contentfeedback.comment.model

Examples of com.agiletec.plugins.jpcontentfeedback.aps.system.services.contentfeedback.comment.model.IComment


public class ContentCommentViewerTag extends TagSupport{
   @Override
    public int doStartTag() throws JspException {
      try {
        ICommentManager commentManager = (ICommentManager) ApsWebApplicationUtils.getBean(JpcontentfeedbackSystemConstants.COMMENTS_MANAGER, this.pageContext);
        IComment comment = commentManager.getComment(this.getCommentId());
        this.pageContext.setAttribute(this.getCommentName(), comment);
      } catch (Throwable e) {
        ApsSystemUtils.logThrowable(e, this, "doStartTag");
        throw new JspException("Errore inizializzazione tag", e);
      }
View Full Code Here


    return comments;
  }

  @Override
  public IComment getComment(int id){
    IComment comment = null;
    try {
      comment = this.getCommentManager().getComment(id);
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "getComment");
    }
View Full Code Here

  }

  @Override
  public String view() {
    try {
      IComment comment = this.getComment(this.getSelectedComment());
      this.setComment(comment);
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "view");
      return FAILURE;
    }
View Full Code Here

  }


  public String trash() {
    try {
      IComment comment = this.getComment(this.getSelectedComment());
      if (null == comment) {
        return INPUT;
      }
      this.setComment(comment);
      this.setStrutsAction(ApsAdminSystemConstants.DELETE);
View Full Code Here

        ApsSystemUtils.getLogger().info("Comment Rating not allowed");
        return BaseAction.USER_NOT_ALLOWED;
      }

      String contentId = this.getCurrentContentId();
      IComment comment = this.getCommentManager().getComment(this.getSelectedComment());
      if (null == comment || !comment.getContentId().equalsIgnoreCase(contentId)) {
        this.addActionError(this.getText("Message.invalidComment"));
        return INPUT;
      }

      if (this.isAuth(contentId)) {
View Full Code Here

    return true;
  }

  @Override
  public IComment getComment(Integer commentId) {
    IComment comment = null;
    try {
      comment = this.getCommentManager().getComment(commentId.intValue());
    } catch (ApsSystemException e) {
      ApsSystemUtils.logThrowable(e, this, "getComment");
      throw new RuntimeException("Error", e);
View Full Code Here

      assertEquals(0,listaIds.size());
      comment = createNewComment();
      comment.setContentId(content.getId());
      this._commentManager.addComment(comment);
      assertNotNull(comment.getId());
      IComment commentRead = this._commentManager.getComment(comment.getId());
      assertEquals(comment.getComment(), commentRead.getComment());
      assertEquals(comment.getStatus(), commentRead.getStatus());
      assertEquals(comment.getUsername(), commentRead.getUsername());
      assertEquals(comment.getId(), commentRead.getId());
      assertEquals(Comment.STATUS_TO_APPROVE, commentRead.getStatus());

      CommentSearchBean searchBean = new CommentSearchBean();
      searchBean.setComment("Testo ");
      listaIds = this._commentManager.searchCommentIds(searchBean);
      assertEquals(1, listaIds.size());
View Full Code Here

      assertEquals(0,listaIds.size());
      comment = createNewComment();
      comment.setContentId(content.getId());
      this._commentManager.addComment(comment);
      assertNotNull(comment.getId());
      IComment commentRead = this._commentManager.getComment(comment.getId());
      assertEquals(comment.getComment(), commentRead.getComment());
      assertEquals(comment.getStatus(), commentRead.getStatus());
      assertEquals(comment.getUsername(), commentRead.getUsername());
      assertEquals(comment.getId(), commentRead.getId());

      this._commentManager.updateCommentStatus(comment.getId(), Comment.STATUS_NOT_APPROVED);
      commentRead = this._commentManager.getComment(comment.getId());
      assertEquals(Comment.STATUS_NOT_APPROVED, commentRead.getStatus());

      this._commentManager.deleteComment(comment.getId());
      assertNull(this._commentManager.getComment(comment.getId()));

    } catch (Throwable t) {
View Full Code Here

    }
  }
 
  @Override
  public IComment getComment(int id) throws ApsSystemException {
    IComment comment = null;
    try {
      comment = this.getCommentDAO().getComment(id);
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "getComment");
      throw new ApsSystemException("Error while extract comment", t);
View Full Code Here

TOP

Related Classes of com.agiletec.plugins.jpcontentfeedback.aps.system.services.contentfeedback.comment.model.IComment

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.