001    /**
002     * Copyright 2004-2013 The Kuali Foundation
003     *
004     * Licensed under the Educational Community License, Version 2.0 (the "License");
005     * you may not use this file except in compliance with the License.
006     * You may obtain a copy of the License at
007     *
008     * http://www.opensource.org/licenses/ecl2.php
009     *
010     * Unless required by applicable law or agreed to in writing, software
011     * distributed under the License is distributed on an "AS IS" BASIS,
012     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013     * See the License for the specific language governing permissions and
014     * limitations under the License.
015     */
016    package org.kuali.hr.time.calendar;
017    
018    import org.kuali.hr.lm.leaveblock.LeaveBlock;
019    import org.kuali.hr.time.timeblock.TimeBlock;
020    
021    import java.util.ArrayList;
022    import java.util.List;
023    
024    public class TkCalendarDay extends CalendarDay{
025            private List<TimeBlock> timeblocks = new ArrayList<TimeBlock>();
026        private List<TimeBlockRenderer> blockRenderers = new ArrayList<TimeBlockRenderer>();
027        private String dayNumberString;
028        private Boolean gray;
029        private List<LeaveBlock> leaveBlocks = new ArrayList<LeaveBlock>();
030        private List<LeaveBlockRenderer> leaveBlockRenderers = new ArrayList<LeaveBlockRenderer>();
031    
032            public List<TimeBlock> getTimeblocks() {
033                    return timeblocks;
034            }
035    
036            public void setTimeblocks(List<TimeBlock> timeblocks) {
037                    this.timeblocks = timeblocks;
038            for (TimeBlock tb : timeblocks) {
039                blockRenderers.add(new TimeBlockRenderer(tb));
040            }
041            }
042    
043        public List<TimeBlockRenderer> getBlockRenderers() {
044            return blockRenderers;
045        }
046    
047        public String getDayNumberString() {
048            return dayNumberString;
049        }
050    
051        public void setDayNumberString(String dayNumberString) {
052            this.dayNumberString = dayNumberString;
053        }
054    
055            public Boolean getGray() {
056                    return gray;
057            }
058    
059            public void setGray(Boolean gray) {
060                    this.gray = gray;
061            }
062    
063            public List<LeaveBlock> getLeaveBlocks() {
064                    return leaveBlocks;
065            }
066    
067            public void setLeaveBlocks(List<LeaveBlock> leaveBlocks) {
068                    this.leaveBlocks = leaveBlocks;
069            for (LeaveBlock lb : leaveBlocks) {
070                leaveBlockRenderers.add(new LeaveBlockRenderer(lb));
071            }
072            }
073    
074            public List<LeaveBlockRenderer> getLeaveBlockRenderers() {
075                    return leaveBlockRenderers;
076            }
077    
078            public void setLeaveBlockRenderers(List<LeaveBlockRenderer> leaveBlockRenderers) {
079                    this.leaveBlockRenderers = leaveBlockRenderers;
080            }
081    
082    }