01: package org.emforge.jbpm;
02:
03: import org.emforge.xfer.CommentTO;
04: import org.emforge.comment.CommentTransformer;
05: import org.jbpm.graph.exe.Comment;
06:
07: import com.ecyrd.jspwiki.WikiEngine;
08:
09: /** Implementation for converting jBPM comments to CommentTO
10: *
11: */
12: public class JbpmCommentTransformer extends CommentTransformer {
13: public JbpmCommentTransformer(WikiEngine i_wikiEngine,
14: String i_wikiName) {
15: super (i_wikiEngine, i_wikiName);
16: }
17:
18: @Override
19: public CommentTO transform(Object i_input) {
20: Comment comment = (Comment) i_input;
21: CommentTO commentTO = new CommentTO();
22:
23: commentTO.setAuthor(comment.getActorId());
24: commentTO.setParentName(m_parentName);
25: commentTO.setTime(comment.getTime());
26: commentTO.setMessage(comment.getMessage());
27: commentTO
28: .setHtmlMessage(getCommentAsHtml(comment.getMessage()));
29:
30: return commentTO;
31: }
32:
33: }
|