Methods Summary |
---|
public java.lang.String | addComment()
// System.out.println("Adding a comment: " + commentText);
try {
TaskMasterLocalHome home = TaskMasterUtil.getLocalHome();
TaskMasterLocal master = home.create();
String id = getCurrentTask().getId().toString();
master.comment(id, getComment(), new Date());
setCurrentTask(master.findTaskById(id));
} catch (Exception e) {
e.printStackTrace();
}
return null;
|
public java.lang.String | complete()
try {
TaskMasterLocalHome home = TaskMasterUtil.getLocalHome();
TaskMasterLocal master = home.create();
master.completeTask(getCurrentTask().getId().toString());
} catch (Exception e) {
e.printStackTrace();
}
return null;
|
public java.lang.String | getComment()
return commentText;
|
public Task | getCurrentTask()
return (Task) FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get(CURR_TASK);
|
public java.util.Collection | getTasks()
try {
TaskMasterLocalHome home = TaskMasterUtil.getLocalHome();
TaskMasterLocal master = home.create();
Collection c = master.getTasksForUser(UserBean.user());
return c;
} catch (Exception e) {
e.printStackTrace();
return null;
}
|
public void | setComment(java.lang.String comment)
commentText = comment;
|
public void | setCurrentTask(Task task)
FacesContext.getCurrentInstance().getExternalContext().getSessionMap().put(CURR_TASK, task);
|
public java.lang.String | viewTask()
Task task = (Task) FacesContext.getCurrentInstance().getExternalContext().getRequestMap().get("task");
setCurrentTask(task);
return "taskView";
|