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