1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.data;
17
18 import org.kuali.rice.core.api.resourceloader.GlobalResourceLoader;
19 import org.kuali.rice.krad.data.metadata.MetadataRepository;
20 import org.kuali.rice.krad.data.provider.ProviderRegistry;
21
22
23
24
25
26
27 public class KradDataServiceLocator {
28 static <T> T getService(String serviceName) {
29 return GlobalResourceLoader.<T>getService(serviceName);
30 }
31
32 public static DataObjectService getDataObjectService() {
33 return getService("dataObjectService");
34 }
35
36 public static MetadataRepository getMetadataRepository() {
37 return getService("metadataRepository");
38 }
39
40 public static ProviderRegistry getProviderRegistry() {
41 return getService("providerRegistry");
42 }
43 }