1 /**
2 * Copyright 2004-2014 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.api.time.util;
17
18 import java.util.List;
19
20 import org.joda.time.DateTimeZone;
21 import org.kuali.kpme.core.api.calendar.CalendarContract;
22 import org.kuali.kpme.core.api.calendar.entry.CalendarEntryContract;
23 import org.kuali.kpme.tklm.api.leave.block.LeaveBlockContract;
24 import org.kuali.kpme.tklm.api.time.flsa.FlsaWeekContract;
25 import org.kuali.kpme.tklm.api.time.timeblock.TimeBlockContract;
26
27 /**
28 * <p>TkTimeBlockAggregateContract interface</p>
29 *
30 */
31 public interface TkTimeBlockAggregateContract {
32
33 /**
34 * The list of TimeBlock objects associated with the TkTimeBlockAggregate
35 *
36 * <p>
37 * the list of flattened time blocks of a TkTimeBlockAggregate
38 * </p>
39 *
40 * @return the list of flattened time blocks for TkTimeBlockAggregate
41 */
42 public List<? extends TimeBlockContract> getFlattenedTimeBlockList();
43
44 /**
45 * The list of LeaveBlock objects associated with the TkTimeBlockAggregate
46 *
47 * <p>
48 * the list of flattened leave blocks of a TkTimeBlockAggregate
49 * </p>
50 *
51 * @return the list of flattened leave blocks for TkTimeBlockAggregate
52 */
53 public List<? extends LeaveBlockContract> getFlattenedLeaveBlockList();
54
55 /**
56 * Provides a way to access all of the time blocks for a given week
57 *
58 * <p>
59 * Outer list is 0 indexed list representing days in a week.
60 * Inner List are all of the time blocks for that day.
61 *
62 * Ex.
63 *
64 * List<List<TimeBlock>> week0 = getWeekTimeBlocks(0);
65 * List<TimeBlock> day0 = week0.get(0);
66 * </p>
67 *
68 * @param week to retrieve time blocks for
69 * @return the list of time blocks for a given week
70 */
71 public List<? extends List<? extends TimeBlockContract>> getWeekTimeBlocks(int week);
72
73 /**
74 * Provides a way to access all of the leave blocks for a given week
75 *
76 * <p>
77 * Outer list is 0 indexed list representing days in a week.
78 * Inner List are all of the leave blocks for that day.
79 *
80 * Ex.
81 *
82 * List<List<LeaveBlock>> week0 = getWeekLeaveBlocks(0);
83 * List<LeaveBlock> day0 = week0.get(0);
84 * </p>
85 *
86 * @param week to retrieve leave blocks for
87 * @return the list of leave blocks for a given week
88 */
89 public List<? extends List<? extends LeaveBlockContract>> getWeekLeaveBlocks(int week);
90
91 /**
92 * TODO: Put a better comment
93 * The list of flsa weeks associated with the TkTimeBlockAggregate
94 *
95 * <p>
96 * the list of flsa weeks of a TkTimeBlockAggregate
97 * <p>
98 *
99 * @param The TimeZone to use when constructing this relative sorting
100 * @return the list of flsa weeks for TkTimeBlockAggregate
101 */
102 public List<? extends FlsaWeekContract> getFlsaWeeks(DateTimeZone zone, int flsaDay, boolean isflsaDayPassed);
103
104 /**
105 * TODO: Put a better comment
106 * The list of flsa weeks associated with the TkTimeBlockAggregate
107 *
108 * <p>
109 * the list of flsa weeks of a TkTimeBlockAggregate
110 * <p>
111 *
112 * @param zone
113 * @param principalId
114 * @return the list of flsa weeks for TkTimeBlockAggregate
115 */
116 public List<? extends List<? extends FlsaWeekContract>> getFlsaWeeks(DateTimeZone zone, String principalId);
117
118 /**
119 * The number of aggregated weeks associated with the TkTimeBlockAggregate
120 *
121 * <p>
122 * </p>
123 *
124 * @return the number of weeks that this object represents.
125 */
126 public int numberOfAggregatedWeeks();
127
128 /**
129 * The list of day TimeBlock objects associated with the TkTimeBlockAggregate
130 *
131 * <p>
132 * dayTimeBlockList of a TkTimeBlockAggregate
133 * </p>
134 *
135 * @return dayTimeBlockList for TkTimeBlockAggregate
136 */
137 public List<? extends List<? extends TimeBlockContract>> getDayTimeBlockList();
138
139 /**
140 * The list of day LeaveBlock objects associated with the TkTimeBlockAggregate
141 *
142 * <p>
143 * dayLeaveBlockList of a TkTimeBlockAggregate
144 * </p>
145 *
146 * @return dayLeaveBlockList for TkTimeBlockAggregate
147 */
148 public List<? extends List<? extends LeaveBlockContract>> getDayLeaveBlockList();
149
150 /**
151 * The CalendarEntry object associated with the TkTimeBlockAggregate
152 *
153 * <p>
154 * payCalendarEntry of a TkTimeBlockAggregate
155 * </p>
156 *
157 * @return payCalendarEntry for TkTimeBlockAggregate
158 */
159 public CalendarEntryContract getPayCalendarEntry();
160
161 /**
162 * The Calendar object associated with the TkTimeBlockAggregate
163 *
164 * <p>
165 * payCalendar of a TkTimeBlockAggregate
166 * </p>
167 *
168 * @return payCalendar for TkTimeBlockAggregate
169 */
170 public CalendarContract getPayCalendar();
171
172 }