01: package org.emforge.jbpm.messages;
02:
03: import java.util.HashMap;
04: import java.util.Map;
05:
06: import org.emforge.jbpm.web.bean.TaskController;
07: import org.emforge.xfer.StepTO;
08:
09: import ru.emdev.EmForge.email.velocity.BaseVelocityEmailImpl;
10: import ru.emdev.EmForge.util.Helper;
11:
12: public class TaskStatusRequestEmailImpl extends BaseVelocityEmailImpl
13: implements TaskStatusRequestEmail {
14: private StepTO m_step;
15: private String m_message;
16:
17: public void setTask(StepTO i_step) {
18: m_step = i_step;
19: }
20:
21: public void setMessage(String i_message) {
22: m_message = i_message;
23: }
24:
25: @Override
26: public Map<String, Object> getModel() {
27: Map<String, Object> model = new HashMap<String, Object>();
28:
29: model.put("task", m_step);
30: model.put("message", m_message);
31:
32: String taskLink = Helper.concatUrl(getApplicationPath(),
33: TaskController.TASK_PAGE_NAME);
34: taskLink = Helper.concatUrl(taskLink, m_step.getTaskId()
35: .toString());
36:
37: model.put("taskLink", taskLink);
38: return model;
39: }
40: }
|