1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
package org.kuali.rice.shareddata.api.services; |
18 | |
|
19 | |
import org.kuali.rice.core.api.resourceloader.GlobalResourceLoader; |
20 | |
import org.kuali.rice.shareddata.api.campus.CampusService; |
21 | |
import org.kuali.rice.shareddata.api.country.CountryService; |
22 | |
import org.kuali.rice.shareddata.api.county.CountyService; |
23 | |
import org.kuali.rice.shareddata.api.postalcode.PostalCodeService; |
24 | |
import org.kuali.rice.shareddata.api.state.StateService; |
25 | |
|
26 | 0 | public class SharedDataApiServiceLocator { |
27 | |
public static final String COUNTRY_SERVICE = "countryService"; |
28 | |
public static final String CAMPUS_SERVICE = "campusService"; |
29 | |
public static final String STATE_SERVICE = "stateService"; |
30 | |
public static final String COUNTY_SERVICE = "countyService"; |
31 | |
public static final String POSTAL_CODE_SERVICE = "postalCodeService"; |
32 | |
|
33 | |
static <T> T getService(String serviceName) { |
34 | 0 | return GlobalResourceLoader.<T>getService(serviceName); |
35 | |
} |
36 | |
|
37 | |
public static CountryService getCountryService() { |
38 | 0 | return getService(COUNTRY_SERVICE); |
39 | |
} |
40 | |
|
41 | |
public static CampusService getCampusService() { |
42 | 0 | return getService(CAMPUS_SERVICE); |
43 | |
} |
44 | |
|
45 | |
public static StateService getStateService() { |
46 | 0 | return getService(STATE_SERVICE); |
47 | |
} |
48 | |
|
49 | |
public static CountyService getCountyService() { |
50 | 0 | return (CountyService) getService(COUNTY_SERVICE); |
51 | |
} |
52 | |
|
53 | |
public static PostalCodeService getPostalCodeService() { |
54 | 0 | return (PostalCodeService) getService(POSTAL_CODE_SERVICE); |
55 | |
} |
56 | |
} |