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.IntegerWrapper;
21 import com.liferay.portal.kernel.util.LongWrapper;
22 import com.liferay.portal.kernel.util.MethodWrapper;
23 import com.liferay.portal.kernel.util.NullWrapper;
24 import com.liferay.portal.security.auth.HttpPrincipal;
25 import com.liferay.portal.service.CompanyServiceUtil;
26
27
64 public class CompanyServiceHttp {
65 public static com.liferay.portal.model.Company addCompany(
66 HttpPrincipal httpPrincipal, java.lang.String webId,
67 java.lang.String virtualHost, java.lang.String mx,
68 java.lang.String shardName, boolean system, int maxUsers)
69 throws com.liferay.portal.kernel.exception.PortalException,
70 com.liferay.portal.kernel.exception.SystemException {
71 try {
72 Object paramObj0 = webId;
73
74 if (webId == null) {
75 paramObj0 = new NullWrapper("java.lang.String");
76 }
77
78 Object paramObj1 = virtualHost;
79
80 if (virtualHost == null) {
81 paramObj1 = new NullWrapper("java.lang.String");
82 }
83
84 Object paramObj2 = mx;
85
86 if (mx == null) {
87 paramObj2 = new NullWrapper("java.lang.String");
88 }
89
90 Object paramObj3 = shardName;
91
92 if (shardName == null) {
93 paramObj3 = new NullWrapper("java.lang.String");
94 }
95
96 Object paramObj4 = new BooleanWrapper(system);
97
98 Object paramObj5 = new IntegerWrapper(maxUsers);
99
100 MethodWrapper methodWrapper = new MethodWrapper(CompanyServiceUtil.class.getName(),
101 "addCompany",
102 new Object[] {
103 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
104 paramObj5
105 });
106
107 Object returnObj = null;
108
109 try {
110 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
111 }
112 catch (Exception e) {
113 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
114 throw (com.liferay.portal.kernel.exception.PortalException)e;
115 }
116
117 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
118 throw (com.liferay.portal.kernel.exception.SystemException)e;
119 }
120
121 throw new com.liferay.portal.kernel.exception.SystemException(e);
122 }
123
124 return (com.liferay.portal.model.Company)returnObj;
125 }
126 catch (com.liferay.portal.kernel.exception.SystemException se) {
127 _log.error(se, se);
128
129 throw se;
130 }
131 }
132
133 public static void deleteLogo(HttpPrincipal httpPrincipal, long companyId)
134 throws com.liferay.portal.kernel.exception.PortalException,
135 com.liferay.portal.kernel.exception.SystemException {
136 try {
137 Object paramObj0 = new LongWrapper(companyId);
138
139 MethodWrapper methodWrapper = new MethodWrapper(CompanyServiceUtil.class.getName(),
140 "deleteLogo", new Object[] { paramObj0 });
141
142 try {
143 TunnelUtil.invoke(httpPrincipal, methodWrapper);
144 }
145 catch (Exception e) {
146 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
147 throw (com.liferay.portal.kernel.exception.PortalException)e;
148 }
149
150 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
151 throw (com.liferay.portal.kernel.exception.SystemException)e;
152 }
153
154 throw new com.liferay.portal.kernel.exception.SystemException(e);
155 }
156 }
157 catch (com.liferay.portal.kernel.exception.SystemException se) {
158 _log.error(se, se);
159
160 throw se;
161 }
162 }
163
164 public static com.liferay.portal.model.Company getCompanyById(
165 HttpPrincipal httpPrincipal, long companyId)
166 throws com.liferay.portal.kernel.exception.PortalException,
167 com.liferay.portal.kernel.exception.SystemException {
168 try {
169 Object paramObj0 = new LongWrapper(companyId);
170
171 MethodWrapper methodWrapper = new MethodWrapper(CompanyServiceUtil.class.getName(),
172 "getCompanyById", new Object[] { paramObj0 });
173
174 Object returnObj = null;
175
176 try {
177 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
178 }
179 catch (Exception e) {
180 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
181 throw (com.liferay.portal.kernel.exception.PortalException)e;
182 }
183
184 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
185 throw (com.liferay.portal.kernel.exception.SystemException)e;
186 }
187
188 throw new com.liferay.portal.kernel.exception.SystemException(e);
189 }
190
191 return (com.liferay.portal.model.Company)returnObj;
192 }
193 catch (com.liferay.portal.kernel.exception.SystemException se) {
194 _log.error(se, se);
195
196 throw se;
197 }
198 }
199
200 public static com.liferay.portal.model.Company getCompanyByLogoId(
201 HttpPrincipal httpPrincipal, long logoId)
202 throws com.liferay.portal.kernel.exception.PortalException,
203 com.liferay.portal.kernel.exception.SystemException {
204 try {
205 Object paramObj0 = new LongWrapper(logoId);
206
207 MethodWrapper methodWrapper = new MethodWrapper(CompanyServiceUtil.class.getName(),
208 "getCompanyByLogoId", new Object[] { paramObj0 });
209
210 Object returnObj = null;
211
212 try {
213 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
214 }
215 catch (Exception e) {
216 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
217 throw (com.liferay.portal.kernel.exception.PortalException)e;
218 }
219
220 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
221 throw (com.liferay.portal.kernel.exception.SystemException)e;
222 }
223
224 throw new com.liferay.portal.kernel.exception.SystemException(e);
225 }
226
227 return (com.liferay.portal.model.Company)returnObj;
228 }
229 catch (com.liferay.portal.kernel.exception.SystemException se) {
230 _log.error(se, se);
231
232 throw se;
233 }
234 }
235
236 public static com.liferay.portal.model.Company getCompanyByMx(
237 HttpPrincipal httpPrincipal, java.lang.String mx)
238 throws com.liferay.portal.kernel.exception.PortalException,
239 com.liferay.portal.kernel.exception.SystemException {
240 try {
241 Object paramObj0 = mx;
242
243 if (mx == null) {
244 paramObj0 = new NullWrapper("java.lang.String");
245 }
246
247 MethodWrapper methodWrapper = new MethodWrapper(CompanyServiceUtil.class.getName(),
248 "getCompanyByMx", new Object[] { paramObj0 });
249
250 Object returnObj = null;
251
252 try {
253 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
254 }
255 catch (Exception e) {
256 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
257 throw (com.liferay.portal.kernel.exception.PortalException)e;
258 }
259
260 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
261 throw (com.liferay.portal.kernel.exception.SystemException)e;
262 }
263
264 throw new com.liferay.portal.kernel.exception.SystemException(e);
265 }
266
267 return (com.liferay.portal.model.Company)returnObj;
268 }
269 catch (com.liferay.portal.kernel.exception.SystemException se) {
270 _log.error(se, se);
271
272 throw se;
273 }
274 }
275
276 public static com.liferay.portal.model.Company getCompanyByVirtualHost(
277 HttpPrincipal httpPrincipal, java.lang.String virtualHost)
278 throws com.liferay.portal.kernel.exception.PortalException,
279 com.liferay.portal.kernel.exception.SystemException {
280 try {
281 Object paramObj0 = virtualHost;
282
283 if (virtualHost == null) {
284 paramObj0 = new NullWrapper("java.lang.String");
285 }
286
287 MethodWrapper methodWrapper = new MethodWrapper(CompanyServiceUtil.class.getName(),
288 "getCompanyByVirtualHost", new Object[] { paramObj0 });
289
290 Object returnObj = null;
291
292 try {
293 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
294 }
295 catch (Exception e) {
296 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
297 throw (com.liferay.portal.kernel.exception.PortalException)e;
298 }
299
300 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
301 throw (com.liferay.portal.kernel.exception.SystemException)e;
302 }
303
304 throw new com.liferay.portal.kernel.exception.SystemException(e);
305 }
306
307 return (com.liferay.portal.model.Company)returnObj;
308 }
309 catch (com.liferay.portal.kernel.exception.SystemException se) {
310 _log.error(se, se);
311
312 throw se;
313 }
314 }
315
316 public static com.liferay.portal.model.Company getCompanyByWebId(
317 HttpPrincipal httpPrincipal, java.lang.String webId)
318 throws com.liferay.portal.kernel.exception.PortalException,
319 com.liferay.portal.kernel.exception.SystemException {
320 try {
321 Object paramObj0 = webId;
322
323 if (webId == null) {
324 paramObj0 = new NullWrapper("java.lang.String");
325 }
326
327 MethodWrapper methodWrapper = new MethodWrapper(CompanyServiceUtil.class.getName(),
328 "getCompanyByWebId", new Object[] { paramObj0 });
329
330 Object returnObj = null;
331
332 try {
333 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
334 }
335 catch (Exception e) {
336 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
337 throw (com.liferay.portal.kernel.exception.PortalException)e;
338 }
339
340 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
341 throw (com.liferay.portal.kernel.exception.SystemException)e;
342 }
343
344 throw new com.liferay.portal.kernel.exception.SystemException(e);
345 }
346
347 return (com.liferay.portal.model.Company)returnObj;
348 }
349 catch (com.liferay.portal.kernel.exception.SystemException se) {
350 _log.error(se, se);
351
352 throw se;
353 }
354 }
355
356 public static void removePreferences(HttpPrincipal httpPrincipal,
357 long companyId, java.lang.String[] keys)
358 throws com.liferay.portal.kernel.exception.PortalException,
359 com.liferay.portal.kernel.exception.SystemException {
360 try {
361 Object paramObj0 = new LongWrapper(companyId);
362
363 Object paramObj1 = keys;
364
365 if (keys == null) {
366 paramObj1 = new NullWrapper("[Ljava.lang.String;");
367 }
368
369 MethodWrapper methodWrapper = new MethodWrapper(CompanyServiceUtil.class.getName(),
370 "removePreferences", new Object[] { paramObj0, paramObj1 });
371
372 try {
373 TunnelUtil.invoke(httpPrincipal, methodWrapper);
374 }
375 catch (Exception e) {
376 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
377 throw (com.liferay.portal.kernel.exception.PortalException)e;
378 }
379
380 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
381 throw (com.liferay.portal.kernel.exception.SystemException)e;
382 }
383
384 throw new com.liferay.portal.kernel.exception.SystemException(e);
385 }
386 }
387 catch (com.liferay.portal.kernel.exception.SystemException se) {
388 _log.error(se, se);
389
390 throw se;
391 }
392 }
393
394 public static com.liferay.portal.model.Company updateCompany(
395 HttpPrincipal httpPrincipal, long companyId,
396 java.lang.String virtualHost, java.lang.String mx, int maxUsers)
397 throws com.liferay.portal.kernel.exception.PortalException,
398 com.liferay.portal.kernel.exception.SystemException {
399 try {
400 Object paramObj0 = new LongWrapper(companyId);
401
402 Object paramObj1 = virtualHost;
403
404 if (virtualHost == null) {
405 paramObj1 = new NullWrapper("java.lang.String");
406 }
407
408 Object paramObj2 = mx;
409
410 if (mx == null) {
411 paramObj2 = new NullWrapper("java.lang.String");
412 }
413
414 Object paramObj3 = new IntegerWrapper(maxUsers);
415
416 MethodWrapper methodWrapper = new MethodWrapper(CompanyServiceUtil.class.getName(),
417 "updateCompany",
418 new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
419
420 Object returnObj = null;
421
422 try {
423 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
424 }
425 catch (Exception e) {
426 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
427 throw (com.liferay.portal.kernel.exception.PortalException)e;
428 }
429
430 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
431 throw (com.liferay.portal.kernel.exception.SystemException)e;
432 }
433
434 throw new com.liferay.portal.kernel.exception.SystemException(e);
435 }
436
437 return (com.liferay.portal.model.Company)returnObj;
438 }
439 catch (com.liferay.portal.kernel.exception.SystemException se) {
440 _log.error(se, se);
441
442 throw se;
443 }
444 }
445
446 public static com.liferay.portal.model.Company updateCompany(
447 HttpPrincipal httpPrincipal, long companyId,
448 java.lang.String virtualHost, java.lang.String mx,
449 java.lang.String homeURL, java.lang.String name,
450 java.lang.String legalName, java.lang.String legalId,
451 java.lang.String legalType, java.lang.String sicCode,
452 java.lang.String tickerSymbol, java.lang.String industry,
453 java.lang.String type, java.lang.String size)
454 throws com.liferay.portal.kernel.exception.PortalException,
455 com.liferay.portal.kernel.exception.SystemException {
456 try {
457 Object paramObj0 = new LongWrapper(companyId);
458
459 Object paramObj1 = virtualHost;
460
461 if (virtualHost == null) {
462 paramObj1 = new NullWrapper("java.lang.String");
463 }
464
465 Object paramObj2 = mx;
466
467 if (mx == null) {
468 paramObj2 = new NullWrapper("java.lang.String");
469 }
470
471 Object paramObj3 = homeURL;
472
473 if (homeURL == null) {
474 paramObj3 = new NullWrapper("java.lang.String");
475 }
476
477 Object paramObj4 = name;
478
479 if (name == null) {
480 paramObj4 = new NullWrapper("java.lang.String");
481 }
482
483 Object paramObj5 = legalName;
484
485 if (legalName == null) {
486 paramObj5 = new NullWrapper("java.lang.String");
487 }
488
489 Object paramObj6 = legalId;
490
491 if (legalId == null) {
492 paramObj6 = new NullWrapper("java.lang.String");
493 }
494
495 Object paramObj7 = legalType;
496
497 if (legalType == null) {
498 paramObj7 = new NullWrapper("java.lang.String");
499 }
500
501 Object paramObj8 = sicCode;
502
503 if (sicCode == null) {
504 paramObj8 = new NullWrapper("java.lang.String");
505 }
506
507 Object paramObj9 = tickerSymbol;
508
509 if (tickerSymbol == null) {
510 paramObj9 = new NullWrapper("java.lang.String");
511 }
512
513 Object paramObj10 = industry;
514
515 if (industry == null) {
516 paramObj10 = new NullWrapper("java.lang.String");
517 }
518
519 Object paramObj11 = type;
520
521 if (type == null) {
522 paramObj11 = new NullWrapper("java.lang.String");
523 }
524
525 Object paramObj12 = size;
526
527 if (size == null) {
528 paramObj12 = new NullWrapper("java.lang.String");
529 }
530
531 MethodWrapper methodWrapper = new MethodWrapper(CompanyServiceUtil.class.getName(),
532 "updateCompany",
533 new Object[] {
534 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
535 paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
536 paramObj10, paramObj11, paramObj12
537 });
538
539 Object returnObj = null;
540
541 try {
542 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
543 }
544 catch (Exception e) {
545 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
546 throw (com.liferay.portal.kernel.exception.PortalException)e;
547 }
548
549 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
550 throw (com.liferay.portal.kernel.exception.SystemException)e;
551 }
552
553 throw new com.liferay.portal.kernel.exception.SystemException(e);
554 }
555
556 return (com.liferay.portal.model.Company)returnObj;
557 }
558 catch (com.liferay.portal.kernel.exception.SystemException se) {
559 _log.error(se, se);
560
561 throw se;
562 }
563 }
564
565 public static com.liferay.portal.model.Company updateCompany(
566 HttpPrincipal httpPrincipal, long companyId,
567 java.lang.String virtualHost, java.lang.String mx,
568 java.lang.String homeURL, java.lang.String name,
569 java.lang.String legalName, java.lang.String legalId,
570 java.lang.String legalType, java.lang.String sicCode,
571 java.lang.String tickerSymbol, java.lang.String industry,
572 java.lang.String type, java.lang.String size,
573 java.lang.String languageId, java.lang.String timeZoneId,
574 java.util.List<com.liferay.portal.model.Address> addresses,
575 java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
576 java.util.List<com.liferay.portal.model.Phone> phones,
577 java.util.List<com.liferay.portal.model.Website> websites,
578 com.liferay.portal.kernel.util.UnicodeProperties properties)
579 throws com.liferay.portal.kernel.exception.PortalException,
580 com.liferay.portal.kernel.exception.SystemException {
581 try {
582 Object paramObj0 = new LongWrapper(companyId);
583
584 Object paramObj1 = virtualHost;
585
586 if (virtualHost == null) {
587 paramObj1 = new NullWrapper("java.lang.String");
588 }
589
590 Object paramObj2 = mx;
591
592 if (mx == null) {
593 paramObj2 = new NullWrapper("java.lang.String");
594 }
595
596 Object paramObj3 = homeURL;
597
598 if (homeURL == null) {
599 paramObj3 = new NullWrapper("java.lang.String");
600 }
601
602 Object paramObj4 = name;
603
604 if (name == null) {
605 paramObj4 = new NullWrapper("java.lang.String");
606 }
607
608 Object paramObj5 = legalName;
609
610 if (legalName == null) {
611 paramObj5 = new NullWrapper("java.lang.String");
612 }
613
614 Object paramObj6 = legalId;
615
616 if (legalId == null) {
617 paramObj6 = new NullWrapper("java.lang.String");
618 }
619
620 Object paramObj7 = legalType;
621
622 if (legalType == null) {
623 paramObj7 = new NullWrapper("java.lang.String");
624 }
625
626 Object paramObj8 = sicCode;
627
628 if (sicCode == null) {
629 paramObj8 = new NullWrapper("java.lang.String");
630 }
631
632 Object paramObj9 = tickerSymbol;
633
634 if (tickerSymbol == null) {
635 paramObj9 = new NullWrapper("java.lang.String");
636 }
637
638 Object paramObj10 = industry;
639
640 if (industry == null) {
641 paramObj10 = new NullWrapper("java.lang.String");
642 }
643
644 Object paramObj11 = type;
645
646 if (type == null) {
647 paramObj11 = new NullWrapper("java.lang.String");
648 }
649
650 Object paramObj12 = size;
651
652 if (size == null) {
653 paramObj12 = new NullWrapper("java.lang.String");
654 }
655
656 Object paramObj13 = languageId;
657
658 if (languageId == null) {
659 paramObj13 = new NullWrapper("java.lang.String");
660 }
661
662 Object paramObj14 = timeZoneId;
663
664 if (timeZoneId == null) {
665 paramObj14 = new NullWrapper("java.lang.String");
666 }
667
668 Object paramObj15 = addresses;
669
670 if (addresses == null) {
671 paramObj15 = new NullWrapper("java.util.List");
672 }
673
674 Object paramObj16 = emailAddresses;
675
676 if (emailAddresses == null) {
677 paramObj16 = new NullWrapper("java.util.List");
678 }
679
680 Object paramObj17 = phones;
681
682 if (phones == null) {
683 paramObj17 = new NullWrapper("java.util.List");
684 }
685
686 Object paramObj18 = websites;
687
688 if (websites == null) {
689 paramObj18 = new NullWrapper("java.util.List");
690 }
691
692 Object paramObj19 = properties;
693
694 if (properties == null) {
695 paramObj19 = new NullWrapper(
696 "com.liferay.portal.kernel.util.UnicodeProperties");
697 }
698
699 MethodWrapper methodWrapper = new MethodWrapper(CompanyServiceUtil.class.getName(),
700 "updateCompany",
701 new Object[] {
702 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
703 paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
704 paramObj10, paramObj11, paramObj12, paramObj13,
705 paramObj14, paramObj15, paramObj16, paramObj17,
706 paramObj18, paramObj19
707 });
708
709 Object returnObj = null;
710
711 try {
712 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
713 }
714 catch (Exception e) {
715 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
716 throw (com.liferay.portal.kernel.exception.PortalException)e;
717 }
718
719 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
720 throw (com.liferay.portal.kernel.exception.SystemException)e;
721 }
722
723 throw new com.liferay.portal.kernel.exception.SystemException(e);
724 }
725
726 return (com.liferay.portal.model.Company)returnObj;
727 }
728 catch (com.liferay.portal.kernel.exception.SystemException se) {
729 _log.error(se, se);
730
731 throw se;
732 }
733 }
734
735 public static void updateDisplay(HttpPrincipal httpPrincipal,
736 long companyId, java.lang.String languageId, java.lang.String timeZoneId)
737 throws com.liferay.portal.kernel.exception.PortalException,
738 com.liferay.portal.kernel.exception.SystemException {
739 try {
740 Object paramObj0 = new LongWrapper(companyId);
741
742 Object paramObj1 = languageId;
743
744 if (languageId == null) {
745 paramObj1 = new NullWrapper("java.lang.String");
746 }
747
748 Object paramObj2 = timeZoneId;
749
750 if (timeZoneId == null) {
751 paramObj2 = new NullWrapper("java.lang.String");
752 }
753
754 MethodWrapper methodWrapper = new MethodWrapper(CompanyServiceUtil.class.getName(),
755 "updateDisplay",
756 new Object[] { paramObj0, paramObj1, paramObj2 });
757
758 try {
759 TunnelUtil.invoke(httpPrincipal, methodWrapper);
760 }
761 catch (Exception e) {
762 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
763 throw (com.liferay.portal.kernel.exception.PortalException)e;
764 }
765
766 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
767 throw (com.liferay.portal.kernel.exception.SystemException)e;
768 }
769
770 throw new com.liferay.portal.kernel.exception.SystemException(e);
771 }
772 }
773 catch (com.liferay.portal.kernel.exception.SystemException se) {
774 _log.error(se, se);
775
776 throw se;
777 }
778 }
779
780 public static void updateLogo(HttpPrincipal httpPrincipal, long companyId,
781 java.io.File file)
782 throws com.liferay.portal.kernel.exception.PortalException,
783 com.liferay.portal.kernel.exception.SystemException {
784 try {
785 Object paramObj0 = new LongWrapper(companyId);
786
787 Object paramObj1 = file;
788
789 if (file == null) {
790 paramObj1 = new NullWrapper("java.io.File");
791 }
792
793 MethodWrapper methodWrapper = new MethodWrapper(CompanyServiceUtil.class.getName(),
794 "updateLogo", new Object[] { paramObj0, paramObj1 });
795
796 try {
797 TunnelUtil.invoke(httpPrincipal, methodWrapper);
798 }
799 catch (Exception e) {
800 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
801 throw (com.liferay.portal.kernel.exception.PortalException)e;
802 }
803
804 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
805 throw (com.liferay.portal.kernel.exception.SystemException)e;
806 }
807
808 throw new com.liferay.portal.kernel.exception.SystemException(e);
809 }
810 }
811 catch (com.liferay.portal.kernel.exception.SystemException se) {
812 _log.error(se, se);
813
814 throw se;
815 }
816 }
817
818 public static void updatePreferences(HttpPrincipal httpPrincipal,
819 long companyId,
820 com.liferay.portal.kernel.util.UnicodeProperties properties)
821 throws com.liferay.portal.kernel.exception.PortalException,
822 com.liferay.portal.kernel.exception.SystemException {
823 try {
824 Object paramObj0 = new LongWrapper(companyId);
825
826 Object paramObj1 = properties;
827
828 if (properties == null) {
829 paramObj1 = new NullWrapper(
830 "com.liferay.portal.kernel.util.UnicodeProperties");
831 }
832
833 MethodWrapper methodWrapper = new MethodWrapper(CompanyServiceUtil.class.getName(),
834 "updatePreferences", new Object[] { paramObj0, paramObj1 });
835
836 try {
837 TunnelUtil.invoke(httpPrincipal, methodWrapper);
838 }
839 catch (Exception e) {
840 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
841 throw (com.liferay.portal.kernel.exception.PortalException)e;
842 }
843
844 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
845 throw (com.liferay.portal.kernel.exception.SystemException)e;
846 }
847
848 throw new com.liferay.portal.kernel.exception.SystemException(e);
849 }
850 }
851 catch (com.liferay.portal.kernel.exception.SystemException se) {
852 _log.error(se, se);
853
854 throw se;
855 }
856 }
857
858 public static void updateSecurity(HttpPrincipal httpPrincipal,
859 long companyId, java.lang.String authType, boolean autoLogin,
860 boolean sendPassword, boolean strangers, boolean strangersWithMx,
861 boolean strangersVerify, boolean communityLogo)
862 throws com.liferay.portal.kernel.exception.PortalException,
863 com.liferay.portal.kernel.exception.SystemException {
864 try {
865 Object paramObj0 = new LongWrapper(companyId);
866
867 Object paramObj1 = authType;
868
869 if (authType == null) {
870 paramObj1 = new NullWrapper("java.lang.String");
871 }
872
873 Object paramObj2 = new BooleanWrapper(autoLogin);
874
875 Object paramObj3 = new BooleanWrapper(sendPassword);
876
877 Object paramObj4 = new BooleanWrapper(strangers);
878
879 Object paramObj5 = new BooleanWrapper(strangersWithMx);
880
881 Object paramObj6 = new BooleanWrapper(strangersVerify);
882
883 Object paramObj7 = new BooleanWrapper(communityLogo);
884
885 MethodWrapper methodWrapper = new MethodWrapper(CompanyServiceUtil.class.getName(),
886 "updateSecurity",
887 new Object[] {
888 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
889 paramObj5, paramObj6, paramObj7
890 });
891
892 try {
893 TunnelUtil.invoke(httpPrincipal, methodWrapper);
894 }
895 catch (Exception e) {
896 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
897 throw (com.liferay.portal.kernel.exception.PortalException)e;
898 }
899
900 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
901 throw (com.liferay.portal.kernel.exception.SystemException)e;
902 }
903
904 throw new com.liferay.portal.kernel.exception.SystemException(e);
905 }
906 }
907 catch (com.liferay.portal.kernel.exception.SystemException se) {
908 _log.error(se, se);
909
910 throw se;
911 }
912 }
913
914 private static Log _log = LogFactoryUtil.getLog(CompanyServiceHttp.class);
915 }