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
23
24
25
26
27
28
29 @Deprecated
30 public class KNSServiceLocator {
31
32 public static final String BUSINESS_OBJECT_AUTHORIZATION_SERVICE = "businessObjectAuthorizationService";
33 public static final String BUSINESS_OBJECT_METADATA_SERVICE = "businessObjectMetaDataService";
34 public static final String BUSINESS_OBJECT_DICTIONARY_SERVICE = "businessObjectDictionaryService";
35 public static final String DATA_DICTIONARY_SERVICE = "dataDictionaryService";
36 public static final String DICTIONARY_VALIDATION_SERVICE = "dictionaryValidationService";
37 public static final String LOOKUP_RESULTS_SERVICE = "lookupResultsService";
38 public static final String KUALI_INQUIRABLE = "kualiInquirable";
39 public static final String KUALI_LOOKUPABLE = "kualiLookupable";
40 public static final String MAINTENANCE_DOCUMENT_DICTIONARY_SERVICE = "maintenanceDocumentDictionaryService";
41 public static final String TRANSACTIONAL_DOCUMENT_DICTIONARY_SERVICE = "transactionalDocumentDictionaryService";
42 public static final String SESSION_DOCUMENT_SERVICE = "knsSessionDocumentService";
43
44 public static <T extends Object> T getService(String serviceName) {
45 return GlobalResourceLoader.<T>getService(serviceName);
46 }
47
48 public static BusinessObjectAuthorizationService getBusinessObjectAuthorizationService() {
49 return getService(BUSINESS_OBJECT_AUTHORIZATION_SERVICE);
50 }
51
52 public static BusinessObjectMetaDataService getBusinessObjectMetaDataService() {
53 return getService(BUSINESS_OBJECT_METADATA_SERVICE);
54 }
55
56 public static DictionaryValidationService getDictionaryValidationService() {
57 return (DictionaryValidationService) getService(DICTIONARY_VALIDATION_SERVICE);
58 }
59
60 public static LookupResultsService getLookupResultsService() {
61 return (LookupResultsService) getService(LOOKUP_RESULTS_SERVICE);
62 }
63
64 public static Inquirable getKualiInquirable() {
65 return getService(KUALI_INQUIRABLE);
66 }
67
68 public static Lookupable getKualiLookupable() {
69 return getService(KUALI_LOOKUPABLE);
70 }
71
72 public static MaintenanceDocumentDictionaryService getMaintenanceDocumentDictionaryService() {
73 return getService(MAINTENANCE_DOCUMENT_DICTIONARY_SERVICE);
74 }
75
76 public static TransactionalDocumentDictionaryService getTransactionalDocumentDictionaryService() {
77 return (TransactionalDocumentDictionaryService) getService(TRANSACTIONAL_DOCUMENT_DICTIONARY_SERVICE);
78 }
79
80 public static SessionDocumentService getSessionDocumentService() {
81 return getService(SESSION_DOCUMENT_SERVICE);
82 }
83
84 public static Lookupable getLookupable(String lookupableName) {
85 return getService(lookupableName);
86 }
87
88 public static DataDictionaryService getDataDictionaryService() {
89 return getService(DATA_DICTIONARY_SERVICE);
90 }
91
92 public static BusinessObjectDictionaryService getBusinessObjectDictionaryService() {
93 return getService(BUSINESS_OBJECT_DICTIONARY_SERVICE);
94 }
95 }