1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.kns.service;
17
18 import org.kuali.rice.core.api.resourceloader.GlobalResourceLoader;
19 import org.kuali.rice.kns.inquiry.Inquirable;
20 import org.kuali.rice.kns.lookup.LookupResultsService;
21 import org.kuali.rice.kns.lookup.Lookupable;
22 import org.kuali.rice.kns.question.Question;
23 import org.kuali.rice.krad.service.BusinessObjectService;
24 import org.kuali.rice.krad.service.DataObjectMetaDataService;
25 import org.kuali.rice.krad.service.DocumentHeaderService;
26 import org.kuali.rice.krad.service.KeyValuesService;
27 import org.kuali.rice.krad.service.LegacyAppFrameworkAdapterService;
28 import org.kuali.rice.krad.service.PersistenceService;
29 import org.kuali.rice.krad.service.PersistenceStructureService;
30 import org.kuali.rice.krad.service.SequenceAccessorService;
31 import org.kuali.rice.krad.service.util.OjbCollectionHelper;
32 import org.springframework.transaction.PlatformTransactionManager;
33 import org.springframework.transaction.support.TransactionTemplate;
34
35
36
37
38
39
40
41 @Deprecated
42 public class KNSServiceLocator {
43
44 public static final String BUSINESS_OBJECT_AUTHORIZATION_SERVICE = "businessObjectAuthorizationService";
45 public static final String BUSINESS_OBJECT_METADATA_SERVICE = "businessObjectMetaDataService";
46 public static final String BUSINESS_OBJECT_DICTIONARY_SERVICE = "businessObjectDictionaryService";
47 public static final String DATA_DICTIONARY_SERVICE = "dataDictionaryService";
48 public static final String DICTIONARY_VALIDATION_SERVICE = "knsDictionaryValidationService";
49 public static final String DOCUMENT_HELPER_SERVICE = "documentHelperService";
50 public static final String LOOKUP_RESULTS_SERVICE = "lookupResultsService";
51 public static final String KUALI_INQUIRABLE = "kualiInquirable";
52 public static final String KUALI_LOOKUPABLE = "kualiLookupable";
53 public static final String MAINTENANCE_DOCUMENT_DICTIONARY_SERVICE = "maintenanceDocumentDictionaryService";
54 public static final String TRANSACTIONAL_DOCUMENT_DICTIONARY_SERVICE = "transactionalDocumentDictionaryService";
55 public static final String KNS_SESSION_DOCUMENT_SERVICE = "knsSessionDocumentService";
56 public static final String WORKFLOW_ATTRIBUTE_PROPERTY_RESOLUTION_SERVICE = "workflowAttributesPropertyResolutionService";
57 public static final String TRANSACTION_MANAGER = "transactionManager";
58 public static final String TRANSACTION_TEMPLATE = "transactionTemplate";
59 public static final String MAINTENANCE_DOCUMENT_AUTHORIZATION_SERVICE = "maintenanceDocumentAuthorizationService";
60 public static final String BUSINESS_OBJECT_SERVICE = "businessObjectService";
61 public static final String DATA_OBJECT_METADATA_SERVICE = "dataObjectMetaDataService";
62 public static final String KEY_VALUES_SERVICE = "keyValuesService";
63 public static final String SESSION_DOCUMENT_SERVICE = "knsSessionDocumentService";
64 public static final String OJB_COLLECTION_HELPER = "ojbCollectionHelper";
65 public static final String PERSISTENCE_SERVICE = "persistenceService";
66 public static final String PERSISTENCE_STRUCTURE_SERVICE = "persistenceStructureService";
67 public static final String SEQUENCE_ACCESSOR_SERVICE = "sequenceAccessorService";
68 public static final String DOCUMENT_HEADER_SERVICE = "documentHeaderService";
69 public static final String LEGACY_DATA_ADAPTER_FRAMEWORK = "legacyAppFrameworkAdapter";
70
71 @Deprecated
72 public static <T extends Object> T getService(String serviceName) {
73 return GlobalResourceLoader.<T>getService(serviceName);
74 }
75
76 @Deprecated
77 public static BusinessObjectAuthorizationService getBusinessObjectAuthorizationService() {
78 return getService(BUSINESS_OBJECT_AUTHORIZATION_SERVICE);
79 }
80
81 @Deprecated
82 public static BusinessObjectMetaDataService getBusinessObjectMetaDataService() {
83 return getService(BUSINESS_OBJECT_METADATA_SERVICE);
84 }
85
86 @Deprecated
87 public static DictionaryValidationService getKNSDictionaryValidationService() {
88 return (DictionaryValidationService) getService(DICTIONARY_VALIDATION_SERVICE);
89 }
90
91 @Deprecated
92 public static LookupResultsService getLookupResultsService() {
93 return (LookupResultsService) getService(LOOKUP_RESULTS_SERVICE);
94 }
95
96 @Deprecated
97 public static Inquirable getKualiInquirable() {
98 return getService(KUALI_INQUIRABLE);
99 }
100
101 @Deprecated
102 public static Lookupable getKualiLookupable() {
103 return getService(KUALI_LOOKUPABLE);
104 }
105
106 @Deprecated
107 public static MaintenanceDocumentDictionaryService getMaintenanceDocumentDictionaryService() {
108 return getService(MAINTENANCE_DOCUMENT_DICTIONARY_SERVICE);
109 }
110
111 @Deprecated
112 public static TransactionalDocumentDictionaryService getTransactionalDocumentDictionaryService() {
113 return (TransactionalDocumentDictionaryService) getService(TRANSACTIONAL_DOCUMENT_DICTIONARY_SERVICE);
114 }
115
116 @Deprecated
117 public static org.kuali.rice.kns.service.SessionDocumentService getKNSSessionDocumentService() {
118 return getService(KNS_SESSION_DOCUMENT_SERVICE);
119 }
120
121 @Deprecated
122 public static Lookupable getLookupable(String lookupableName) {
123 return getService(lookupableName);
124 }
125
126 @Deprecated
127 public static DataDictionaryService getDataDictionaryService() {
128 return getService(DATA_DICTIONARY_SERVICE);
129 }
130
131 @Deprecated
132 public static BusinessObjectDictionaryService getBusinessObjectDictionaryService() {
133 return getService(BUSINESS_OBJECT_DICTIONARY_SERVICE);
134 }
135
136 @Deprecated
137 public static DocumentHelperService getDocumentHelperService() {
138 return getService(DOCUMENT_HELPER_SERVICE);
139 }
140
141 @Deprecated
142 public static Question getQuestion(String questionName) {
143 return (Question) getService(questionName);
144 }
145
146 @Deprecated
147 public static WorkflowAttributePropertyResolutionService getWorkflowAttributePropertyResolutionService() {
148 return (WorkflowAttributePropertyResolutionService) getService(WORKFLOW_ATTRIBUTE_PROPERTY_RESOLUTION_SERVICE);
149 }
150
151 @Deprecated
152 public static PlatformTransactionManager getTransactionManager() {
153 return (PlatformTransactionManager) getService(TRANSACTION_MANAGER);
154 }
155
156 @Deprecated
157 public static TransactionTemplate getTransactionTemplate() {
158 return (TransactionTemplate) getService(TRANSACTION_TEMPLATE);
159 }
160
161 @Deprecated
162 public static BusinessObjectAuthorizationService getMaintenanceDocumentAuthorizationService() {
163 return (BusinessObjectAuthorizationService) getService(MAINTENANCE_DOCUMENT_AUTHORIZATION_SERVICE);
164 }
165
166 @Deprecated
167 public static BusinessObjectService getBusinessObjectService(){
168 return (BusinessObjectService) getService(BUSINESS_OBJECT_SERVICE);
169 }
170
171 @Deprecated
172 public static DataObjectMetaDataService getDataObjectMetaDataService() {
173 return (DataObjectMetaDataService) getService(DATA_OBJECT_METADATA_SERVICE);
174 }
175
176 @Deprecated
177 public static KeyValuesService getKeyValuesService() {
178 return getService(KEY_VALUES_SERVICE);
179 }
180
181 @Deprecated
182 public static SessionDocumentService getSessionDocumentService() {
183 return getService(SESSION_DOCUMENT_SERVICE);
184 }
185
186 @Deprecated
187 public static OjbCollectionHelper getOjbCollectionHelper() {
188 return (OjbCollectionHelper) getService(OJB_COLLECTION_HELPER);
189 }
190 @Deprecated
191 public static DocumentHeaderService getDocumentHeaderService() {
192 return getService(DOCUMENT_HEADER_SERVICE);
193 }
194
195
196 @Deprecated
197 public static PersistenceService getPersistenceService() {
198 return getService(PERSISTENCE_SERVICE);
199 }
200
201 @Deprecated
202 public static PersistenceStructureService getPersistenceStructureService() {
203 return getService(PERSISTENCE_STRUCTURE_SERVICE);
204 }
205
206 @Deprecated
207 public static SequenceAccessorService getSequenceAccessorService() {
208 return getService(SEQUENCE_ACCESSOR_SERVICE);
209 }
210
211 public static LegacyAppFrameworkAdapterService getLegacyAppFrameworkAdapterService() {
212 return (LegacyAppFrameworkAdapterService) getService(LEGACY_DATA_ADAPTER_FRAMEWORK);
213 }
214 }