Package org.jbpm.api.history

Examples of org.jbpm.api.history.HistoryComment


  protected void forceInitializationAndClean(List<HistoryComment> comments) {
    if (comments!=null) {
      comments.size();
      List<HistoryComment> copy = new ArrayList<HistoryComment>(comments);
      for (int i=0; i<copy.size(); i++) {
        HistoryComment comment = copy.get(i);
       
        // when comments get deleted, it's possible that we
        // get null values in the list as the indexes of the
        // other comments are not upated.
        // So if there is a null value, we can safely delete it
        // from the persistent list and cause the indexes to
        // be updated
        if (comment==null) {
          comments.remove(i);
        } else {
          forceInitializationAndClean(comment.getReplies());
        }
      }
    }
  }
View Full Code Here


    DbSession dbSession = environment.get(DbSession.class);
    HistoryCommentImpl parentComment = dbSession.get(HistoryCommentImpl.class, Long.parseLong(commentId));
    if (parentComment==null) {
      throw new JbpmException("parent comment doesn't exist: "+commentId);
    }
    HistoryComment replyComment = parentComment.createReply(message);
    return replyComment;
  }
View Full Code Here

  protected void forceInitializationAndClean(List<HistoryComment> comments) {
    if (comments!=null) {
      comments.size();
      List<HistoryComment> copy = new ArrayList<HistoryComment>(comments);
      for (int i=0; i<copy.size(); i++) {
        HistoryComment comment = copy.get(i);
       
        // when comments get deleted, it's possible that we
        // get null values in the list as the indexes of the
        // other comments are not upated.
        // So if there is a null value, we can safely delete it
        // from the persistent list and cause the indexes to
        // be updated
        if (comment==null) {
          comments.remove(i);
        } else {
          forceInitializationAndClean(comment.getReplies());
        }
      }
    }
  }
View Full Code Here

    DbSession dbSession = environment.get(DbSession.class);
    HistoryCommentImpl parentComment = dbSession.get(HistoryCommentImpl.class, Long.parseLong(commentId));
    if (parentComment==null) {
      throw new JbpmException("parent comment doesn't exist: "+commentId);
    }
    HistoryComment replyComment = parentComment.createReply(message);
    return replyComment;
  }
View Full Code Here

TOP

Related Classes of org.jbpm.api.history.HistoryComment

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.