1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.kpme.tklm.time.calendar;
17
18 import java.util.ArrayList;
19 import java.util.List;
20
21 import org.kuali.kpme.core.calendar.web.CalendarDay;
22 import org.kuali.kpme.tklm.api.time.calendar.TkCalendarDayContract;
23 import org.kuali.kpme.tklm.leave.block.LeaveBlock;
24 import org.kuali.kpme.tklm.leave.block.LeaveBlockRenderer;
25 import org.kuali.kpme.tklm.time.timeblock.TimeBlock;
26 import org.kuali.kpme.tklm.time.timeblock.web.TimeBlockRenderer;
27
28 public class TkCalendarDay extends CalendarDay implements TkCalendarDayContract {
29 private List<TimeBlock> timeblocks = new ArrayList<TimeBlock>();
30 private List<TimeBlockRenderer> blockRenderers = new ArrayList<TimeBlockRenderer>();
31 private String dayNumberString;
32 private Boolean gray;
33 private List<LeaveBlock> leaveBlocks = new ArrayList<LeaveBlock>();
34 private List<LeaveBlockRenderer> leaveBlockRenderers = new ArrayList<LeaveBlockRenderer>();
35
36 public List<TimeBlock> getTimeblocks() {
37 return timeblocks;
38 }
39
40 public void setTimeblocks(List<TimeBlock> timeblocks) {
41 this.timeblocks = timeblocks;
42 for (TimeBlock tb : timeblocks) {
43 blockRenderers.add(new TimeBlockRenderer(tb));
44 }
45 }
46
47 public List<TimeBlockRenderer> getBlockRenderers() {
48 return blockRenderers;
49 }
50
51 public String getDayNumberString() {
52 return dayNumberString;
53 }
54
55 public void setDayNumberString(String dayNumberString) {
56 this.dayNumberString = dayNumberString;
57 }
58
59 public Boolean getGray() {
60 return gray;
61 }
62
63 public void setGray(Boolean gray) {
64 this.gray = gray;
65 }
66
67 public List<LeaveBlock> getLeaveBlocks() {
68 return leaveBlocks;
69 }
70
71 public void setLeaveBlocks(List<LeaveBlock> leaveBlocks) {
72 this.leaveBlocks = leaveBlocks;
73 for (LeaveBlock lb : leaveBlocks) {
74 leaveBlockRenderers.add(new LeaveBlockRenderer(lb));
75 }
76 }
77
78 public List<LeaveBlockRenderer> getLeaveBlockRenderers() {
79 return leaveBlockRenderers;
80 }
81
82 public void setLeaveBlockRenderers(List<LeaveBlockRenderer> leaveBlockRenderers) {
83 this.leaveBlockRenderers = leaveBlockRenderers;
84 }
85
86 }