inputs.put("Attachment", factory.newAttachment().getClass()); inputs.put("BooleanExpression", factory.newBooleanExpression().getClass()); inputs.put("Comment", factory.newComment().getClass()); inputs.put("Content", factory.newContent().getClass()); inputs.put("Deadline", factory.newDeadline().getClass());
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); } }
TaskSummary taskSum = tasks.get(0); Comment comment = TaskModelProvider.getFactory().newComment(); ((InternalComment)comment).setAddedAt(TODAY); User user = TaskModelProvider.getFactory().newUser(); assertEquals(txt, commentById.getText()); Comment comment2 = TaskModelProvider.getFactory().newComment(); ((InternalComment)comment2).setAddedAt(new Date()); User user2 = TaskModelProvider.getFactory().newUser();
Comment comment = TaskModelProvider.getFactory().newComment(); ((InternalComment)comment).setAddedAt(TODAY); User user = TaskModelProvider.getFactory().newUser();
InternalComment comment = (InternalComment) TaskModelProvider.getFactory().newComment(); comment.setId(42); comment.setText(payload);
Comment comment = TaskModelProvider.getFactory().newComment(); ((InternalComment)comment).setAddedAt(new Date()); ((InternalComment)comment).setAddedBy(user);
List<Comment> comments = new ArrayList<Comment>(jaxbComments.size()); for( Comment jaxbComment : jaxbComments ) { InternalComment comment = (InternalComment) TaskModelProvider.getFactory().newComment(); if( jaxbComment.getId() != null ) { comment.setId(jaxbComment.getId());