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<com.liferay.portal.model.Country> getCountries(
147 HttpPrincipal httpPrincipal) 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<com.liferay.portal.model.Country>)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<com.liferay.portal.model.Country> getCountries(
175 HttpPrincipal httpPrincipal, boolean active)
176 throws com.liferay.portal.SystemException {
177 try {
178 Object paramObj0 = new BooleanWrapper(active);
179
180 MethodWrapper methodWrapper = new MethodWrapper(CountryServiceUtil.class.getName(),
181 "getCountries", new Object[] { paramObj0 });
182
183 Object returnObj = null;
184
185 try {
186 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
187 }
188 catch (Exception e) {
189 if (e instanceof com.liferay.portal.SystemException) {
190 throw (com.liferay.portal.SystemException)e;
191 }
192
193 throw new com.liferay.portal.SystemException(e);
194 }
195
196 return (java.util.List<com.liferay.portal.model.Country>)returnObj;
197 }
198 catch (com.liferay.portal.SystemException se) {
199 _log.error(se, se);
200
201 throw se;
202 }
203 }
204
205 public static com.liferay.portal.model.Country getCountry(
206 HttpPrincipal httpPrincipal, long countryId)
207 throws com.liferay.portal.SystemException,
208 com.liferay.portal.PortalException {
209 try {
210 Object paramObj0 = new LongWrapper(countryId);
211
212 MethodWrapper methodWrapper = new MethodWrapper(CountryServiceUtil.class.getName(),
213 "getCountry", new Object[] { paramObj0 });
214
215 Object returnObj = null;
216
217 try {
218 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
219 }
220 catch (Exception e) {
221 if (e instanceof com.liferay.portal.SystemException) {
222 throw (com.liferay.portal.SystemException)e;
223 }
224
225 if (e instanceof com.liferay.portal.PortalException) {
226 throw (com.liferay.portal.PortalException)e;
227 }
228
229 throw new com.liferay.portal.SystemException(e);
230 }
231
232 return (com.liferay.portal.model.Country)returnObj;
233 }
234 catch (com.liferay.portal.SystemException se) {
235 _log.error(se, se);
236
237 throw se;
238 }
239 }
240
241 private static Log _log = LogFactoryUtil.getLog(CountryServiceHttp.class);
242 }