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