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