1 package org.kuali.kpme.edo.service;
2
3 import org.kuali.kpme.edo.authorization.service.AuthorizationService;
4 import org.kuali.kpme.edo.candidate.dao.EdoCandidateDao;
5 import org.kuali.kpme.edo.candidate.service.CandidateService;
6 import org.kuali.kpme.edo.checklist.dao.EdoChecklistItemDao;
7 import org.kuali.kpme.edo.checklist.service.EdoChecklistItemService;
8 import org.kuali.kpme.edo.checklist.service.EdoChecklistSectionService;
9 import org.kuali.kpme.edo.checklist.service.EdoChecklistService;
10 import org.kuali.kpme.edo.dossier.dao.EdoDossierDao;
11 import org.kuali.kpme.edo.dossier.service.EdoCandidateDossierService;
12 import org.kuali.kpme.edo.dossier.service.EdoDossierService;
13 import org.kuali.kpme.edo.dossier.type.dao.EdoDossierTypeDao;
14 import org.kuali.kpme.edo.dossier.type.service.EdoDossierTypeService;
15 import org.kuali.kpme.edo.group.service.EdoGroupDefinitionService;
16 import org.kuali.kpme.edo.group.service.EdoGroupService;
17 import org.kuali.kpme.edo.group.service.EdoGroupTrackingService;
18 import org.kuali.kpme.edo.group.service.EdoRoleResponsibilityService;
19 import org.kuali.kpme.edo.item.dao.EdoItemDao;
20 import org.kuali.kpme.edo.item.service.EdoItemService;
21 import org.kuali.kpme.edo.item.type.dao.EdoItemTypeDao;
22 import org.kuali.kpme.edo.item.type.service.EdoItemTypeService;
23 import org.kuali.kpme.edo.notification.service.EdoNotificationService;
24 import org.kuali.kpme.edo.reports.dao.EdoPromotionAndTenureReportViewDao;
25 import org.kuali.kpme.edo.reports.service.EdoPromotionAndTenureReportViewService;
26 import org.kuali.kpme.edo.reviewernote.service.EdoReviewerNoteService;
27 import org.kuali.kpme.edo.reviewlayerdef.service.EdoReviewLayerDefinitionService;
28 import org.kuali.kpme.edo.reviewlayerdef.service.EdoSuppReviewLayerDefinitionService;
29 import org.kuali.kpme.edo.role.service.EdoRoleMaintenanceService;
30 import org.kuali.kpme.edo.submitButton.service.EdoDisplaySubmitButtonService;
31 import org.kuali.kpme.edo.supplemental.service.EdoSupplementalTrackingService;
32 import org.kuali.kpme.edo.vote.service.EdoVoteRecordService;
33 import org.kuali.kpme.edo.workflow.service.EdoDossierDocumentInfoService;
34 import org.kuali.kpme.edo.workflow.service.EdoSupplementalPendingStatusService;
35 import org.kuali.kpme.edo.workflow.service.EdoWorkflowDefinitionService;
36 import org.kuali.rice.krad.service.DataDictionaryService;
37 import org.springframework.beans.BeansException;
38 import org.springframework.context.ApplicationContext;
39 import org.springframework.context.ApplicationContextAware;
40 import org.springframework.jdbc.core.JdbcTemplate;
41 import org.kuali.kpme.edo.committeesready.service.EdoCommitteesReadyService;
42
43 import javax.sql.DataSource;
44
45 public class EdoServiceLocator implements ApplicationContextAware {
46
47 public static String SPRING_BEANS = "classpath:org/kuali/kpme/pm/config/EdoSpringBeans.xml";
48 public static ApplicationContext SPRING_APPLICATION_CONTEXT;
49 public static final String EDO_DATASOURCE = "dataSource";
50 public static final String KR_DATASOURCE = "riceDataSource";
51 public static final String DATA_DICTIONARY_SERVICE = "dataDictionaryService";
52
53 public static final String EDO_CANDIDATE_LIST_DAO = "edoCandidateListDao";
54 public static final String EDO_CHECKLIST_ITEM_DAO = "edoChecklistItemDao";
55 public static final String EDO_ITEM_DAO = "edoItemDao";
56 public static final String EDO_DOSSIER_TYPE_DAO = "edoDossierTypeDao";
57 public static final String EDO_ITEM_TYPE_DAO = "edoItemTypeDao";
58 public static final String EDO_DOSSIER_DAO = "edoDossier";
59 public static final String EDO_PROMOTIONANDTENURE_REPORT_VIEW_DAO = "edoPromotionAndTenureReportViewDao";
60
61 public static final String CANDIDATE_SERVICE = "candidateService";
62 public static final String CHECKLIST_ITEM_SERVICE = "edoChecklistItemService";
63 public static final String CHECKLIST_SECTION_SERVICE = "edoChecklistSectionService";
64 public static final String CHECKLIST_SERVICE = "edoChecklistService";
65 public static final String ITEM_SERVICE = "edoItemService";
66 public static final String DOSSIER_TYPE_SERVICE = "edoDossierTypeService";
67 public static final String DOSSIER_SERVICE = "edoDossierService";
68 public static final String CANDIDATEDOSSIER_SERVICE = "edoCandidateDossierService";
69 public static final String ITEM_TYPE_SERVICE = "edoItemTypeService";
70 public static final String VOTE_RECORD_SERVICE = "edoVoteRecordService";
71 public static final String REVIEW_LAYER_DEFINITION_SERVICE = "edoReviewLayerDefinitionService";
72 public static final String SUPP_REVIEW_LAYER_DEFINITION_SERVICE = "edoSuppReviewLayerDefinitionService";
73 public static final String DIGITAL_ASSET_SERVICE = "DigitalAssetService";
74 public static final String EDO_DOSSIER_DOCUMENT_INFO_SERVICE = "edoDossierDocumentInfoService";
75 public static final String DOSSIER_PENDING_SUPPLEMENTAL_STATUS_SERVICE = "edoPendingSupplementalStatusService";
76 public static final String SUPP_TRACKING_SERVICE = "edoSupplementalTrackingService";
77 public static final String WORKFLOW_DEFINITION_SERVICE = "edoWorkflowDefinitionService";
78
79 private static final String AUTHORIZATION_SERVICE = "authorizationService";
80 private static final String MAINTENANCE_SERVICE = "maintenanceService";
81
82 public static final String NOTIFICATION_SERVICE = "edoNotificationService";
83
84 public static final String EDO_GROUP_SERVICE = "edoGroupService";
85 public static final String EDO_GROUP_DEFINITION_SERVICE = "edoGroupDefinitionService";
86 public static final String EDO_GROUP_TRACKING_SERVICE = "edoGroupTrackingService";
87 public static final String EDO_ROLE_RESPONSIBILITY_SERVICE = "edoRoleResponsibilityService";
88 public static final String EDO_ROLE_MAINTENANCE_SERVICE = "edoRoleMaintenanceService";
89 public static final String EDO_DISPLAY_SUBMIT_BUTTON_SERVICE= "edoDisplaySubmitButtonService";
90 public static final String EDO_REVIEWER_NOTE_SERVICE = "edoReviewerNoteService";
91 public static final String EDO_COMMITTEES_READY_SERVICE= "edoCommitteesReadyService";
92
93 public static final String EDO_PROMOTIONANDTENURE_REPORT_VIEW_SERVICE = "edoPromotionAndTenureReportViewService";
94
95 public static DigitalAssetService getDigitalAssetService() {
96 return (DigitalAssetService) SPRING_APPLICATION_CONTEXT.getBean(DIGITAL_ASSET_SERVICE);
97 }
98
99 public static DataSource getDataSource() {
100 return (DataSource) SPRING_APPLICATION_CONTEXT.getBean(EDO_DATASOURCE);
101 }
102
103 public static DataSource getKrDataSource() {
104 return (DataSource) SPRING_APPLICATION_CONTEXT.getBean(KR_DATASOURCE);
105 }
106
107 public static DataSource getDataSource(String name) {
108 return (DataSource) SPRING_APPLICATION_CONTEXT.getBean(name);
109 }
110
111 public static DataDictionaryService getDataDictionaryService() {
112 return (DataDictionaryService) SPRING_APPLICATION_CONTEXT.getBean(DATA_DICTIONARY_SERVICE);
113 }
114
115 public static EdoCandidateDao getEdoCandidateListDao(){
116 return (EdoCandidateDao)SPRING_APPLICATION_CONTEXT.getBean(EDO_CANDIDATE_LIST_DAO);
117 }
118
119 public static CandidateService getCandidateService(){
120 return (CandidateService)SPRING_APPLICATION_CONTEXT.getBean(CANDIDATE_SERVICE);
121 }
122
123 public static EdoChecklistItemDao getEdoChecklistItemDao() {
124 return (EdoChecklistItemDao)SPRING_APPLICATION_CONTEXT.getBean(EDO_CHECKLIST_ITEM_DAO);
125 }
126
127 public static EdoChecklistItemService getChecklistItemService() {
128 return (EdoChecklistItemService) SPRING_APPLICATION_CONTEXT.getBean(CHECKLIST_ITEM_SERVICE);
129 }
130
131 public static EdoChecklistSectionService getChecklistSectionService() {
132 return (EdoChecklistSectionService) SPRING_APPLICATION_CONTEXT.getBean(CHECKLIST_SECTION_SERVICE);
133 }
134
135 public static EdoChecklistService getChecklistService(){
136 return (EdoChecklistService)SPRING_APPLICATION_CONTEXT.getBean(CHECKLIST_SERVICE);
137 }
138
139 public static EdoItemDao getEdoItemDao() {
140 return (EdoItemDao)SPRING_APPLICATION_CONTEXT.getBean(EDO_ITEM_DAO);
141 }
142
143 public static EdoItemService getEdoItemService(){
144 return (EdoItemService)SPRING_APPLICATION_CONTEXT.getBean(ITEM_SERVICE);
145 }
146
147 public static EdoDossierTypeDao getEdoDossierTypeDao() {
148 return (EdoDossierTypeDao)SPRING_APPLICATION_CONTEXT.getBean(EDO_DOSSIER_TYPE_DAO);
149 }
150
151 public static EdoDossierTypeService getEdoDossierTypeService(){
152 return (EdoDossierTypeService)SPRING_APPLICATION_CONTEXT.getBean(DOSSIER_TYPE_SERVICE);
153 }
154
155 public static EdoDossierDao getEdoDossierDao() {
156 return (EdoDossierDao)SPRING_APPLICATION_CONTEXT.getBean(EDO_DOSSIER_DAO);
157 }
158
159 public static EdoDossierService getEdoDossierService(){
160 return (EdoDossierService)SPRING_APPLICATION_CONTEXT.getBean(DOSSIER_SERVICE);
161 }
162
163 public static EdoCandidateDossierService getEdoCandidateDossierService() {
164 return (EdoCandidateDossierService)SPRING_APPLICATION_CONTEXT.getBean(CANDIDATEDOSSIER_SERVICE);
165 }
166
167 public static EdoItemTypeDao getEdoItemTypeDao() {
168 return (EdoItemTypeDao)SPRING_APPLICATION_CONTEXT.getBean(EDO_ITEM_TYPE_DAO);
169 }
170
171 public static EdoItemTypeService getEdoItemTypeService(){
172 return (EdoItemTypeService)SPRING_APPLICATION_CONTEXT.getBean(ITEM_TYPE_SERVICE);
173 }
174
175 public static EdoVoteRecordService getEdoVoteRecordService() {
176 return (EdoVoteRecordService)SPRING_APPLICATION_CONTEXT.getBean(VOTE_RECORD_SERVICE);
177 }
178
179 public static EdoReviewLayerDefinitionService getEdoReviewLayerDefinitionService() {
180 return (EdoReviewLayerDefinitionService)SPRING_APPLICATION_CONTEXT.getBean(REVIEW_LAYER_DEFINITION_SERVICE);
181 }
182
183 public static EdoSuppReviewLayerDefinitionService getEdoSuppReviewLayerDefinitionService() {
184 return (EdoSuppReviewLayerDefinitionService)SPRING_APPLICATION_CONTEXT.getBean(SUPP_REVIEW_LAYER_DEFINITION_SERVICE);
185 }
186
187
188 public static AuthorizationService getAuthorizationService(){
189 return (AuthorizationService)SPRING_APPLICATION_CONTEXT.getBean(AUTHORIZATION_SERVICE);
190 }
191 public static MaintenanceService getEdoMaintenanceService(){
192 return (MaintenanceService) SPRING_APPLICATION_CONTEXT.getBean(MAINTENANCE_SERVICE);
193 }
194
195 public void setApplicationContext(ApplicationContext applicationContext)
196 throws BeansException {
197 SPRING_APPLICATION_CONTEXT = applicationContext;
198 }
199
200 public static JdbcTemplate getEdoJdbcTemplate() {
201 return (JdbcTemplate) SPRING_APPLICATION_CONTEXT.getBean("edoJdbcTemplate");
202 }
203
204 public static EdoDossierDocumentInfoService getEdoDossierDocumentInfoService() {
205 return (EdoDossierDocumentInfoService)SPRING_APPLICATION_CONTEXT.getBean(EDO_DOSSIER_DOCUMENT_INFO_SERVICE);
206 }
207
208 public static EdoSupplementalPendingStatusService getEdoSupplementalPendingStatusService() {
209 return (EdoSupplementalPendingStatusService)SPRING_APPLICATION_CONTEXT.getBean(DOSSIER_PENDING_SUPPLEMENTAL_STATUS_SERVICE);
210 }
211
212 public static EdoNotificationService getEdoNotificationService() {
213 return (EdoNotificationService) SPRING_APPLICATION_CONTEXT.getBean(NOTIFICATION_SERVICE);
214 }
215
216 public static EdoSupplementalTrackingService getEdoSupplementalTrackingService() {
217 return (EdoSupplementalTrackingService)SPRING_APPLICATION_CONTEXT.getBean(SUPP_TRACKING_SERVICE);
218 }
219
220 public static EdoGroupService getEdoGroupService(){
221 return (EdoGroupService) SPRING_APPLICATION_CONTEXT.getBean(EDO_GROUP_SERVICE);
222 }
223
224 public static EdoGroupDefinitionService getEdoGroupDefinitionService() {
225 return (EdoGroupDefinitionService) SPRING_APPLICATION_CONTEXT.getBean(EDO_GROUP_DEFINITION_SERVICE);
226 }
227
228 public static EdoGroupTrackingService getEdoGroupTrackingService() {
229 return (EdoGroupTrackingService) SPRING_APPLICATION_CONTEXT.getBean(EDO_GROUP_TRACKING_SERVICE);
230 }
231
232 public static EdoRoleResponsibilityService getEdoRoleResponsibilityService() {
233 return (EdoRoleResponsibilityService) SPRING_APPLICATION_CONTEXT.getBean(EDO_ROLE_RESPONSIBILITY_SERVICE);
234 }
235
236 public static EdoRoleMaintenanceService getEdoRoleMaintenanceService() {
237 return (EdoRoleMaintenanceService) SPRING_APPLICATION_CONTEXT.getBean(EDO_ROLE_MAINTENANCE_SERVICE);
238 }
239
240 public static EdoPromotionAndTenureReportViewDao getEdoPromotionAndTenureReportViewDao() {
241 return (EdoPromotionAndTenureReportViewDao) SPRING_APPLICATION_CONTEXT.getBean(EDO_PROMOTIONANDTENURE_REPORT_VIEW_DAO);
242 }
243
244 public static EdoPromotionAndTenureReportViewService getEdoPromotionAndTenureReportViewService() {
245 return (EdoPromotionAndTenureReportViewService) SPRING_APPLICATION_CONTEXT.getBean(EDO_PROMOTIONANDTENURE_REPORT_VIEW_SERVICE);
246 }
247
248 public static EdoWorkflowDefinitionService getEdoWorkflowDefinitionService() {
249 return (EdoWorkflowDefinitionService) SPRING_APPLICATION_CONTEXT.getBean(WORKFLOW_DEFINITION_SERVICE);
250 }
251
252 public static EdoDisplaySubmitButtonService getEdoDisplaySubmitButtonService() {
253 return (EdoDisplaySubmitButtonService) SPRING_APPLICATION_CONTEXT.getBean(EDO_DISPLAY_SUBMIT_BUTTON_SERVICE);
254 }
255
256 public static EdoReviewerNoteService getEdoReviewerNoteService() {
257 return (EdoReviewerNoteService)SPRING_APPLICATION_CONTEXT.getBean(EDO_REVIEWER_NOTE_SERVICE);
258 }
259
260 public static EdoCommitteesReadyService getEdoCommitteesReadyService() {
261 return (EdoCommitteesReadyService) SPRING_APPLICATION_CONTEXT.getBean(EDO_COMMITTEES_READY_SERVICE);
262 }
263
264 }