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.exception.RiceIllegalArgumentException;
19 import org.kuali.rice.core.api.exception.RiceIllegalStateException;
20 import org.kuali.rice.location.api.LocationConstants;
21 import org.springframework.cache.annotation.Cacheable;
22
23 import javax.jws.WebMethod;
24 import javax.jws.WebParam;
25 import javax.jws.WebResult;
26 import javax.jws.WebService;
27 import javax.jws.soap.SOAPBinding;
28 import javax.xml.bind.annotation.XmlElement;
29 import javax.xml.bind.annotation.XmlElementWrapper;
30 import java.util.List;
31
32
33
34
35
36
37 @WebService(name = "StateService", targetNamespace = LocationConstants.Namespaces.LOCATION_NAMESPACE_2_0)
38 @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
39 public interface StateService {
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57 @WebMethod(operationName = "getState")
58 @WebResult(name = "state")
59 @Cacheable(value=State.Cache.NAME, key="'countryCode=' + #countryCode + '|' + 'code=' + #code")
60 State getState(@WebParam(name = "countryCode") String countryCode, @WebParam(name = "code") String code)
61 throws RiceIllegalArgumentException;
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79 @WebMethod(operationName = "findAllStatesInCountry")
80 @XmlElementWrapper(name = "states", required = true)
81 @XmlElement(name = "state", required = false)
82 @WebResult(name = "states")
83 @Cacheable(value=State.Cache.NAME, key="'countryCode=' + #countryCode")
84 List<State> findAllStatesInCountry(@WebParam(name = "countryCode") String countryCode)
85 throws RiceIllegalArgumentException;
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104 @WebMethod(operationName = "findAllStatesInCountryByAltCode")
105 @XmlElementWrapper(name = "states", required = true)
106 @XmlElement(name = "state", required = false)
107 @WebResult(name = "states")
108 @Cacheable(value=State.Cache.NAME, key="'alternateCode=' + #alternateCode")
109 List<State> findAllStatesInCountryByAltCode(@WebParam(name = "alternateCode") String alternateCode)
110 throws RiceIllegalArgumentException, RiceIllegalStateException;
111 }