1
14
15 package com.liferay.portal.service.http;
16
17 import com.liferay.portal.kernel.log.Log;
18 import com.liferay.portal.kernel.log.LogFactoryUtil;
19 import com.liferay.portal.kernel.util.BooleanWrapper;
20 import com.liferay.portal.kernel.util.LongWrapper;
21 import com.liferay.portal.kernel.util.MethodWrapper;
22 import com.liferay.portal.kernel.util.NullWrapper;
23 import com.liferay.portal.security.auth.HttpPrincipal;
24 import com.liferay.portal.service.RegionServiceUtil;
25
26
63 public class RegionServiceHttp {
64 public static com.liferay.portal.model.Region addRegion(
65 HttpPrincipal httpPrincipal, long countryId,
66 java.lang.String regionCode, java.lang.String name, boolean active)
67 throws com.liferay.portal.PortalException,
68 com.liferay.portal.SystemException {
69 try {
70 Object paramObj0 = new LongWrapper(countryId);
71
72 Object paramObj1 = regionCode;
73
74 if (regionCode == null) {
75 paramObj1 = new NullWrapper("java.lang.String");
76 }
77
78 Object paramObj2 = name;
79
80 if (name == null) {
81 paramObj2 = new NullWrapper("java.lang.String");
82 }
83
84 Object paramObj3 = new BooleanWrapper(active);
85
86 MethodWrapper methodWrapper = new MethodWrapper(RegionServiceUtil.class.getName(),
87 "addRegion",
88 new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
89
90 Object returnObj = null;
91
92 try {
93 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
94 }
95 catch (Exception e) {
96 if (e instanceof com.liferay.portal.PortalException) {
97 throw (com.liferay.portal.PortalException)e;
98 }
99
100 if (e instanceof com.liferay.portal.SystemException) {
101 throw (com.liferay.portal.SystemException)e;
102 }
103
104 throw new com.liferay.portal.SystemException(e);
105 }
106
107 return (com.liferay.portal.model.Region)returnObj;
108 }
109 catch (com.liferay.portal.SystemException se) {
110 _log.error(se, se);
111
112 throw se;
113 }
114 }
115
116 public static java.util.List<com.liferay.portal.model.Region> getRegions(
117 HttpPrincipal httpPrincipal) throws com.liferay.portal.SystemException {
118 try {
119 MethodWrapper methodWrapper = new MethodWrapper(RegionServiceUtil.class.getName(),
120 "getRegions", new Object[0]);
121
122 Object returnObj = null;
123
124 try {
125 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
126 }
127 catch (Exception e) {
128 if (e instanceof com.liferay.portal.SystemException) {
129 throw (com.liferay.portal.SystemException)e;
130 }
131
132 throw new com.liferay.portal.SystemException(e);
133 }
134
135 return (java.util.List<com.liferay.portal.model.Region>)returnObj;
136 }
137 catch (com.liferay.portal.SystemException se) {
138 _log.error(se, se);
139
140 throw se;
141 }
142 }
143
144 public static java.util.List<com.liferay.portal.model.Region> getRegions(
145 HttpPrincipal httpPrincipal, long countryId)
146 throws com.liferay.portal.SystemException {
147 try {
148 Object paramObj0 = new LongWrapper(countryId);
149
150 MethodWrapper methodWrapper = new MethodWrapper(RegionServiceUtil.class.getName(),
151 "getRegions", new Object[] { paramObj0 });
152
153 Object returnObj = null;
154
155 try {
156 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
157 }
158 catch (Exception e) {
159 if (e instanceof com.liferay.portal.SystemException) {
160 throw (com.liferay.portal.SystemException)e;
161 }
162
163 throw new com.liferay.portal.SystemException(e);
164 }
165
166 return (java.util.List<com.liferay.portal.model.Region>)returnObj;
167 }
168 catch (com.liferay.portal.SystemException se) {
169 _log.error(se, se);
170
171 throw se;
172 }
173 }
174
175 public static java.util.List<com.liferay.portal.model.Region> getRegions(
176 HttpPrincipal httpPrincipal, boolean active)
177 throws com.liferay.portal.SystemException {
178 try {
179 Object paramObj0 = new BooleanWrapper(active);
180
181 MethodWrapper methodWrapper = new MethodWrapper(RegionServiceUtil.class.getName(),
182 "getRegions", new Object[] { paramObj0 });
183
184 Object returnObj = null;
185
186 try {
187 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
188 }
189 catch (Exception e) {
190 if (e instanceof com.liferay.portal.SystemException) {
191 throw (com.liferay.portal.SystemException)e;
192 }
193
194 throw new com.liferay.portal.SystemException(e);
195 }
196
197 return (java.util.List<com.liferay.portal.model.Region>)returnObj;
198 }
199 catch (com.liferay.portal.SystemException se) {
200 _log.error(se, se);
201
202 throw se;
203 }
204 }
205
206 public static java.util.List<com.liferay.portal.model.Region> getRegions(
207 HttpPrincipal httpPrincipal, long countryId, boolean active)
208 throws com.liferay.portal.SystemException {
209 try {
210 Object paramObj0 = new LongWrapper(countryId);
211
212 Object paramObj1 = new BooleanWrapper(active);
213
214 MethodWrapper methodWrapper = new MethodWrapper(RegionServiceUtil.class.getName(),
215 "getRegions", new Object[] { paramObj0, paramObj1 });
216
217 Object returnObj = null;
218
219 try {
220 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
221 }
222 catch (Exception e) {
223 if (e instanceof com.liferay.portal.SystemException) {
224 throw (com.liferay.portal.SystemException)e;
225 }
226
227 throw new com.liferay.portal.SystemException(e);
228 }
229
230 return (java.util.List<com.liferay.portal.model.Region>)returnObj;
231 }
232 catch (com.liferay.portal.SystemException se) {
233 _log.error(se, se);
234
235 throw se;
236 }
237 }
238
239 public static com.liferay.portal.model.Region getRegion(
240 HttpPrincipal httpPrincipal, long regionId)
241 throws com.liferay.portal.PortalException,
242 com.liferay.portal.SystemException {
243 try {
244 Object paramObj0 = new LongWrapper(regionId);
245
246 MethodWrapper methodWrapper = new MethodWrapper(RegionServiceUtil.class.getName(),
247 "getRegion", new Object[] { paramObj0 });
248
249 Object returnObj = null;
250
251 try {
252 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
253 }
254 catch (Exception e) {
255 if (e instanceof com.liferay.portal.PortalException) {
256 throw (com.liferay.portal.PortalException)e;
257 }
258
259 if (e instanceof com.liferay.portal.SystemException) {
260 throw (com.liferay.portal.SystemException)e;
261 }
262
263 throw new com.liferay.portal.SystemException(e);
264 }
265
266 return (com.liferay.portal.model.Region)returnObj;
267 }
268 catch (com.liferay.portal.SystemException se) {
269 _log.error(se, se);
270
271 throw se;
272 }
273 }
274
275 private static Log _log = LogFactoryUtil.getLog(RegionServiceHttp.class);
276 }