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.CompanyServiceUtil;
33
34
73 public class CompanyServiceHttp {
74 public static com.liferay.portal.model.Company addCompany(
75 HttpPrincipal httpPrincipal, java.lang.String webId,
76 java.lang.String virtualHost, java.lang.String mx)
77 throws com.liferay.portal.SystemException,
78 com.liferay.portal.PortalException {
79 try {
80 Object paramObj0 = webId;
81
82 if (webId == null) {
83 paramObj0 = new NullWrapper("java.lang.String");
84 }
85
86 Object paramObj1 = virtualHost;
87
88 if (virtualHost == null) {
89 paramObj1 = new NullWrapper("java.lang.String");
90 }
91
92 Object paramObj2 = mx;
93
94 if (mx == null) {
95 paramObj2 = new NullWrapper("java.lang.String");
96 }
97
98 MethodWrapper methodWrapper = new MethodWrapper(CompanyServiceUtil.class.getName(),
99 "addCompany",
100 new Object[] { paramObj0, paramObj1, paramObj2 });
101
102 Object returnObj = null;
103
104 try {
105 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
106 }
107 catch (Exception e) {
108 if (e instanceof com.liferay.portal.SystemException) {
109 throw (com.liferay.portal.SystemException)e;
110 }
111
112 if (e instanceof com.liferay.portal.PortalException) {
113 throw (com.liferay.portal.PortalException)e;
114 }
115
116 throw new com.liferay.portal.SystemException(e);
117 }
118
119 return (com.liferay.portal.model.Company)returnObj;
120 }
121 catch (com.liferay.portal.SystemException se) {
122 _log.error(se, se);
123
124 throw se;
125 }
126 }
127
128 public static com.liferay.portal.model.Company updateCompany(
129 HttpPrincipal httpPrincipal, long companyId,
130 java.lang.String virtualHost, java.lang.String mx)
131 throws com.liferay.portal.SystemException,
132 com.liferay.portal.PortalException {
133 try {
134 Object paramObj0 = new LongWrapper(companyId);
135
136 Object paramObj1 = virtualHost;
137
138 if (virtualHost == null) {
139 paramObj1 = new NullWrapper("java.lang.String");
140 }
141
142 Object paramObj2 = mx;
143
144 if (mx == null) {
145 paramObj2 = new NullWrapper("java.lang.String");
146 }
147
148 MethodWrapper methodWrapper = new MethodWrapper(CompanyServiceUtil.class.getName(),
149 "updateCompany",
150 new Object[] { paramObj0, paramObj1, paramObj2 });
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 if (e instanceof com.liferay.portal.PortalException) {
163 throw (com.liferay.portal.PortalException)e;
164 }
165
166 throw new com.liferay.portal.SystemException(e);
167 }
168
169 return (com.liferay.portal.model.Company)returnObj;
170 }
171 catch (com.liferay.portal.SystemException se) {
172 _log.error(se, se);
173
174 throw se;
175 }
176 }
177
178 public static com.liferay.portal.model.Company updateCompany(
179 HttpPrincipal httpPrincipal, long companyId,
180 java.lang.String virtualHost, java.lang.String mx,
181 java.lang.String name, java.lang.String legalName,
182 java.lang.String legalId, java.lang.String legalType,
183 java.lang.String sicCode, java.lang.String tickerSymbol,
184 java.lang.String industry, java.lang.String type, java.lang.String size)
185 throws com.liferay.portal.SystemException,
186 com.liferay.portal.PortalException {
187 try {
188 Object paramObj0 = new LongWrapper(companyId);
189
190 Object paramObj1 = virtualHost;
191
192 if (virtualHost == null) {
193 paramObj1 = new NullWrapper("java.lang.String");
194 }
195
196 Object paramObj2 = mx;
197
198 if (mx == null) {
199 paramObj2 = new NullWrapper("java.lang.String");
200 }
201
202 Object paramObj3 = name;
203
204 if (name == null) {
205 paramObj3 = new NullWrapper("java.lang.String");
206 }
207
208 Object paramObj4 = legalName;
209
210 if (legalName == null) {
211 paramObj4 = new NullWrapper("java.lang.String");
212 }
213
214 Object paramObj5 = legalId;
215
216 if (legalId == null) {
217 paramObj5 = new NullWrapper("java.lang.String");
218 }
219
220 Object paramObj6 = legalType;
221
222 if (legalType == null) {
223 paramObj6 = new NullWrapper("java.lang.String");
224 }
225
226 Object paramObj7 = sicCode;
227
228 if (sicCode == null) {
229 paramObj7 = new NullWrapper("java.lang.String");
230 }
231
232 Object paramObj8 = tickerSymbol;
233
234 if (tickerSymbol == null) {
235 paramObj8 = new NullWrapper("java.lang.String");
236 }
237
238 Object paramObj9 = industry;
239
240 if (industry == null) {
241 paramObj9 = new NullWrapper("java.lang.String");
242 }
243
244 Object paramObj10 = type;
245
246 if (type == null) {
247 paramObj10 = new NullWrapper("java.lang.String");
248 }
249
250 Object paramObj11 = size;
251
252 if (size == null) {
253 paramObj11 = new NullWrapper("java.lang.String");
254 }
255
256 MethodWrapper methodWrapper = new MethodWrapper(CompanyServiceUtil.class.getName(),
257 "updateCompany",
258 new Object[] {
259 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
260 paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
261 paramObj10, paramObj11
262 });
263
264 Object returnObj = null;
265
266 try {
267 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
268 }
269 catch (Exception e) {
270 if (e instanceof com.liferay.portal.SystemException) {
271 throw (com.liferay.portal.SystemException)e;
272 }
273
274 if (e instanceof com.liferay.portal.PortalException) {
275 throw (com.liferay.portal.PortalException)e;
276 }
277
278 throw new com.liferay.portal.SystemException(e);
279 }
280
281 return (com.liferay.portal.model.Company)returnObj;
282 }
283 catch (com.liferay.portal.SystemException se) {
284 _log.error(se, se);
285
286 throw se;
287 }
288 }
289
290 public static void updateDisplay(HttpPrincipal httpPrincipal,
291 long companyId, java.lang.String languageId, java.lang.String timeZoneId)
292 throws com.liferay.portal.SystemException,
293 com.liferay.portal.PortalException {
294 try {
295 Object paramObj0 = new LongWrapper(companyId);
296
297 Object paramObj1 = languageId;
298
299 if (languageId == null) {
300 paramObj1 = new NullWrapper("java.lang.String");
301 }
302
303 Object paramObj2 = timeZoneId;
304
305 if (timeZoneId == null) {
306 paramObj2 = new NullWrapper("java.lang.String");
307 }
308
309 MethodWrapper methodWrapper = new MethodWrapper(CompanyServiceUtil.class.getName(),
310 "updateDisplay",
311 new Object[] { paramObj0, paramObj1, paramObj2 });
312
313 try {
314 TunnelUtil.invoke(httpPrincipal, methodWrapper);
315 }
316 catch (Exception e) {
317 if (e instanceof com.liferay.portal.SystemException) {
318 throw (com.liferay.portal.SystemException)e;
319 }
320
321 if (e instanceof com.liferay.portal.PortalException) {
322 throw (com.liferay.portal.PortalException)e;
323 }
324
325 throw new com.liferay.portal.SystemException(e);
326 }
327 }
328 catch (com.liferay.portal.SystemException se) {
329 _log.error(se, se);
330
331 throw se;
332 }
333 }
334
335 public static void updateLogo(HttpPrincipal httpPrincipal, long companyId,
336 java.io.File file)
337 throws com.liferay.portal.SystemException,
338 com.liferay.portal.PortalException {
339 try {
340 Object paramObj0 = new LongWrapper(companyId);
341
342 Object paramObj1 = file;
343
344 if (file == null) {
345 paramObj1 = new NullWrapper("java.io.File");
346 }
347
348 MethodWrapper methodWrapper = new MethodWrapper(CompanyServiceUtil.class.getName(),
349 "updateLogo", new Object[] { paramObj0, paramObj1 });
350
351 try {
352 TunnelUtil.invoke(httpPrincipal, methodWrapper);
353 }
354 catch (Exception e) {
355 if (e instanceof com.liferay.portal.SystemException) {
356 throw (com.liferay.portal.SystemException)e;
357 }
358
359 if (e instanceof com.liferay.portal.PortalException) {
360 throw (com.liferay.portal.PortalException)e;
361 }
362
363 throw new com.liferay.portal.SystemException(e);
364 }
365 }
366 catch (com.liferay.portal.SystemException se) {
367 _log.error(se, se);
368
369 throw se;
370 }
371 }
372
373 public static void updateSecurity(HttpPrincipal httpPrincipal,
374 long companyId, java.lang.String authType, boolean autoLogin,
375 boolean sendPassword, boolean strangers, boolean strangersWithMx,
376 boolean strangersVerify, boolean communityLogo)
377 throws com.liferay.portal.SystemException,
378 com.liferay.portal.PortalException {
379 try {
380 Object paramObj0 = new LongWrapper(companyId);
381
382 Object paramObj1 = authType;
383
384 if (authType == null) {
385 paramObj1 = new NullWrapper("java.lang.String");
386 }
387
388 Object paramObj2 = new BooleanWrapper(autoLogin);
389
390 Object paramObj3 = new BooleanWrapper(sendPassword);
391
392 Object paramObj4 = new BooleanWrapper(strangers);
393
394 Object paramObj5 = new BooleanWrapper(strangersWithMx);
395
396 Object paramObj6 = new BooleanWrapper(strangersVerify);
397
398 Object paramObj7 = new BooleanWrapper(communityLogo);
399
400 MethodWrapper methodWrapper = new MethodWrapper(CompanyServiceUtil.class.getName(),
401 "updateSecurity",
402 new Object[] {
403 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
404 paramObj5, paramObj6, paramObj7
405 });
406
407 try {
408 TunnelUtil.invoke(httpPrincipal, methodWrapper);
409 }
410 catch (Exception e) {
411 if (e instanceof com.liferay.portal.SystemException) {
412 throw (com.liferay.portal.SystemException)e;
413 }
414
415 if (e instanceof com.liferay.portal.PortalException) {
416 throw (com.liferay.portal.PortalException)e;
417 }
418
419 throw new com.liferay.portal.SystemException(e);
420 }
421 }
422 catch (com.liferay.portal.SystemException se) {
423 _log.error(se, se);
424
425 throw se;
426 }
427 }
428
429 private static Log _log = LogFactoryUtil.getLog(CompanyServiceHttp.class);
430 }