1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.location.api.state;
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 @WebService(name = "StateService", targetNamespace = LocationConstants.Namespaces.LOCATION_NAMESPACE_2_0)
39 @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
40 public interface StateService {
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58 @WebMethod(operationName = "getState")
59 @WebResult(name = "state")
60 @Cacheable(value=State.Cache.NAME, key="'countryCode=' + #p0 + '|' + 'code=' + #p1")
61 State getState(@WebParam(name = "countryCode") String countryCode, @WebParam(name = "code") String code)
62 throws RiceIllegalArgumentException;
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80 @WebMethod(operationName = "findAllStatesInCountry")
81 @XmlElementWrapper(name = "states", required = true)
82 @XmlElement(name = "state", required = false)
83 @WebResult(name = "states")
84 @Cacheable(value=State.Cache.NAME, key="'countryCode=' + #p0")
85 List<State> findAllStatesInCountry(@WebParam(name = "countryCode") String countryCode)
86 throws RiceIllegalArgumentException;
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105 @WebMethod(operationName = "findAllStatesInCountryByAltCode")
106 @XmlElementWrapper(name = "states", required = true)
107 @XmlElement(name = "state", required = false)
108 @WebResult(name = "states")
109 @Cacheable(value=State.Cache.NAME, key="'alternateCode=' + #p0")
110 List<State> findAllStatesInCountryByAltCode(@WebParam(name = "alternateCode") String alternateCode)
111 throws RiceIllegalArgumentException, RiceIllegalStateException;
112
113
114
115
116
117
118
119
120
121 @WebMethod(operationName = "findStates")
122 @WebResult(name = "results")
123 StateQueryResults findStates(@WebParam(name = "query") QueryByCriteria queryByCriteria) throws RiceIllegalArgumentException;
124 }