1
22
23 package com.liferay.portal.service.http;
24
25 import com.liferay.portal.kernel.log.Log;
26 import com.liferay.portal.kernel.log.LogFactoryUtil;
27 import com.liferay.portal.kernel.util.BooleanWrapper;
28 import com.liferay.portal.kernel.util.LongWrapper;
29 import com.liferay.portal.kernel.util.MethodWrapper;
30 import com.liferay.portal.kernel.util.NullWrapper;
31 import com.liferay.portal.security.auth.HttpPrincipal;
32 import com.liferay.portal.service.CountryServiceUtil;
33
34
73 public class CountryServiceHttp {
74 public static com.liferay.portal.model.Country addCountry(
75 HttpPrincipal httpPrincipal, java.lang.String name,
76 java.lang.String a2, java.lang.String a3, java.lang.String number,
77 java.lang.String idd, boolean active)
78 throws com.liferay.portal.SystemException,
79 com.liferay.portal.PortalException {
80 try {
81 Object paramObj0 = name;
82
83 if (name == null) {
84 paramObj0 = new NullWrapper("java.lang.String");
85 }
86
87 Object paramObj1 = a2;
88
89 if (a2 == null) {
90 paramObj1 = new NullWrapper("java.lang.String");
91 }
92
93 Object paramObj2 = a3;
94
95 if (a3 == null) {
96 paramObj2 = new NullWrapper("java.lang.String");
97 }
98
99 Object paramObj3 = number;
100
101 if (number == null) {
102 paramObj3 = new NullWrapper("java.lang.String");
103 }
104
105 Object paramObj4 = idd;
106
107 if (idd == null) {
108 paramObj4 = new NullWrapper("java.lang.String");
109 }
110
111 Object paramObj5 = new BooleanWrapper(active);
112
113 MethodWrapper methodWrapper = new MethodWrapper(CountryServiceUtil.class.getName(),
114 "addCountry",
115 new Object[] {
116 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
117 paramObj5
118 });
119
120 Object returnObj = null;
121
122 try {
123 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
124 }
125 catch (Exception e) {
126 if (e instanceof com.liferay.portal.SystemException) {
127 throw (com.liferay.portal.SystemException)e;
128 }
129
130 if (e instanceof com.liferay.portal.PortalException) {
131 throw (com.liferay.portal.PortalException)e;
132 }
133
134 throw new com.liferay.portal.SystemException(e);
135 }
136
137 return (com.liferay.portal.model.Country)returnObj;
138 }
139 catch (com.liferay.portal.SystemException se) {
140 _log.error(se, se);
141
142 throw se;
143 }
144 }
145
146 public static java.util.List getCountries(HttpPrincipal httpPrincipal)
147 throws com.liferay.portal.SystemException {
148 try {
149 MethodWrapper methodWrapper = new MethodWrapper(CountryServiceUtil.class.getName(),
150 "getCountries", new Object[0]);
151
152 Object returnObj = null;
153
154 try {
155 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
156 }
157 catch (Exception e) {
158 if (e instanceof com.liferay.portal.SystemException) {
159 throw (com.liferay.portal.SystemException)e;
160 }
161
162 throw new com.liferay.portal.SystemException(e);
163 }
164
165 return (java.util.List)returnObj;
166 }
167 catch (com.liferay.portal.SystemException se) {
168 _log.error(se, se);
169
170 throw se;
171 }
172 }
173
174 public static java.util.List getCountries(HttpPrincipal httpPrincipal,
175 boolean active) throws com.liferay.portal.SystemException {
176 try {
177 Object paramObj0 = new BooleanWrapper(active);
178
179 MethodWrapper methodWrapper = new MethodWrapper(CountryServiceUtil.class.getName(),
180 "getCountries", new Object[] { paramObj0 });
181
182 Object returnObj = null;
183
184 try {
185 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
186 }
187 catch (Exception e) {
188 if (e instanceof com.liferay.portal.SystemException) {
189 throw (com.liferay.portal.SystemException)e;
190 }
191
192 throw new com.liferay.portal.SystemException(e);
193 }
194
195 return (java.util.List)returnObj;
196 }
197 catch (com.liferay.portal.SystemException se) {
198 _log.error(se, se);
199
200 throw se;
201 }
202 }
203
204 public static com.liferay.portal.model.Country getCountry(
205 HttpPrincipal httpPrincipal, long countryId)
206 throws com.liferay.portal.SystemException,
207 com.liferay.portal.PortalException {
208 try {
209 Object paramObj0 = new LongWrapper(countryId);
210
211 MethodWrapper methodWrapper = new MethodWrapper(CountryServiceUtil.class.getName(),
212 "getCountry", new Object[] { paramObj0 });
213
214 Object returnObj = null;
215
216 try {
217 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
218 }
219 catch (Exception e) {
220 if (e instanceof com.liferay.portal.SystemException) {
221 throw (com.liferay.portal.SystemException)e;
222 }
223
224 if (e instanceof com.liferay.portal.PortalException) {
225 throw (com.liferay.portal.PortalException)e;
226 }
227
228 throw new com.liferay.portal.SystemException(e);
229 }
230
231 return (com.liferay.portal.model.Country)returnObj;
232 }
233 catch (com.liferay.portal.SystemException se) {
234 _log.error(se, se);
235
236 throw se;
237 }
238 }
239
240 private static Log _log = LogFactoryUtil.getLog(CountryServiceHttp.class);
241 }