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