1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.service;
17
18 import org.kuali.rice.core.api.CoreConstants;
19 import org.kuali.rice.core.api.resourceloader.GlobalResourceLoader;
20 import org.kuali.rice.krad.lookup.Lookupable;
21 import org.kuali.rice.krad.messages.MessageService;
22 import org.kuali.rice.krad.uif.service.AttributeQueryService;
23 import org.kuali.rice.krad.uif.service.ViewDictionaryService;
24 import org.kuali.rice.krad.uif.service.ViewService;
25 import org.kuali.rice.krad.workflow.service.WorkflowDocumentService;
26
27
28
29
30
31
32 public class KRADServiceLocatorWeb {
33
34 public static final class Namespaces {
35 public static final String MODULE_NAME = "krad";
36 public static final String KRAD_NAMESPACE_PREFIX =
37 CoreConstants.Namespaces.ROOT_NAMESPACE_PREFIX + "/" + MODULE_NAME;
38
39
40
41
42 public static final String KRAD_NAMESPACE_2_0 =
43 KRAD_NAMESPACE_PREFIX + "/" + CoreConstants.Versions.VERSION_2_0;
44
45 }
46
47 public static final String DATA_DICTIONARY_REMOTE_FIELD_SERVICE = "dataDictionaryRemoteFieldService";
48 public static final String DATA_DICTIONARY_COMPONENT_PUBLISHER_SERVICE = "dataDictionaryComponentPublisherService";
49 public static final String DOCUMENT_DICTIONARY_SERVICE = "documentDictionaryService";
50 public static final String SESSION_DOCUMENT_SERVICE = "sessionDocumentService";
51 public static final String DATA_OBJECT_AUTHORIZATION_SERVICE = "dataObjectAuthorizationService";
52 public static final String MAINTENANCE_DOCUMENT_SERVICE = "maintenanceDocumentService";
53 public static final String WORKFLOW_DOCUMENT_SERVICE = "workflowDocumentService";
54 public static final String EXCEPTION_INCIDENT_REPORT_SERVICE = "kradExceptionIncidentService";
55 public static final String FEEDBACK_REPORT_SERVICE = "kradFeedbackService";
56 public static final String DATA_DICTIONARY_SERVICE = "dataDictionaryService";
57 public static final String DOCUMENT_HEADER_SERVICE = "documentHeaderService";
58 public static final String PESSIMISTIC_LOCK_SERVICE = "pessimisticLockService";
59 public static final String PERSISTENCE_SERVICE_OJB = "persistenceServiceOjb";
60 public static final String KUALI_MODULE_SERVICE = "kualiModuleService";
61 public static final String KUALI_RULE_SERVICE = "kualiRuleService";
62 public static final String DOCUMENT_SERVICE = "documentService";
63 public static final String DOCUMENT_SERIALIZER_SERVICE = "documentSerializerService";
64 public static final String LOOKUP_SERVICE = "lookupService";
65 public static final String DICTIONARY_VALIDATION_SERVICE = "dictionaryValidationService";
66 public static final String DEFAULT_INACTIVATION_BLOCKING_DETECTION_SERVICE = "inactivationBlockingDetectionService";
67 public static final String DATA_OBJECT_METADATA_SERVICE = "dataObjectMetaDataService";
68 public static final String VIEW_SERVICE = "viewService";
69 public static final String VIEW_DICTIONARY_SERVICE = "viewDictionaryService";
70 public static final String VIEW_VALIDATION_SERVICE = "viewValidationService";
71 public static final String ATTRIBUTE_QUERY_SERVICE = "attributeQueryService";
72 public static final String MESSAGE_SERVICE = "messageService";
73 public static final String POST_PROCESSOR_SERVICE = "postProcessorService";
74 public static final String INACTIVATION_BLOCKING_DISPLAY_SERVICE = "inactivationBlockingDisplayService";
75
76 public static <T extends Object> T getService(String serviceName) {
77 return GlobalResourceLoader.<T>getService(serviceName);
78 }
79
80 public static DocumentDictionaryService getDocumentDictionaryService() {
81 return getService(DOCUMENT_DICTIONARY_SERVICE);
82 }
83
84 public static SessionDocumentService getSessionDocumentService() {
85 return getService(SESSION_DOCUMENT_SERVICE);
86 }
87
88 public static DataObjectAuthorizationService getDataObjectAuthorizationService() {
89 return getService(DATA_OBJECT_AUTHORIZATION_SERVICE);
90 }
91
92 public static MaintenanceDocumentService getMaintenanceDocumentService() {
93 return getService(MAINTENANCE_DOCUMENT_SERVICE);
94 }
95
96 public static WorkflowDocumentService getWorkflowDocumentService() {
97 return getService(WORKFLOW_DOCUMENT_SERVICE);
98 }
99
100 public static final KualiExceptionIncidentService getKualiExceptionIncidentService() {
101 return getService(EXCEPTION_INCIDENT_REPORT_SERVICE);
102 }
103
104 public static final KualiFeedbackService getKualiFeedbackService() {
105 return getService(FEEDBACK_REPORT_SERVICE);
106 }
107
108 public static DataDictionaryService getDataDictionaryService() {
109 return getService(DATA_DICTIONARY_SERVICE);
110 }
111
112 public static DocumentHeaderService getDocumentHeaderService() {
113 return getService(DOCUMENT_HEADER_SERVICE);
114 }
115
116 public static PessimisticLockService getPessimisticLockService() {
117 return getService(PESSIMISTIC_LOCK_SERVICE);
118 }
119
120 public static Lookupable getLookupable(String lookupableName) {
121 return getService(lookupableName);
122 }
123
124 public static PersistenceService getPersistenceServiceOjb() {
125 return getService(PERSISTENCE_SERVICE_OJB);
126 }
127
128 public static KualiModuleService getKualiModuleService() {
129 return getService(KUALI_MODULE_SERVICE);
130 }
131
132 public static KualiRuleService getKualiRuleService() {
133 return getService(KUALI_RULE_SERVICE);
134 }
135
136 public static DocumentService getDocumentService() {
137 return getService(DOCUMENT_SERVICE);
138 }
139
140 public static DocumentSerializerService getDocumentSerializerService() {
141 return (DocumentSerializerService) getService(DOCUMENT_SERIALIZER_SERVICE);
142 }
143
144 public static LookupService getLookupService() {
145 return (LookupService) getService(LOOKUP_SERVICE);
146 }
147
148 public static DictionaryValidationService getDictionaryValidationService() {
149 return (DictionaryValidationService) getService(DICTIONARY_VALIDATION_SERVICE);
150 }
151
152 public static InactivationBlockingDetectionService getInactivationBlockingDetectionService(String serviceName) {
153 return (InactivationBlockingDetectionService) getService(serviceName);
154 }
155
156 public static DataObjectMetaDataService getDataObjectMetaDataService() {
157 return (DataObjectMetaDataService) getService(DATA_OBJECT_METADATA_SERVICE);
158 }
159
160 public static ViewService getViewService() {
161 return (ViewService) getService(VIEW_SERVICE);
162 }
163
164 public static ViewDictionaryService getViewDictionaryService() {
165 return (ViewDictionaryService) getService(VIEW_DICTIONARY_SERVICE);
166 }
167
168 public static ViewValidationService getViewValidationService() {
169 return (ViewValidationService) getService(VIEW_VALIDATION_SERVICE);
170 }
171
172 public static AttributeQueryService getAttributeQueryService() {
173 return (AttributeQueryService) getService(ATTRIBUTE_QUERY_SERVICE);
174 }
175
176 public static DataDictionaryRemoteFieldService getDataDictionaryRemoteFieldService() {
177 return (DataDictionaryRemoteFieldService) getService(DATA_DICTIONARY_REMOTE_FIELD_SERVICE);
178 }
179
180 public static MessageService getMessageService() {
181 return getService(MESSAGE_SERVICE);
182 }
183
184 public static DataDictionaryComponentPublisherService getDataDictionaryComponentPublisherService() {
185 return getService(DATA_DICTIONARY_COMPONENT_PUBLISHER_SERVICE);
186 }
187
188 public static PostProcessorService getPostProcessorService() {
189 return (PostProcessorService) getService(POST_PROCESSOR_SERVICE);
190 }
191
192 public static InactivationBlockingDisplayService getInactivationBlockingDisplayService() {
193 return (InactivationBlockingDisplayService) getService(INACTIVATION_BLOCKING_DISPLAY_SERVICE);
194 }
195 }