01: package dalma.webui;
02:
03: import dalma.Conversation;
04:
05: import java.util.Date;
06: import java.util.List;
07: import java.util.logging.LogRecord;
08:
09: /**
10: * @author Kohsuke Kawaguchi
11: */
12: public class WConversation extends UIObject {
13: private final Conversation core;
14: private final WWorkflow parent;
15:
16: public static WConversation wrap(WWorkflow parent, Conversation conv) {
17: if (conv == null)
18: return null;
19: return new WConversation(parent, conv);
20: }
21:
22: private WConversation(WWorkflow parent, Conversation core) {
23: this .parent = parent;
24: this .core = core;
25: }
26:
27: public WWorkflow getParent() {
28: return parent;
29: }
30:
31: public int getId() {
32: return core.getId();
33: }
34:
35: public String getDisplayName() {
36: return "#" + core.getId();
37: }
38:
39: public String getTitle() {
40: return core.getTitle();
41: }
42:
43: public String getUrl() {
44: return parent.getUrl() + "conversation/" + core.getId() + '/';
45: }
46:
47: public Date getStartDate() {
48: return core.getStartDate();
49: }
50:
51: public List<LogRecord> getLogs() {
52: return core.getLog();
53: }
54: }
|