View Javadoc

1   /**
2    * Copyright 2004-2013 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
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  }