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