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