public Long execute(Context cntxt) { TaskContext context = (TaskContext) cntxt; Comment cmdComent = comment; if (cmdComent == null) { cmdComent = jaxbComment; } InternalComment commentImpl = (InternalComment) TaskModelProvider.getFactory().newComment(); commentImpl.setAddedAt(cmdComent.getAddedAt()); User cmdAddedBy = cmdComent.getAddedBy(); User addedBy = TaskModelProvider.getFactory().newUser(cmdAddedBy.getId()); commentImpl.setAddedBy(addedBy); commentImpl.setText(cmdComent.getText()); doCallbackOperationForComment(commentImpl, context); return context.getTaskCommentService().addComment(taskId, commentImpl); } }
((InternalComment)comment).setAddedAt(TODAY); User user = TaskModelProvider.getFactory().newUser(); ((InternalOrganizationalEntity) user).setId("Troll"); ((InternalComment)comment2).setAddedAt(new Date()); User user2 = TaskModelProvider.getFactory().newUser(); ((InternalOrganizationalEntity) user2).setId("Master");
for(int i = 0; i < commentsCount; i++) { Comment comment = TaskModelProvider.getFactory().newComment(); ((InternalComment)comment).setAddedAt(TODAY); User user = TaskModelProvider.getFactory().newUser(); ((InternalOrganizationalEntity) user).setId("Troll");
comment.setId(42); comment.setText(payload); comment.setAddedAt(new Date()); User user = TaskModelProvider.getFactory().newUser(); ((InternalOrganizationalEntity) user).setId("Case");
((InternalComment)comment).setAddedAt(new Date()); ((InternalComment)comment).setAddedBy(user); ((InternalComment)comment).setText("Simple test comment");
comment.setId(jaxbComment.getId()); comment.setAddedAt(jaxbComment.getAddedAt()); comment.setAddedBy(createUser(((JaxbComment) jaxbComment).getAddedById())); comment.setText(jaxbComment.getText());