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