1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.kpme.pm.service.base;
17
18
19 import org.kuali.kpme.pm.api.classification.duty.service.ClassificationDutyService;
20 import org.kuali.kpme.pm.api.classification.flag.service.ClassificationFlagService;
21 import org.kuali.kpme.pm.api.classification.qual.service.ClassificationQualificationService;
22 import org.kuali.kpme.pm.api.classification.service.ClassificationService;
23 import org.kuali.kpme.pm.api.position.service.PositionService;
24 import org.kuali.kpme.pm.api.positionresponsibilityoption.service.PositionResponsibilityOptionService;
25 import org.kuali.kpme.pm.api.positionappointment.service.PositionAppointmentService;
26 import org.kuali.kpme.pm.api.positiondepartment.service.PositionDepartmentService;
27 import org.kuali.kpme.pm.api.positionflag.service.PositionFlagService;
28 import org.kuali.kpme.pm.api.positionreportcat.service.PositionReportCatService;
29 import org.kuali.kpme.pm.api.positionreportgroup.service.PositionReportGroupService;
30 import org.kuali.kpme.pm.api.positionreportsubcat.service.PositionReportSubCatService;
31 import org.kuali.kpme.pm.api.positionreporttype.service.PositionReportTypeService;
32 import org.kuali.kpme.pm.api.positionresponsibility.service.PositionResponsibilityService;
33 import org.kuali.kpme.pm.api.positiontype.service.PositionTypeService;
34 import org.kuali.kpme.pm.api.pstncontracttype.service.PstnContractTypeService;
35 import org.kuali.kpme.pm.api.pstnqlfctnvl.service.PositionQualificationValueService;
36 import org.kuali.kpme.pm.api.pstnqlfrtype.service.PstnQlfrTypeService;
37 import org.kuali.kpme.pm.api.pstnrptgrpsubcat.service.PstnRptGrpSubCatService;
38 import org.springframework.beans.BeansException;
39 import org.springframework.context.ApplicationContext;
40 import org.springframework.context.ApplicationContextAware;
41
42
43 public class PmServiceLocator implements ApplicationContextAware {
44 public static String SPRING_BEANS = "classpath:org/kuali/kpme/pm/config/PMSpringBeans.xml";
45 public static ApplicationContext CONTEXT;
46
47
48 public static final String PM_POSITION_SERVICE = "positionService";
49 public static final String PM_POSITION_REPORT_TYPE_SERVICE = "positionReportTypeService";
50 public static final String PM_POSITION_REPORT_GROUP_SERVICE = "positionReportGroupService";
51 public static final String PM_POSITION_REPORT_CAT_SERVICE = "positionReportCatService";
52 public static final String PM_POSITION_REPORT_SUB_CAT_SERVICE = "positionReportSubCatService";
53 public static final String PM_PSTN_RPT_GRP_SUB_CAT_SERVICE = "pstnRptGrpSubCatService";
54 public static final String PM_POSITION_TYPE_SERVICE = "positionTypeService";
55 public static final String PM_PSTN_CONTRACT_TYPE_SERVICE = "pstnContractTypeService";
56 public static final String PM_POSITION_FLAG_SERVICE = "positionFlagService";
57 public static final String PM_POSITION_QUALIFIER_TYPE_SERVICE = "pstnQlfrTypeService";
58 public static final String PM_POSITION_QUALIFICATION_VALUE_SERVICE = "pstnQlfctnVlService";
59 public static final String PM_POSITION_APPOINTMENT_SERVICE = "positionAppointmentService";
60 public static final String PM_POSITION_DEPT_SERVICE = "positionDepartmentService";
61 public static final String PM_CLASSIFICATION_SERVICE = "classificationService";
62 public static final String PM_CLASSIFICATION_QUAL_SERVICE = "classificationQualificationService";
63 public static final String PM_CLASSIFICATION_DUTY_SERVICE = "classificationDutyService";
64 public static final String PM_CLASSIFICATION_FLAG_SERVICE = "classificationFlagService";
65 public static final String PM_POSITION_RESPONSIBILITY_OPTION_SERVICE = "positionResponsibilityOptionService";
66 public static final String PM_POSITION_RESPONSIBILITY_SERVICE = "positionResponsibilityService";
67
68 public static PositionService getPositionService() {
69 return (PositionService) CONTEXT.getBean(PM_POSITION_SERVICE);
70 }
71
72 public static PositionReportTypeService getPositionReportTypeService() {
73 return (PositionReportTypeService) CONTEXT.getBean(PM_POSITION_REPORT_TYPE_SERVICE);
74 }
75
76 public static PositionReportGroupService getPositionReportGroupService() {
77 return (PositionReportGroupService) CONTEXT.getBean(PM_POSITION_REPORT_GROUP_SERVICE);
78 }
79
80 public static PositionReportCatService getPositionReportCatService() {
81 return (PositionReportCatService) CONTEXT.getBean(PM_POSITION_REPORT_CAT_SERVICE);
82 }
83
84 public static PositionReportSubCatService getPositionReportSubCatService() {
85 return (PositionReportSubCatService) CONTEXT.getBean(PM_POSITION_REPORT_SUB_CAT_SERVICE);
86 }
87
88 public static PstnRptGrpSubCatService getPstnRptGrpSubCatService() {
89 return (PstnRptGrpSubCatService) CONTEXT.getBean(PM_PSTN_RPT_GRP_SUB_CAT_SERVICE);
90 }
91
92 public static PositionTypeService getPositionTypeService() {
93 return (PositionTypeService) CONTEXT.getBean(PM_POSITION_TYPE_SERVICE);
94 }
95
96 public static PositionFlagService getPositionFlagService() {
97 return (PositionFlagService) CONTEXT.getBean(PM_POSITION_FLAG_SERVICE);
98 }
99
100 public static PstnQlfrTypeService getPstnQlfrTypeService() {
101 return (PstnQlfrTypeService) CONTEXT.getBean(PM_POSITION_QUALIFIER_TYPE_SERVICE);
102 }
103
104 public static PositionQualificationValueService getPositionQualificationValueService() {
105 return (PositionQualificationValueService) CONTEXT.getBean(PM_POSITION_QUALIFICATION_VALUE_SERVICE);
106 }
107
108 public static PstnContractTypeService getPstnContractTypeService() {
109 return (PstnContractTypeService) CONTEXT.getBean(PM_PSTN_CONTRACT_TYPE_SERVICE);
110 }
111
112 public static PositionAppointmentService getPositionAppointmentService() {
113 return (PositionAppointmentService) CONTEXT.getBean(PM_POSITION_APPOINTMENT_SERVICE);
114 }
115
116 public static PositionDepartmentService getPositionDepartmentService() {
117 return (PositionDepartmentService) CONTEXT.getBean(PM_POSITION_DEPT_SERVICE);
118 }
119
120 public static ClassificationService getClassificationService() {
121 return (ClassificationService) CONTEXT.getBean(PM_CLASSIFICATION_SERVICE);
122 }
123
124 public static ClassificationQualificationService getClassificationQualService() {
125 return (ClassificationQualificationService) CONTEXT.getBean(PM_CLASSIFICATION_QUAL_SERVICE);
126 }
127
128 public static ClassificationDutyService getClassificationDutyService() {
129 return (ClassificationDutyService) CONTEXT.getBean(PM_CLASSIFICATION_DUTY_SERVICE);
130 }
131
132 public static ClassificationFlagService getClassificationFlagService() {
133 return (ClassificationFlagService) CONTEXT.getBean(PM_CLASSIFICATION_FLAG_SERVICE);
134 }
135
136 public static PositionResponsibilityOptionService getPositionResponsibilityOptionService() {
137 return (PositionResponsibilityOptionService) CONTEXT.getBean(PM_POSITION_RESPONSIBILITY_OPTION_SERVICE);
138 }
139
140 public static PositionResponsibilityService getPositionResponsibilityService() {
141 return (PositionResponsibilityService) CONTEXT.getBean(PM_POSITION_RESPONSIBILITY_SERVICE);
142 }
143
144 @Override
145 public void setApplicationContext(ApplicationContext arg0)
146 throws BeansException {
147 CONTEXT = arg0;
148 }
149 }