1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.location.api.country;
17
18 import org.kuali.rice.core.api.criteria.QueryByCriteria;
19 import org.kuali.rice.core.api.exception.RiceIllegalArgumentException;
20 import org.kuali.rice.core.api.exception.RiceIllegalStateException;
21 import org.kuali.rice.location.api.LocationConstants;
22 import org.springframework.cache.annotation.Cacheable;
23
24 import javax.jws.WebMethod;
25 import javax.jws.WebParam;
26 import javax.jws.WebResult;
27 import javax.jws.WebService;
28 import javax.jws.soap.SOAPBinding;
29 import javax.xml.bind.annotation.XmlElement;
30 import javax.xml.bind.annotation.XmlElementWrapper;
31 import java.util.List;
32
33
34
35
36
37
38
39 @WebService(name = "CountryService", targetNamespace = LocationConstants.Namespaces.LOCATION_NAMESPACE_2_0)
40 @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
41 public interface CountryService {
42
43
44
45
46
47
48
49
50
51 @WebMethod(operationName = "getCountry")
52 @WebResult(name = "country")
53 @Cacheable(value=Country.Cache.NAME, key="'code=' + #p0")
54 Country getCountry(@WebParam(name = "code") String code) throws RiceIllegalArgumentException;
55
56
57
58
59
60
61
62
63
64
65 @WebMethod(operationName = "getCountryByAlternateCode")
66 @WebResult(name = "country")
67 @Cacheable(value=Country.Cache.NAME, key="'alternateCode=' + #p0")
68 Country getCountryByAlternateCode(@WebParam(name = "alternateCode") String alternateCode)
69 throws RiceIllegalStateException, RiceIllegalArgumentException;
70
71
72
73
74
75
76 @WebMethod(operationName = "findAllCountriesNotRestricted")
77 @XmlElementWrapper(name = "countriesNotRestricted", required = false)
78 @XmlElement(name = "countryNotRestricted", required = false)
79 @WebResult(name = "countriesNotRestricted")
80 @Cacheable(value=Country.Cache.NAME, key="'allRestricted'")
81 List<Country> findAllCountriesNotRestricted();
82
83
84
85
86
87
88 @WebMethod(operationName = "findAllCountries")
89 @XmlElementWrapper(name = "countries", required = false)
90 @XmlElement(name = "country", required = false)
91 @WebResult(name = "countries")
92 @Cacheable(value=Country.Cache.NAME, key="'all'")
93 List<Country> findAllCountries();
94
95
96
97
98
99
100
101
102 @WebMethod(operationName = "getDefaultCountry")
103 @WebResult(name = "country")
104 @Cacheable(value = Country.Cache.NAME, key="'default'")
105 Country getDefaultCountry();
106
107
108
109
110
111
112
113
114
115 @WebMethod(operationName = "findCountries")
116 @WebResult(name = "results")
117 CountryQueryResults findCountries(@WebParam(name = "query") QueryByCriteria queryByCriteria) throws RiceIllegalArgumentException;
118
119 }