1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
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  /**
35   * <a href="CompanyServiceHttp.java.html"><b><i>View Source</i></b></a>
36   *
37   * <p>
38   * ServiceBuilder generated this class. Modifications in this class will be
39   * overwritten the next time is generated.
40   * </p>
41   *
42   * <p>
43   * This class provides a HTTP utility for the
44   * <code>com.liferay.portal.service.CompanyServiceUtil</code> service
45   * utility. The static methods of this class calls the same methods of the
46   * service utility. However, the signatures are different because it requires an
47   * additional <code>com.liferay.portal.security.auth.HttpPrincipal</code>
48   * parameter.
49   * </p>
50   *
51   * <p>
52   * The benefits of using the HTTP utility is that it is fast and allows for
53   * tunneling without the cost of serializing to text. The drawback is that it
54   * only works with Java.
55   * </p>
56   *
57   * <p>
58   * Set the property <code>tunnel.servlet.hosts.allowed</code> in
59   * portal.properties to configure security.
60   * </p>
61   *
62   * <p>
63   * The HTTP utility is only generated for remote services.
64   * </p>
65   *
66   * @author Brian Wing Shun Chan
67   *
68   * @see com.liferay.portal.security.auth.HttpPrincipal
69   * @see com.liferay.portal.service.CompanyServiceUtil
70   * @see com.liferay.portal.service.http.CompanyServiceSoap
71   *
72   */
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.PortalException,
78              com.liferay.portal.SystemException {
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.PortalException) {
109                     throw (com.liferay.portal.PortalException)e;
110                 }
111 
112                 if (e instanceof com.liferay.portal.SystemException) {
113                     throw (com.liferay.portal.SystemException)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 getCompanyById(
129         HttpPrincipal httpPrincipal, long companyId)
130         throws com.liferay.portal.PortalException,
131             com.liferay.portal.SystemException {
132         try {
133             Object paramObj0 = new LongWrapper(companyId);
134 
135             MethodWrapper methodWrapper = new MethodWrapper(CompanyServiceUtil.class.getName(),
136                     "getCompanyById", new Object[] { paramObj0 });
137 
138             Object returnObj = null;
139 
140             try {
141                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
142             }
143             catch (Exception e) {
144                 if (e instanceof com.liferay.portal.PortalException) {
145                     throw (com.liferay.portal.PortalException)e;
146                 }
147 
148                 if (e instanceof com.liferay.portal.SystemException) {
149                     throw (com.liferay.portal.SystemException)e;
150                 }
151 
152                 throw new com.liferay.portal.SystemException(e);
153             }
154 
155             return (com.liferay.portal.model.Company)returnObj;
156         }
157         catch (com.liferay.portal.SystemException se) {
158             _log.error(se, se);
159 
160             throw se;
161         }
162     }
163 
164     public static com.liferay.portal.model.Company getCompanyByLogoId(
165         HttpPrincipal httpPrincipal, long logoId)
166         throws com.liferay.portal.PortalException,
167             com.liferay.portal.SystemException {
168         try {
169             Object paramObj0 = new LongWrapper(logoId);
170 
171             MethodWrapper methodWrapper = new MethodWrapper(CompanyServiceUtil.class.getName(),
172                     "getCompanyByLogoId", 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.PortalException) {
181                     throw (com.liferay.portal.PortalException)e;
182                 }
183 
184                 if (e instanceof com.liferay.portal.SystemException) {
185                     throw (com.liferay.portal.SystemException)e;
186                 }
187 
188                 throw new com.liferay.portal.SystemException(e);
189             }
190 
191             return (com.liferay.portal.model.Company)returnObj;
192         }
193         catch (com.liferay.portal.SystemException se) {
194             _log.error(se, se);
195 
196             throw se;
197         }
198     }
199 
200     public static com.liferay.portal.model.Company getCompanyByMx(
201         HttpPrincipal httpPrincipal, java.lang.String mx)
202         throws com.liferay.portal.PortalException,
203             com.liferay.portal.SystemException {
204         try {
205             Object paramObj0 = mx;
206 
207             if (mx == null) {
208                 paramObj0 = new NullWrapper("java.lang.String");
209             }
210 
211             MethodWrapper methodWrapper = new MethodWrapper(CompanyServiceUtil.class.getName(),
212                     "getCompanyByMx", new Object[] { paramObj0 });
213 
214             Object returnObj = null;
215 
216             try {
217                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
218             }
219             catch (Exception e) {
220                 if (e instanceof com.liferay.portal.PortalException) {
221                     throw (com.liferay.portal.PortalException)e;
222                 }
223 
224                 if (e instanceof com.liferay.portal.SystemException) {
225                     throw (com.liferay.portal.SystemException)e;
226                 }
227 
228                 throw new com.liferay.portal.SystemException(e);
229             }
230 
231             return (com.liferay.portal.model.Company)returnObj;
232         }
233         catch (com.liferay.portal.SystemException se) {
234             _log.error(se, se);
235 
236             throw se;
237         }
238     }
239 
240     public static com.liferay.portal.model.Company getCompanyByVirtualHost(
241         HttpPrincipal httpPrincipal, java.lang.String virtualHost)
242         throws com.liferay.portal.PortalException,
243             com.liferay.portal.SystemException {
244         try {
245             Object paramObj0 = virtualHost;
246 
247             if (virtualHost == null) {
248                 paramObj0 = new NullWrapper("java.lang.String");
249             }
250 
251             MethodWrapper methodWrapper = new MethodWrapper(CompanyServiceUtil.class.getName(),
252                     "getCompanyByVirtualHost", new Object[] { paramObj0 });
253 
254             Object returnObj = null;
255 
256             try {
257                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
258             }
259             catch (Exception e) {
260                 if (e instanceof com.liferay.portal.PortalException) {
261                     throw (com.liferay.portal.PortalException)e;
262                 }
263 
264                 if (e instanceof com.liferay.portal.SystemException) {
265                     throw (com.liferay.portal.SystemException)e;
266                 }
267 
268                 throw new com.liferay.portal.SystemException(e);
269             }
270 
271             return (com.liferay.portal.model.Company)returnObj;
272         }
273         catch (com.liferay.portal.SystemException se) {
274             _log.error(se, se);
275 
276             throw se;
277         }
278     }
279 
280     public static com.liferay.portal.model.Company getCompanyByWebId(
281         HttpPrincipal httpPrincipal, java.lang.String webId)
282         throws com.liferay.portal.PortalException,
283             com.liferay.portal.SystemException {
284         try {
285             Object paramObj0 = webId;
286 
287             if (webId == null) {
288                 paramObj0 = new NullWrapper("java.lang.String");
289             }
290 
291             MethodWrapper methodWrapper = new MethodWrapper(CompanyServiceUtil.class.getName(),
292                     "getCompanyByWebId", new Object[] { paramObj0 });
293 
294             Object returnObj = null;
295 
296             try {
297                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
298             }
299             catch (Exception e) {
300                 if (e instanceof com.liferay.portal.PortalException) {
301                     throw (com.liferay.portal.PortalException)e;
302                 }
303 
304                 if (e instanceof com.liferay.portal.SystemException) {
305                     throw (com.liferay.portal.SystemException)e;
306                 }
307 
308                 throw new com.liferay.portal.SystemException(e);
309             }
310 
311             return (com.liferay.portal.model.Company)returnObj;
312         }
313         catch (com.liferay.portal.SystemException se) {
314             _log.error(se, se);
315 
316             throw se;
317         }
318     }
319 
320     public static com.liferay.portal.model.Company updateCompany(
321         HttpPrincipal httpPrincipal, long companyId,
322         java.lang.String virtualHost, java.lang.String mx)
323         throws com.liferay.portal.PortalException,
324             com.liferay.portal.SystemException {
325         try {
326             Object paramObj0 = new LongWrapper(companyId);
327 
328             Object paramObj1 = virtualHost;
329 
330             if (virtualHost == null) {
331                 paramObj1 = new NullWrapper("java.lang.String");
332             }
333 
334             Object paramObj2 = mx;
335 
336             if (mx == null) {
337                 paramObj2 = new NullWrapper("java.lang.String");
338             }
339 
340             MethodWrapper methodWrapper = new MethodWrapper(CompanyServiceUtil.class.getName(),
341                     "updateCompany",
342                     new Object[] { paramObj0, paramObj1, paramObj2 });
343 
344             Object returnObj = null;
345 
346             try {
347                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
348             }
349             catch (Exception e) {
350                 if (e instanceof com.liferay.portal.PortalException) {
351                     throw (com.liferay.portal.PortalException)e;
352                 }
353 
354                 if (e instanceof com.liferay.portal.SystemException) {
355                     throw (com.liferay.portal.SystemException)e;
356                 }
357 
358                 throw new com.liferay.portal.SystemException(e);
359             }
360 
361             return (com.liferay.portal.model.Company)returnObj;
362         }
363         catch (com.liferay.portal.SystemException se) {
364             _log.error(se, se);
365 
366             throw se;
367         }
368     }
369 
370     public static com.liferay.portal.model.Company updateCompany(
371         HttpPrincipal httpPrincipal, long companyId,
372         java.lang.String virtualHost, java.lang.String mx,
373         java.lang.String homeURL, java.lang.String name,
374         java.lang.String legalName, java.lang.String legalId,
375         java.lang.String legalType, java.lang.String sicCode,
376         java.lang.String tickerSymbol, java.lang.String industry,
377         java.lang.String type, java.lang.String size)
378         throws com.liferay.portal.PortalException,
379             com.liferay.portal.SystemException {
380         try {
381             Object paramObj0 = new LongWrapper(companyId);
382 
383             Object paramObj1 = virtualHost;
384 
385             if (virtualHost == null) {
386                 paramObj1 = new NullWrapper("java.lang.String");
387             }
388 
389             Object paramObj2 = mx;
390 
391             if (mx == null) {
392                 paramObj2 = new NullWrapper("java.lang.String");
393             }
394 
395             Object paramObj3 = homeURL;
396 
397             if (homeURL == null) {
398                 paramObj3 = new NullWrapper("java.lang.String");
399             }
400 
401             Object paramObj4 = name;
402 
403             if (name == null) {
404                 paramObj4 = new NullWrapper("java.lang.String");
405             }
406 
407             Object paramObj5 = legalName;
408 
409             if (legalName == null) {
410                 paramObj5 = new NullWrapper("java.lang.String");
411             }
412 
413             Object paramObj6 = legalId;
414 
415             if (legalId == null) {
416                 paramObj6 = new NullWrapper("java.lang.String");
417             }
418 
419             Object paramObj7 = legalType;
420 
421             if (legalType == null) {
422                 paramObj7 = new NullWrapper("java.lang.String");
423             }
424 
425             Object paramObj8 = sicCode;
426 
427             if (sicCode == null) {
428                 paramObj8 = new NullWrapper("java.lang.String");
429             }
430 
431             Object paramObj9 = tickerSymbol;
432 
433             if (tickerSymbol == null) {
434                 paramObj9 = new NullWrapper("java.lang.String");
435             }
436 
437             Object paramObj10 = industry;
438 
439             if (industry == null) {
440                 paramObj10 = new NullWrapper("java.lang.String");
441             }
442 
443             Object paramObj11 = type;
444 
445             if (type == null) {
446                 paramObj11 = new NullWrapper("java.lang.String");
447             }
448 
449             Object paramObj12 = size;
450 
451             if (size == null) {
452                 paramObj12 = new NullWrapper("java.lang.String");
453             }
454 
455             MethodWrapper methodWrapper = new MethodWrapper(CompanyServiceUtil.class.getName(),
456                     "updateCompany",
457                     new Object[] {
458                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
459                         paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
460                         paramObj10, paramObj11, paramObj12
461                     });
462 
463             Object returnObj = null;
464 
465             try {
466                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
467             }
468             catch (Exception e) {
469                 if (e instanceof com.liferay.portal.PortalException) {
470                     throw (com.liferay.portal.PortalException)e;
471                 }
472 
473                 if (e instanceof com.liferay.portal.SystemException) {
474                     throw (com.liferay.portal.SystemException)e;
475                 }
476 
477                 throw new com.liferay.portal.SystemException(e);
478             }
479 
480             return (com.liferay.portal.model.Company)returnObj;
481         }
482         catch (com.liferay.portal.SystemException se) {
483             _log.error(se, se);
484 
485             throw se;
486         }
487     }
488 
489     public static com.liferay.portal.model.Company updateCompany(
490         HttpPrincipal httpPrincipal, long companyId,
491         java.lang.String virtualHost, java.lang.String mx,
492         java.lang.String homeURL, java.lang.String name,
493         java.lang.String legalName, java.lang.String legalId,
494         java.lang.String legalType, java.lang.String sicCode,
495         java.lang.String tickerSymbol, java.lang.String industry,
496         java.lang.String type, java.lang.String size,
497         java.lang.String languageId, java.lang.String timeZoneId,
498         java.util.List<com.liferay.portal.model.Address> addresses,
499         java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
500         java.util.List<com.liferay.portal.model.Phone> phones,
501         java.util.List<com.liferay.portal.model.Website> websites,
502         com.liferay.portal.kernel.util.UnicodeProperties properties)
503         throws com.liferay.portal.PortalException,
504             com.liferay.portal.SystemException {
505         try {
506             Object paramObj0 = new LongWrapper(companyId);
507 
508             Object paramObj1 = virtualHost;
509 
510             if (virtualHost == null) {
511                 paramObj1 = new NullWrapper("java.lang.String");
512             }
513 
514             Object paramObj2 = mx;
515 
516             if (mx == null) {
517                 paramObj2 = new NullWrapper("java.lang.String");
518             }
519 
520             Object paramObj3 = homeURL;
521 
522             if (homeURL == null) {
523                 paramObj3 = new NullWrapper("java.lang.String");
524             }
525 
526             Object paramObj4 = name;
527 
528             if (name == null) {
529                 paramObj4 = new NullWrapper("java.lang.String");
530             }
531 
532             Object paramObj5 = legalName;
533 
534             if (legalName == null) {
535                 paramObj5 = new NullWrapper("java.lang.String");
536             }
537 
538             Object paramObj6 = legalId;
539 
540             if (legalId == null) {
541                 paramObj6 = new NullWrapper("java.lang.String");
542             }
543 
544             Object paramObj7 = legalType;
545 
546             if (legalType == null) {
547                 paramObj7 = new NullWrapper("java.lang.String");
548             }
549 
550             Object paramObj8 = sicCode;
551 
552             if (sicCode == null) {
553                 paramObj8 = new NullWrapper("java.lang.String");
554             }
555 
556             Object paramObj9 = tickerSymbol;
557 
558             if (tickerSymbol == null) {
559                 paramObj9 = new NullWrapper("java.lang.String");
560             }
561 
562             Object paramObj10 = industry;
563 
564             if (industry == null) {
565                 paramObj10 = new NullWrapper("java.lang.String");
566             }
567 
568             Object paramObj11 = type;
569 
570             if (type == null) {
571                 paramObj11 = new NullWrapper("java.lang.String");
572             }
573 
574             Object paramObj12 = size;
575 
576             if (size == null) {
577                 paramObj12 = new NullWrapper("java.lang.String");
578             }
579 
580             Object paramObj13 = languageId;
581 
582             if (languageId == null) {
583                 paramObj13 = new NullWrapper("java.lang.String");
584             }
585 
586             Object paramObj14 = timeZoneId;
587 
588             if (timeZoneId == null) {
589                 paramObj14 = new NullWrapper("java.lang.String");
590             }
591 
592             Object paramObj15 = addresses;
593 
594             if (addresses == null) {
595                 paramObj15 = new NullWrapper("java.util.List");
596             }
597 
598             Object paramObj16 = emailAddresses;
599 
600             if (emailAddresses == null) {
601                 paramObj16 = new NullWrapper("java.util.List");
602             }
603 
604             Object paramObj17 = phones;
605 
606             if (phones == null) {
607                 paramObj17 = new NullWrapper("java.util.List");
608             }
609 
610             Object paramObj18 = websites;
611 
612             if (websites == null) {
613                 paramObj18 = new NullWrapper("java.util.List");
614             }
615 
616             Object paramObj19 = properties;
617 
618             if (properties == null) {
619                 paramObj19 = new NullWrapper(
620                         "com.liferay.portal.kernel.util.UnicodeProperties");
621             }
622 
623             MethodWrapper methodWrapper = new MethodWrapper(CompanyServiceUtil.class.getName(),
624                     "updateCompany",
625                     new Object[] {
626                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
627                         paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
628                         paramObj10, paramObj11, paramObj12, paramObj13,
629                         paramObj14, paramObj15, paramObj16, paramObj17,
630                         paramObj18, paramObj19
631                     });
632 
633             Object returnObj = null;
634 
635             try {
636                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
637             }
638             catch (Exception e) {
639                 if (e instanceof com.liferay.portal.PortalException) {
640                     throw (com.liferay.portal.PortalException)e;
641                 }
642 
643                 if (e instanceof com.liferay.portal.SystemException) {
644                     throw (com.liferay.portal.SystemException)e;
645                 }
646 
647                 throw new com.liferay.portal.SystemException(e);
648             }
649 
650             return (com.liferay.portal.model.Company)returnObj;
651         }
652         catch (com.liferay.portal.SystemException se) {
653             _log.error(se, se);
654 
655             throw se;
656         }
657     }
658 
659     public static void updateDisplay(HttpPrincipal httpPrincipal,
660         long companyId, java.lang.String languageId, java.lang.String timeZoneId)
661         throws com.liferay.portal.PortalException,
662             com.liferay.portal.SystemException {
663         try {
664             Object paramObj0 = new LongWrapper(companyId);
665 
666             Object paramObj1 = languageId;
667 
668             if (languageId == null) {
669                 paramObj1 = new NullWrapper("java.lang.String");
670             }
671 
672             Object paramObj2 = timeZoneId;
673 
674             if (timeZoneId == null) {
675                 paramObj2 = new NullWrapper("java.lang.String");
676             }
677 
678             MethodWrapper methodWrapper = new MethodWrapper(CompanyServiceUtil.class.getName(),
679                     "updateDisplay",
680                     new Object[] { paramObj0, paramObj1, paramObj2 });
681 
682             try {
683                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
684             }
685             catch (Exception e) {
686                 if (e instanceof com.liferay.portal.PortalException) {
687                     throw (com.liferay.portal.PortalException)e;
688                 }
689 
690                 if (e instanceof com.liferay.portal.SystemException) {
691                     throw (com.liferay.portal.SystemException)e;
692                 }
693 
694                 throw new com.liferay.portal.SystemException(e);
695             }
696         }
697         catch (com.liferay.portal.SystemException se) {
698             _log.error(se, se);
699 
700             throw se;
701         }
702     }
703 
704     public static void updateLogo(HttpPrincipal httpPrincipal, long companyId,
705         java.io.File file)
706         throws com.liferay.portal.PortalException,
707             com.liferay.portal.SystemException {
708         try {
709             Object paramObj0 = new LongWrapper(companyId);
710 
711             Object paramObj1 = file;
712 
713             if (file == null) {
714                 paramObj1 = new NullWrapper("java.io.File");
715             }
716 
717             MethodWrapper methodWrapper = new MethodWrapper(CompanyServiceUtil.class.getName(),
718                     "updateLogo", new Object[] { paramObj0, paramObj1 });
719 
720             try {
721                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
722             }
723             catch (Exception e) {
724                 if (e instanceof com.liferay.portal.PortalException) {
725                     throw (com.liferay.portal.PortalException)e;
726                 }
727 
728                 if (e instanceof com.liferay.portal.SystemException) {
729                     throw (com.liferay.portal.SystemException)e;
730                 }
731 
732                 throw new com.liferay.portal.SystemException(e);
733             }
734         }
735         catch (com.liferay.portal.SystemException se) {
736             _log.error(se, se);
737 
738             throw se;
739         }
740     }
741 
742     public static void updatePreferences(HttpPrincipal httpPrincipal,
743         long companyId,
744         com.liferay.portal.kernel.util.UnicodeProperties properties)
745         throws com.liferay.portal.PortalException,
746             com.liferay.portal.SystemException {
747         try {
748             Object paramObj0 = new LongWrapper(companyId);
749 
750             Object paramObj1 = properties;
751 
752             if (properties == null) {
753                 paramObj1 = new NullWrapper(
754                         "com.liferay.portal.kernel.util.UnicodeProperties");
755             }
756 
757             MethodWrapper methodWrapper = new MethodWrapper(CompanyServiceUtil.class.getName(),
758                     "updatePreferences", new Object[] { paramObj0, paramObj1 });
759 
760             try {
761                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
762             }
763             catch (Exception e) {
764                 if (e instanceof com.liferay.portal.PortalException) {
765                     throw (com.liferay.portal.PortalException)e;
766                 }
767 
768                 if (e instanceof com.liferay.portal.SystemException) {
769                     throw (com.liferay.portal.SystemException)e;
770                 }
771 
772                 throw new com.liferay.portal.SystemException(e);
773             }
774         }
775         catch (com.liferay.portal.SystemException se) {
776             _log.error(se, se);
777 
778             throw se;
779         }
780     }
781 
782     public static void updateSecurity(HttpPrincipal httpPrincipal,
783         long companyId, java.lang.String authType, boolean autoLogin,
784         boolean sendPassword, boolean strangers, boolean strangersWithMx,
785         boolean strangersVerify, boolean communityLogo)
786         throws com.liferay.portal.PortalException,
787             com.liferay.portal.SystemException {
788         try {
789             Object paramObj0 = new LongWrapper(companyId);
790 
791             Object paramObj1 = authType;
792 
793             if (authType == null) {
794                 paramObj1 = new NullWrapper("java.lang.String");
795             }
796 
797             Object paramObj2 = new BooleanWrapper(autoLogin);
798 
799             Object paramObj3 = new BooleanWrapper(sendPassword);
800 
801             Object paramObj4 = new BooleanWrapper(strangers);
802 
803             Object paramObj5 = new BooleanWrapper(strangersWithMx);
804 
805             Object paramObj6 = new BooleanWrapper(strangersVerify);
806 
807             Object paramObj7 = new BooleanWrapper(communityLogo);
808 
809             MethodWrapper methodWrapper = new MethodWrapper(CompanyServiceUtil.class.getName(),
810                     "updateSecurity",
811                     new Object[] {
812                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
813                         paramObj5, paramObj6, paramObj7
814                     });
815 
816             try {
817                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
818             }
819             catch (Exception e) {
820                 if (e instanceof com.liferay.portal.PortalException) {
821                     throw (com.liferay.portal.PortalException)e;
822                 }
823 
824                 if (e instanceof com.liferay.portal.SystemException) {
825                     throw (com.liferay.portal.SystemException)e;
826                 }
827 
828                 throw new com.liferay.portal.SystemException(e);
829             }
830         }
831         catch (com.liferay.portal.SystemException se) {
832             _log.error(se, se);
833 
834             throw se;
835         }
836     }
837 
838     private static Log _log = LogFactoryUtil.getLog(CompanyServiceHttp.class);
839 }