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.hr.time.service.base;
17  
18  import org.kuali.hr.core.notification.service.KPMENotificationService;
19  import org.kuali.hr.job.service.JobService;
20  import org.kuali.hr.lm.accrual.service.AccrualCategoryMaxCarryOverService;
21  import org.kuali.hr.lm.accrual.service.AccrualCategoryRuleService;
22  import org.kuali.hr.lm.accrual.service.AccrualCategoryService;
23  import org.kuali.hr.lm.accrual.service.AccrualService;
24  import org.kuali.hr.lm.accrual.service.PrincipalAccrualRanService;
25  import org.kuali.hr.lm.balancetransfer.service.BalanceTransferService;
26  import org.kuali.hr.lm.leavepayout.service.LeavePayoutService;
27  import org.kuali.hr.lm.earncodesec.service.EarnCodeSecurityService;
28  import org.kuali.hr.lm.employeeoverride.service.EmployeeOverrideService;
29  import org.kuali.hr.lm.leave.approval.service.LeaveApprovalService;
30  import org.kuali.hr.lm.leaveSummary.service.LeaveSummaryService;
31  import org.kuali.hr.lm.leaveadjustment.service.LeaveAdjustmentService;
32  import org.kuali.hr.lm.leaveblock.service.LeaveBlockHistoryService;
33  import org.kuali.hr.lm.leaveblock.service.LeaveBlockService;
34  import org.kuali.hr.lm.leavecalendar.service.LeaveCalendarService;
35  import org.kuali.hr.lm.leavecode.service.LeaveCodeService;
36  import org.kuali.hr.lm.leavedonation.service.LeaveDonationService;
37  import org.kuali.hr.lm.leaveplan.service.LeavePlanService;
38  import org.kuali.hr.lm.leaverequest.service.LeaveRequestDocumentService;
39  import org.kuali.hr.lm.timeoff.service.SystemScheduledTimeOffService;
40  import org.kuali.hr.lm.workflow.service.LeaveCalendarDocumentHeaderService;
41  import org.kuali.hr.location.service.LocationService;
42  import org.kuali.hr.paygrade.service.PayGradeService;
43  import org.kuali.hr.time.accrual.service.TimeOffAccrualService;
44  import org.kuali.hr.time.approval.service.TimeApproveService;
45  import org.kuali.hr.time.assignment.dao.AssignmentDao;
46  import org.kuali.hr.time.assignment.service.AssignmentService;
47  import org.kuali.hr.time.batch.service.BatchJobService;
48  import org.kuali.hr.time.calendar.service.CalendarEntriesService;
49  import org.kuali.hr.time.calendar.service.CalendarService;
50  import org.kuali.hr.time.clock.location.service.ClockLocationRuleService;
51  import org.kuali.hr.time.clocklog.service.ClockLogService;
52  import org.kuali.hr.time.department.service.DepartmentService;
53  import org.kuali.hr.time.dept.lunch.service.DepartmentLunchRuleService;
54  import org.kuali.hr.time.docsearch.TkSearchableAttributeService;
55  import org.kuali.hr.time.earncode.service.EarnCodeService;
56  import org.kuali.hr.time.earncodegroup.service.EarnCodeGroupService;
57  import org.kuali.hr.time.graceperiod.service.GracePeriodService;
58  import org.kuali.hr.time.missedpunch.service.MissedPunchService;
59  import org.kuali.hr.time.overtime.daily.rule.service.DailyOvertimeRuleService;
60  import org.kuali.hr.time.overtime.weekly.rule.service.WeeklyOvertimeRuleService;
61  import org.kuali.hr.time.paytype.service.PayTypeService;
62  import org.kuali.hr.time.permissions.TkPermissionsService;
63  import org.kuali.hr.time.person.service.PersonService;
64  import org.kuali.hr.time.position.service.PositionService;
65  import org.kuali.hr.time.principal.service.PrincipalHRAttributesService;
66  import org.kuali.hr.time.roles.service.TkRoleGroupService;
67  import org.kuali.hr.time.roles.service.TkRoleService;
68  import org.kuali.hr.time.rule.TkRuleControllerService;
69  import org.kuali.hr.time.salgroup.service.SalGroupService;
70  import org.kuali.hr.time.shiftdiff.rule.service.ShiftDifferentialRuleService;
71  import org.kuali.hr.time.syslunch.service.SystemLunchRuleService;
72  import org.kuali.hr.time.task.service.TaskService;
73  import org.kuali.hr.time.timeblock.service.TimeBlockHistoryDetailService;
74  import org.kuali.hr.time.timeblock.service.TimeBlockHistoryService;
75  import org.kuali.hr.time.timeblock.service.TimeBlockService;
76  import org.kuali.hr.time.timecollection.rule.service.TimeCollectionRuleService;
77  import org.kuali.hr.time.timehourdetail.service.TimeHourDetailService;
78  import org.kuali.hr.time.timesheet.service.TimesheetService;
79  import org.kuali.hr.time.timesummary.service.TimeSummaryService;
80  import org.kuali.hr.time.timezone.service.TimezoneService;
81  import org.kuali.hr.time.user.pref.service.UserPreferenceService;
82  import org.kuali.hr.time.warning.TkWarningService;
83  import org.kuali.hr.time.workarea.service.WorkAreaService;
84  import org.kuali.hr.time.workflow.service.TimesheetDocumentHeaderService;
85  import org.kuali.hr.time.workschedule.service.WorkScheduleAssignmentService;
86  import org.kuali.hr.time.workschedule.service.WorkScheduleService;
87  import org.kuali.rice.core.impl.cache.DistributedCacheManagerDecorator;
88  import org.springframework.beans.BeansException;
89  import org.springframework.context.ApplicationContext;
90  import org.springframework.context.ApplicationContextAware;
91  import org.springframework.jdbc.core.JdbcTemplate;
92  import org.springframework.transaction.PlatformTransactionManager;
93  import org.springframework.transaction.support.TransactionTemplate;
94  import org.springmodules.orm.ojb.PersistenceBrokerTemplate;
95  
96  public class TkServiceLocator implements ApplicationContextAware {
97  	public static String SPRING_BEANS = "classpath:SpringBeans.xml";
98  	public static ApplicationContext CONTEXT;
99  	public static final String TK_PERMISSIONS_SERVICE = "permissionsService";
100 	public static final String TK_CLOCK_LOG_SERVICE = "clockLogService";
101 	public static final String TK_ASSIGNMENT_SERVICE = "assignmentService";
102 	public static final String TK_ASSIGNMENT_DAO     = "assignmentDao";
103 	public static final String TK_TIME_BLOCK_SERVICE = "timeBlockService";
104 	public static final String TK_TIME_BLOCK_HISTORY_SERVICE = "timeBlockHistoryService";
105 	public static final String TK_TIME_BLOCK_HISTORY_DETAIL_SERVICE = "timeBlockHistoryDetailService";
106 	public static final String TK_JOB_SERVICE = "jobService";
107 	public static final String TK_PAY_TYPE_SERVICE = "payTypeService";
108 	public static final String TK_PAY_CALENDAR_SERVICE = "calendarService";
109 	public static final String TK_PAY_CALENDAR_ENTRIES_SERVICE = "calendarEntriesService";
110 	public static final String TK_PERSISTENCE_BROKER_TEMPLATE = "tkPersistenceBrokerTemplate";
111 	public static final String TK_CACHE_MANAGER_SERVICE = "cacheManager";
112 	public static final String TK_WORK_AREA_SERVICE = "workAreaService";
113 	public static final String TK_TIMESHEET_SERVICE = "timesheetService";
114 	public static final String TK_TIMESHEET_DOCUMENT_HEADER_SERVICE = "timesheetDocumentHeaderService";
115 	public static final String TK_DEPARTMENT_SERVICE = "departmentService";
116 	public static final String TK_EARN_CODE_SECURITY = "earnCodeSecurityService";
117 	public static final String TK_EARN_CODE = "earnCodeService";
118 	public static final String TK_TIME_COLLECTION_RULE_SERVICE = "timeCollectionRuleService";
119 	public static final String TK_ROLE_SERVICE = "tkRoleService";
120 	public static final String TK_ROLE_GROUP_SERVICE = "tkRoleGroupService";
121 	public static final String TK_TIME_SUMMARY_SERVICE = "timeSummaryService";
122 	public static final String TK_TIME_EARN_CODE_GROUP_SERVICE = "earnCodeGroupService";
123 	public static final String TK_TIME_HOUR_DETAIL_SERVICE= "timeHourDetailService";
124 	public static final String TK_DAILY_OVERTIME_RULE_SERVICE = "dailyOvertimeRuleService";
125 	public static final String TK_WEEKLY_OVERTIME_RULE_SERVICE = "weeklyOvertimeRuleService";
126 	public static final String TK_SHIFT_DIFFERENTIAL_RULE_SERVICE = "shiftDifferentialRuleService";
127 	public static final String TK_WORK_SCHEDULE_SERVICE = "workScheduleService";
128     public static final String TK_WORK_SCHEDULE_ASSIGNMENT_SERVICE = "workScheduleAssignmentService";
129 	public static final String TK_CLOCK_LOCATION_RULE_SERVICE = "clockLocationService";
130 	public static final String TK_GRACE_PERIOD_SERVICE = "gracePeriodService";
131 	public static final String TK_SYSTEM_LUNCH_RULE_SERVICE = "systemLunchRuleService";
132 	public static final String TK_DEPT_LUNCH_RULE_SERVICE = "deptLunchRuleService";
133 	public static final String TK_PRINCIPAL_CALENDAR_SERVICE = "principalCalendarService";
134 	public static final String TK_USER_PREF_SERVICE = "userPrefService";
135 	public static final String TK_TIME_ZONE_SERVICE = "timezoneService";
136 	public static final String TK_TIME_OFF_ACCRUAL_SERVICE = "timeOffAccrualService";
137 	public static final String hr_sal_group_SERVICE = "salGroupService";
138 	public static final String TK_ACCRUAL_CATEGORY_SERVICE = "accrualCategoryService";
139 	public static final String TK_ACCRUAL_CATEGORY_RULE_SERVICE = "accrualCategoryRuleService";
140     public static final String TK_TASK_SERVICE = "taskService";
141     public static final String TK_LOCATION_SERVICE = "locationService";
142     public static final String TK_PAY_GRADE_SERVICE = "payGradeService";
143     public static final String TK_PERSON_SERVICE = "tkPersonService";
144     public static final String TK_APPROVE_SERVICE = "timeApproveService";
145     public static final String TK_BATCH_JOB_SERVICE = "batchJobService";
146     public static final String TK_MISSED_PUNCH_SERVICE = "missedPunchService";
147     public static final String TK_BATCH_JOB_ENTRY_SERVICE = "batchJobEntryService";
148     public static final String TK_WARNINGS_SERVICE = "tkWarningService";
149     public static final String HR_POSITION_SERVICE = "positionService";
150     public static final String TK_SEARCH_ATTR_SERVICE = "tkSearchableAttributeService";
151     public static final String LM_ACCRUAL_SERVICE = "accrualService";
152     public static final String LM_ACCRUAL_CATEGORY_SERVICE = "leaveAccrualCategoryService";
153     public static final String LM_LEAVE_CODE_SERVICE = "leaveCodeService";
154     public static final String LM_LEAVE_PLAN_SERVICE = "leavePlanService";
155     public static final String LM_LEAVE_DONATION_SERVICE = "leaveDonationService";
156     public static final String LM_SYS_SCH_TIMEOFF_SERVICE = "systemScheduledTimeOffService";
157     public static final String LM_LEAVE_BLOCK_SERVICE = "leaveBlockService";
158     public static final String LM_LEAVE_CALENDAR_SERVICE = "leaveCalendarService";
159     public static final String LM_LEAVE_CALENDAR_DOCUMENT_HEADER_SERVICE = "leaveCalendarDocumentHeaderService";
160     public static final String LM_EMPLOYEE_OVERRIDE_SERVICE = "employeeOverrideService";
161 	public static final String TK_PRINCIPAL_HR_ATTRIBUTES_SERVICE = "principalHRAttributesService";
162 	public static final String LM_LEAVE_ADJUSTMENT_SERVICE = "leaveAdjustmentService";
163 	public static final String LM_LEAVE_BLOCK_HISTORY_SERVICE = "leaveBlockHistoryService";
164 	public static final String LM_PRINCIPAL_ACCRUAL_RAN_SERVICE = "principalAccrualRanService";
165 	public static final String LM_LEAVE_SUMMARY_SERVICE = "leaveSummaryService";
166 	public static final String LM_LEAVE_APPROVAL_SERVICE = "leaveApprovalService";
167     public static final String LM_BALANCE_TRANSFER_SERVICE = "balanceTransferService";
168     public static final String LM_LEAVE_REQUEST_DOC_SERVICE = "leaveRequestDocumentService";
169 	public static final String LM_ACCRUAL_CATEGORY_MAX_CARRY_OVER_SERVICE = "accrualCategoryMaxCarryOverService";
170     public static final String LM_LEAVE_PAYOUT_SERVICE = "leavePayoutService";
171 	public static final String KPME_DISTRIBUTED_CACHE_MANAGER = "kpmeDistributedCacheManager";
172     public static final String KPME_NOTIFICATION_SERVICE = "kpmeNotificationService";
173     
174     public static MissedPunchService getMissedPunchService() {
175         return (MissedPunchService) CONTEXT.getBean(TK_MISSED_PUNCH_SERVICE);
176     }
177 
178     public static TaskService getTaskService() {
179         return (TaskService) CONTEXT.getBean(TK_TASK_SERVICE);
180     }
181 
182 	public static SalGroupService getSalGroupService() {
183 		return (SalGroupService) CONTEXT.getBean(hr_sal_group_SERVICE);
184 	}
185 
186 	public static DepartmentService getDepartmentService() {
187 		return (DepartmentService) CONTEXT.getBean(TK_DEPARTMENT_SERVICE);
188 	}
189 
190 	public static ShiftDifferentialRuleService getShiftDifferentialRuleService() {
191 		return (ShiftDifferentialRuleService) CONTEXT.getBean(TK_SHIFT_DIFFERENTIAL_RULE_SERVICE);
192 	}
193 
194 	public static WorkScheduleService getWorkScheduleService() {
195 		return (WorkScheduleService) CONTEXT.getBean(TK_WORK_SCHEDULE_SERVICE);
196 	}
197 
198     public static WorkScheduleAssignmentService getWorkScheduleAssignmentService() {
199         return (WorkScheduleAssignmentService) CONTEXT.getBean(TK_WORK_SCHEDULE_ASSIGNMENT_SERVICE);
200     }
201 
202 	public static WeeklyOvertimeRuleService getWeeklyOvertimeRuleService() {
203 		return (WeeklyOvertimeRuleService) CONTEXT.getBean(TK_WEEKLY_OVERTIME_RULE_SERVICE);
204 	}
205 
206 	public static DailyOvertimeRuleService getDailyOvertimeRuleService() {
207 		return (DailyOvertimeRuleService) CONTEXT.getBean(TK_DAILY_OVERTIME_RULE_SERVICE);
208 	}
209 
210 	public static TkRoleService getTkRoleService() {
211 		return (TkRoleService) CONTEXT.getBean(TK_ROLE_SERVICE);
212 	}
213 
214 	public static TkRoleGroupService getTkRoleGroupService() {
215 		return (TkRoleGroupService) CONTEXT.getBean(TK_ROLE_GROUP_SERVICE);
216 	}
217 	
218 	public static TimesheetDocumentHeaderService getTimesheetDocumentHeaderService() {
219 		return (TimesheetDocumentHeaderService) CONTEXT.getBean(TK_TIMESHEET_DOCUMENT_HEADER_SERVICE);
220 	}
221 
222 	public static TimesheetService getTimesheetService() {
223 		return (TimesheetService) CONTEXT.getBean(TK_TIMESHEET_SERVICE);
224 	}
225 
226 	public static WorkAreaService getWorkAreaService() {
227 	    return (WorkAreaService)CONTEXT.getBean(TK_WORK_AREA_SERVICE);
228 	}
229 
230 	public static ClockLogService getClockLogService(){
231 	    return (ClockLogService)CONTEXT.getBean(TK_CLOCK_LOG_SERVICE);
232 	}
233 	
234 	public static TkPermissionsService getPermissionsService(){
235 	    return (TkPermissionsService)CONTEXT.getBean(TK_PERMISSIONS_SERVICE);
236 	}
237 
238     public static DistributedCacheManagerDecorator getDistributedCacheManager() {
239         return (DistributedCacheManagerDecorator)CONTEXT.getBean(KPME_DISTRIBUTED_CACHE_MANAGER);
240     }
241 
242 
243 
244 
245 	public static AssignmentService getAssignmentService(){
246 	    return (AssignmentService)CONTEXT.getBean(TK_ASSIGNMENT_SERVICE);
247 	}
248 
249 	public static TimeBlockService getTimeBlockService(){
250 		return (TimeBlockService)CONTEXT.getBean(TK_TIME_BLOCK_SERVICE);
251 	}
252 
253 	public static TimeBlockHistoryService getTimeBlockHistoryService(){
254 		return (TimeBlockHistoryService)CONTEXT.getBean(TK_TIME_BLOCK_HISTORY_SERVICE);
255 	}
256 	
257 	public static TimeBlockHistoryDetailService getTimeBlockHistoryDetailService(){
258 		return (TimeBlockHistoryDetailService)CONTEXT.getBean(TK_TIME_BLOCK_HISTORY_DETAIL_SERVICE);
259 	}
260 
261 	public static AssignmentDao getAssignmentDao() {
262 	    return (AssignmentDao)CONTEXT.getBean(TK_ASSIGNMENT_DAO);
263 	}
264 
265 	public static JobService getJobService() {
266 		return (JobService)CONTEXT.getBean(TK_JOB_SERVICE);
267 	}
268 
269 	public static PayTypeService getPayTypeService() {
270 		return (PayTypeService)CONTEXT.getBean(TK_PAY_TYPE_SERVICE);
271 	}
272 
273 	public static PersistenceBrokerTemplate getTkPersistenceBrokerTemplate() {
274 	    return (PersistenceBrokerTemplate) CONTEXT.getBean(TK_PERSISTENCE_BROKER_TEMPLATE);
275 	}
276 
277 	public static TkRuleControllerService getTkRuleControllerService(){
278 		return (TkRuleControllerService) CONTEXT.getBean("tkRuleControllerService");
279 	}
280 
281 	public static EarnCodeSecurityService getEarnCodeSecurityService() {
282 		return (EarnCodeSecurityService) CONTEXT.getBean(TK_EARN_CODE_SECURITY);
283 	}
284 
285 	public static EarnCodeService getEarnCodeService() {
286 		return (EarnCodeService) CONTEXT.getBean(TK_EARN_CODE);
287 	}
288 
289 	public static TimeCollectionRuleService getTimeCollectionRuleService() {
290 		return (TimeCollectionRuleService) CONTEXT.getBean(TK_TIME_COLLECTION_RULE_SERVICE);
291 	}
292 
293 	public static TimeSummaryService getTimeSummaryService(){
294 		return (TimeSummaryService) CONTEXT.getBean(TK_TIME_SUMMARY_SERVICE);
295 	}
296 
297 	public static EarnCodeGroupService getEarnCodeGroupService(){
298 		return (EarnCodeGroupService) CONTEXT.getBean(TK_TIME_EARN_CODE_GROUP_SERVICE);
299 	}
300 
301 	public static TimeHourDetailService getTimeHourDetailService(){
302 		return (TimeHourDetailService) CONTEXT.getBean(TK_TIME_HOUR_DETAIL_SERVICE);
303 	}
304 
305 	public static ClockLocationRuleService getClockLocationRuleService(){
306 		return (ClockLocationRuleService) CONTEXT.getBean(TK_CLOCK_LOCATION_RULE_SERVICE);
307 	}
308 
309 	public static GracePeriodService getGracePeriodService(){
310 		return (GracePeriodService) CONTEXT.getBean(TK_GRACE_PERIOD_SERVICE);
311 	}
312 
313 	public static SystemLunchRuleService getSystemLunchRuleService(){
314 		return (SystemLunchRuleService) CONTEXT.getBean(TK_SYSTEM_LUNCH_RULE_SERVICE);
315 	}
316 
317 	public static DepartmentLunchRuleService getDepartmentLunchRuleService(){
318 		return (DepartmentLunchRuleService) CONTEXT.getBean(TK_DEPT_LUNCH_RULE_SERVICE);
319 	}
320 
321 	public static UserPreferenceService getUserPreferenceService(){
322 		return (UserPreferenceService) CONTEXT.getBean(TK_USER_PREF_SERVICE);
323 	}
324 
325 	public static TimezoneService getTimezoneService(){
326 		return (TimezoneService) CONTEXT.getBean(TK_TIME_ZONE_SERVICE);
327 	}
328 
329 	public static TimeOffAccrualService getTimeOffAccrualService(){
330 		return (TimeOffAccrualService) CONTEXT.getBean(TK_TIME_OFF_ACCRUAL_SERVICE);
331 	}
332 
333 	public static AccrualCategoryService getAccrualCategoryService() {
334 	    return (AccrualCategoryService)CONTEXT.getBean(TK_ACCRUAL_CATEGORY_SERVICE);
335 	}
336 	
337 	public static AccrualService getAccrualService() {
338 	    return (AccrualService)CONTEXT.getBean(LM_ACCRUAL_SERVICE);
339 	}
340 	
341 	public static AccrualCategoryRuleService getAccrualCategoryRuleService() {
342 	    return (AccrualCategoryRuleService)CONTEXT.getBean(TK_ACCRUAL_CATEGORY_RULE_SERVICE);
343 	}
344 	
345 	public static LocationService getLocationService() {
346 	    return (LocationService)CONTEXT.getBean(TK_LOCATION_SERVICE);
347 	}
348 
349 	public static PayGradeService getPayGradeService() {
350 	    return (PayGradeService)CONTEXT.getBean(TK_PAY_GRADE_SERVICE);
351 	}
352 
353 	public static PersonService getPersonService(){
354 		return (PersonService)CONTEXT.getBean(TK_PERSON_SERVICE);
355 	}
356 	public static TimeApproveService getTimeApproveService(){
357 		return (TimeApproveService)CONTEXT.getBean(TK_APPROVE_SERVICE);
358 	}
359 
360 	public static BatchJobService getBatchJobService(){
361 		return (BatchJobService)CONTEXT.getBean(TK_BATCH_JOB_SERVICE);
362 	}
363 
364 	public static TkWarningService getWarningService(){
365 		return (TkWarningService) CONTEXT.getBean(TK_WARNINGS_SERVICE);
366 	}
367 	
368 	public static PositionService getPositionService(){
369 		return (PositionService) CONTEXT.getBean(HR_POSITION_SERVICE);
370 	}
371 	
372 	public static TkSearchableAttributeService getTkSearchableAttributeService(){
373 		return (TkSearchableAttributeService) CONTEXT.getBean(TK_SEARCH_ATTR_SERVICE);
374 	}
375 
376 	public static PlatformTransactionManager getPlatformTransactionManager() {
377 		return (PlatformTransactionManager)CONTEXT.getBean("transactionManager");
378 	}
379 
380 	public static TransactionTemplate getTransactionTemplate() {
381 		return new TransactionTemplate(getPlatformTransactionManager());
382 	}
383 	
384 	public static AccrualService getLeaveAccrualService(){
385 		return (AccrualService) CONTEXT.getBean(LM_ACCRUAL_SERVICE);
386 	}
387 	
388 	public static AccrualCategoryService getLeaveAccrualCategoryService(){
389 		return (AccrualCategoryService)CONTEXT.getBean(LM_ACCRUAL_CATEGORY_SERVICE);
390 	}
391 	
392 	public static LeaveCodeService getLeaveCodeService(){
393 		return (LeaveCodeService)CONTEXT.getBean(LM_LEAVE_CODE_SERVICE);
394 	}
395 	
396 	public static LeavePlanService getLeavePlanService(){
397 		return (LeavePlanService)CONTEXT.getBean(LM_LEAVE_PLAN_SERVICE);
398 	}
399 	
400 	/*public static AccrualCategoryRuleService getLeaveAccrualCategoryRuleService(){
401 		return (AccrualCategoryRuleService)CONTEXT.getBean(LM_ACCRUAL_CATEGORY_RULE_SERVICE);
402 	}*/
403 	
404 	public static LeaveDonationService getLeaveDonationService(){
405 		return (LeaveDonationService)CONTEXT.getBean(LM_LEAVE_DONATION_SERVICE);
406 	}
407 	
408 	public static SystemScheduledTimeOffService getSysSchTimeOffService(){
409 		return (SystemScheduledTimeOffService)CONTEXT.getBean(LM_SYS_SCH_TIMEOFF_SERVICE);
410 	}
411 
412     public static LeaveBlockService getLeaveBlockService(){
413 		return (LeaveBlockService)CONTEXT.getBean(LM_LEAVE_BLOCK_SERVICE);
414 	}
415 
416     public static LeaveBlockHistoryService getLeaveBlockHistoryService(){
417 		return (LeaveBlockHistoryService)CONTEXT.getBean(LM_LEAVE_BLOCK_HISTORY_SERVICE);
418 	}
419     
420     public static LeaveCalendarService getLeaveCalendarService(){
421 		return (LeaveCalendarService)CONTEXT.getBean(LM_LEAVE_CALENDAR_SERVICE);
422 	}
423 
424     public static LeaveCalendarDocumentHeaderService getLeaveCalendarDocumentHeaderService(){
425 		return (LeaveCalendarDocumentHeaderService)CONTEXT.getBean(LM_LEAVE_CALENDAR_DOCUMENT_HEADER_SERVICE);
426 	}
427     
428     public static EmployeeOverrideService getEmployeeOverrideService(){
429 		return (EmployeeOverrideService)CONTEXT.getBean(LM_EMPLOYEE_OVERRIDE_SERVICE);
430 	}
431     
432     public static LeaveAdjustmentService getLeaveAdjustmentService(){
433 		return (LeaveAdjustmentService)CONTEXT.getBean(LM_LEAVE_ADJUSTMENT_SERVICE);
434 	}
435     
436     public static PrincipalHRAttributesService getPrincipalHRAttributeService(){
437     	return (PrincipalHRAttributesService)CONTEXT.getBean(TK_PRINCIPAL_HR_ATTRIBUTES_SERVICE);
438     }
439     
440 	public static CalendarService getCalendarService() {
441 		return (CalendarService)CONTEXT.getBean(TK_PAY_CALENDAR_SERVICE);
442 	}
443 	
444 	public static CalendarEntriesService getCalendarEntriesService() {
445 		return (CalendarEntriesService)CONTEXT.getBean(TK_PAY_CALENDAR_ENTRIES_SERVICE);
446 	}
447 	
448 	public static PrincipalAccrualRanService getPrincipalAccrualRanService() {
449 		return (PrincipalAccrualRanService)CONTEXT.getBean(LM_PRINCIPAL_ACCRUAL_RAN_SERVICE);
450 	}
451 	public static LeaveSummaryService getLeaveSummaryService() {
452 		return (LeaveSummaryService)CONTEXT.getBean(LM_LEAVE_SUMMARY_SERVICE);
453 	}
454 	public static LeaveApprovalService getLeaveApprovalService() {
455 		return (LeaveApprovalService)CONTEXT.getBean(LM_LEAVE_APPROVAL_SERVICE);
456 	}
457     public static BalanceTransferService getBalanceTransferService() {
458     	return (BalanceTransferService) CONTEXT.getBean(LM_BALANCE_TRANSFER_SERVICE);
459     }
460     public static LeavePayoutService getLeavePayoutService() {
461         return (LeavePayoutService) CONTEXT.getBean(LM_LEAVE_PAYOUT_SERVICE);
462     }
463     public static KPMENotificationService getKPMENotificationService() {
464     	return (KPMENotificationService) CONTEXT.getBean(KPME_NOTIFICATION_SERVICE);
465     }
466     public static LeaveRequestDocumentService getLeaveRequestDocumentService() {
467         return (LeaveRequestDocumentService) CONTEXT.getBean(LM_LEAVE_REQUEST_DOC_SERVICE);
468     }
469     public static AccrualCategoryMaxCarryOverService getAccrualCategoryMaxCarryOverService() {
470     	return (AccrualCategoryMaxCarryOverService) CONTEXT.getBean(LM_ACCRUAL_CATEGORY_MAX_CARRY_OVER_SERVICE);
471     }
472 	
473 	@Override
474 	public void setApplicationContext(ApplicationContext arg0) throws BeansException {
475 	    CONTEXT = arg0;
476 	}
477 	
478 
479     /**
480      * This is for the approval only
481      */
482     public static JdbcTemplate getTkJdbcTemplate() {
483 		return (JdbcTemplate) CONTEXT.getBean("tkJdbcTemplate");
484 	}
485     
486     public static JdbcTemplate getRiceJdbcTemplate() {
487 		return (JdbcTemplate) CONTEXT.getBean("riceJdbcTemplate");
488 	}
489 }