001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service.http;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.log.Log;
020    import com.liferay.portal.kernel.log.LogFactoryUtil;
021    import com.liferay.portal.kernel.security.auth.HttpPrincipal;
022    import com.liferay.portal.kernel.service.CompanyServiceUtil;
023    import com.liferay.portal.kernel.service.http.TunnelUtil;
024    import com.liferay.portal.kernel.util.MethodHandler;
025    import com.liferay.portal.kernel.util.MethodKey;
026    
027    /**
028     * Provides the HTTP utility for the
029     * {@link CompanyServiceUtil} service utility. The
030     * static methods of this class calls the same methods of the service utility.
031     * However, the signatures are different because it requires an additional
032     * {@link HttpPrincipal} parameter.
033     *
034     * <p>
035     * The benefits of using the HTTP utility is that it is fast and allows for
036     * tunneling without the cost of serializing to text. The drawback is that it
037     * only works with Java.
038     * </p>
039     *
040     * <p>
041     * Set the property <b>tunnel.servlet.hosts.allowed</b> in portal.properties to
042     * configure security.
043     * </p>
044     *
045     * <p>
046     * The HTTP utility is only generated for remote services.
047     * </p>
048     *
049     * @author Brian Wing Shun Chan
050     * @see CompanyServiceSoap
051     * @see HttpPrincipal
052     * @see CompanyServiceUtil
053     * @generated
054     */
055    @ProviderType
056    public class CompanyServiceHttp {
057            public static com.liferay.portal.kernel.model.Company addCompany(
058                    HttpPrincipal httpPrincipal, java.lang.String webId,
059                    java.lang.String virtualHost, java.lang.String mx, boolean system,
060                    int maxUsers, boolean active)
061                    throws com.liferay.portal.kernel.exception.PortalException {
062                    try {
063                            MethodKey methodKey = new MethodKey(CompanyServiceUtil.class,
064                                            "addCompany", _addCompanyParameterTypes0);
065    
066                            MethodHandler methodHandler = new MethodHandler(methodKey, webId,
067                                            virtualHost, mx, system, maxUsers, active);
068    
069                            Object returnObj = null;
070    
071                            try {
072                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
073                            }
074                            catch (Exception e) {
075                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
076                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
077                                    }
078    
079                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
080                            }
081    
082                            return (com.liferay.portal.kernel.model.Company)returnObj;
083                    }
084                    catch (com.liferay.portal.kernel.exception.SystemException se) {
085                            _log.error(se, se);
086    
087                            throw se;
088                    }
089            }
090    
091            public static com.liferay.portal.kernel.model.Company deleteCompany(
092                    HttpPrincipal httpPrincipal, long companyId)
093                    throws com.liferay.portal.kernel.exception.PortalException {
094                    try {
095                            MethodKey methodKey = new MethodKey(CompanyServiceUtil.class,
096                                            "deleteCompany", _deleteCompanyParameterTypes1);
097    
098                            MethodHandler methodHandler = new MethodHandler(methodKey, companyId);
099    
100                            Object returnObj = null;
101    
102                            try {
103                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
104                            }
105                            catch (Exception e) {
106                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
107                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
108                                    }
109    
110                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
111                            }
112    
113                            return (com.liferay.portal.kernel.model.Company)returnObj;
114                    }
115                    catch (com.liferay.portal.kernel.exception.SystemException se) {
116                            _log.error(se, se);
117    
118                            throw se;
119                    }
120            }
121    
122            public static void deleteLogo(HttpPrincipal httpPrincipal, long companyId)
123                    throws com.liferay.portal.kernel.exception.PortalException {
124                    try {
125                            MethodKey methodKey = new MethodKey(CompanyServiceUtil.class,
126                                            "deleteLogo", _deleteLogoParameterTypes2);
127    
128                            MethodHandler methodHandler = new MethodHandler(methodKey, companyId);
129    
130                            try {
131                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
132                            }
133                            catch (Exception e) {
134                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
135                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
136                                    }
137    
138                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
139                            }
140                    }
141                    catch (com.liferay.portal.kernel.exception.SystemException se) {
142                            _log.error(se, se);
143    
144                            throw se;
145                    }
146            }
147    
148            public static com.liferay.portal.kernel.model.Company getCompanyById(
149                    HttpPrincipal httpPrincipal, long companyId)
150                    throws com.liferay.portal.kernel.exception.PortalException {
151                    try {
152                            MethodKey methodKey = new MethodKey(CompanyServiceUtil.class,
153                                            "getCompanyById", _getCompanyByIdParameterTypes3);
154    
155                            MethodHandler methodHandler = new MethodHandler(methodKey, companyId);
156    
157                            Object returnObj = null;
158    
159                            try {
160                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
161                            }
162                            catch (Exception e) {
163                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
164                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
165                                    }
166    
167                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
168                            }
169    
170                            return (com.liferay.portal.kernel.model.Company)returnObj;
171                    }
172                    catch (com.liferay.portal.kernel.exception.SystemException se) {
173                            _log.error(se, se);
174    
175                            throw se;
176                    }
177            }
178    
179            public static com.liferay.portal.kernel.model.Company getCompanyByLogoId(
180                    HttpPrincipal httpPrincipal, long logoId)
181                    throws com.liferay.portal.kernel.exception.PortalException {
182                    try {
183                            MethodKey methodKey = new MethodKey(CompanyServiceUtil.class,
184                                            "getCompanyByLogoId", _getCompanyByLogoIdParameterTypes4);
185    
186                            MethodHandler methodHandler = new MethodHandler(methodKey, logoId);
187    
188                            Object returnObj = null;
189    
190                            try {
191                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
192                            }
193                            catch (Exception e) {
194                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
195                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
196                                    }
197    
198                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
199                            }
200    
201                            return (com.liferay.portal.kernel.model.Company)returnObj;
202                    }
203                    catch (com.liferay.portal.kernel.exception.SystemException se) {
204                            _log.error(se, se);
205    
206                            throw se;
207                    }
208            }
209    
210            public static com.liferay.portal.kernel.model.Company getCompanyByMx(
211                    HttpPrincipal httpPrincipal, java.lang.String mx)
212                    throws com.liferay.portal.kernel.exception.PortalException {
213                    try {
214                            MethodKey methodKey = new MethodKey(CompanyServiceUtil.class,
215                                            "getCompanyByMx", _getCompanyByMxParameterTypes5);
216    
217                            MethodHandler methodHandler = new MethodHandler(methodKey, mx);
218    
219                            Object returnObj = null;
220    
221                            try {
222                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
223                            }
224                            catch (Exception e) {
225                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
226                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
227                                    }
228    
229                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
230                            }
231    
232                            return (com.liferay.portal.kernel.model.Company)returnObj;
233                    }
234                    catch (com.liferay.portal.kernel.exception.SystemException se) {
235                            _log.error(se, se);
236    
237                            throw se;
238                    }
239            }
240    
241            public static com.liferay.portal.kernel.model.Company getCompanyByVirtualHost(
242                    HttpPrincipal httpPrincipal, java.lang.String virtualHost)
243                    throws com.liferay.portal.kernel.exception.PortalException {
244                    try {
245                            MethodKey methodKey = new MethodKey(CompanyServiceUtil.class,
246                                            "getCompanyByVirtualHost",
247                                            _getCompanyByVirtualHostParameterTypes6);
248    
249                            MethodHandler methodHandler = new MethodHandler(methodKey,
250                                            virtualHost);
251    
252                            Object returnObj = null;
253    
254                            try {
255                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
256                            }
257                            catch (Exception e) {
258                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
259                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
260                                    }
261    
262                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
263                            }
264    
265                            return (com.liferay.portal.kernel.model.Company)returnObj;
266                    }
267                    catch (com.liferay.portal.kernel.exception.SystemException se) {
268                            _log.error(se, se);
269    
270                            throw se;
271                    }
272            }
273    
274            public static com.liferay.portal.kernel.model.Company getCompanyByWebId(
275                    HttpPrincipal httpPrincipal, java.lang.String webId)
276                    throws com.liferay.portal.kernel.exception.PortalException {
277                    try {
278                            MethodKey methodKey = new MethodKey(CompanyServiceUtil.class,
279                                            "getCompanyByWebId", _getCompanyByWebIdParameterTypes7);
280    
281                            MethodHandler methodHandler = new MethodHandler(methodKey, webId);
282    
283                            Object returnObj = null;
284    
285                            try {
286                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
287                            }
288                            catch (Exception e) {
289                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
290                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
291                                    }
292    
293                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
294                            }
295    
296                            return (com.liferay.portal.kernel.model.Company)returnObj;
297                    }
298                    catch (com.liferay.portal.kernel.exception.SystemException se) {
299                            _log.error(se, se);
300    
301                            throw se;
302                    }
303            }
304    
305            public static void removePreferences(HttpPrincipal httpPrincipal,
306                    long companyId, java.lang.String[] keys)
307                    throws com.liferay.portal.kernel.exception.PortalException {
308                    try {
309                            MethodKey methodKey = new MethodKey(CompanyServiceUtil.class,
310                                            "removePreferences", _removePreferencesParameterTypes8);
311    
312                            MethodHandler methodHandler = new MethodHandler(methodKey,
313                                            companyId, keys);
314    
315                            try {
316                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
317                            }
318                            catch (Exception e) {
319                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
320                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
321                                    }
322    
323                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
324                            }
325                    }
326                    catch (com.liferay.portal.kernel.exception.SystemException se) {
327                            _log.error(se, se);
328    
329                            throw se;
330                    }
331            }
332    
333            public static com.liferay.portal.kernel.model.Company updateCompany(
334                    HttpPrincipal httpPrincipal, long companyId,
335                    java.lang.String virtualHost, java.lang.String mx, int maxUsers,
336                    boolean active)
337                    throws com.liferay.portal.kernel.exception.PortalException {
338                    try {
339                            MethodKey methodKey = new MethodKey(CompanyServiceUtil.class,
340                                            "updateCompany", _updateCompanyParameterTypes9);
341    
342                            MethodHandler methodHandler = new MethodHandler(methodKey,
343                                            companyId, virtualHost, mx, maxUsers, active);
344    
345                            Object returnObj = null;
346    
347                            try {
348                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
349                            }
350                            catch (Exception e) {
351                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
352                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
353                                    }
354    
355                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
356                            }
357    
358                            return (com.liferay.portal.kernel.model.Company)returnObj;
359                    }
360                    catch (com.liferay.portal.kernel.exception.SystemException se) {
361                            _log.error(se, se);
362    
363                            throw se;
364                    }
365            }
366    
367            public static com.liferay.portal.kernel.model.Company updateCompany(
368                    HttpPrincipal httpPrincipal, long companyId,
369                    java.lang.String virtualHost, java.lang.String mx,
370                    java.lang.String homeURL, boolean logo, byte[] logoBytes,
371                    java.lang.String name, java.lang.String legalName,
372                    java.lang.String legalId, java.lang.String legalType,
373                    java.lang.String sicCode, java.lang.String tickerSymbol,
374                    java.lang.String industry, java.lang.String type, java.lang.String size)
375                    throws com.liferay.portal.kernel.exception.PortalException {
376                    try {
377                            MethodKey methodKey = new MethodKey(CompanyServiceUtil.class,
378                                            "updateCompany", _updateCompanyParameterTypes10);
379    
380                            MethodHandler methodHandler = new MethodHandler(methodKey,
381                                            companyId, virtualHost, mx, homeURL, logo, logoBytes, name,
382                                            legalName, legalId, legalType, sicCode, tickerSymbol,
383                                            industry, type, size);
384    
385                            Object returnObj = null;
386    
387                            try {
388                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
389                            }
390                            catch (Exception e) {
391                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
392                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
393                                    }
394    
395                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
396                            }
397    
398                            return (com.liferay.portal.kernel.model.Company)returnObj;
399                    }
400                    catch (com.liferay.portal.kernel.exception.SystemException se) {
401                            _log.error(se, se);
402    
403                            throw se;
404                    }
405            }
406    
407            public static com.liferay.portal.kernel.model.Company updateCompany(
408                    HttpPrincipal httpPrincipal, long companyId,
409                    java.lang.String virtualHost, java.lang.String mx,
410                    java.lang.String homeURL, boolean logo, byte[] logoBytes,
411                    java.lang.String name, java.lang.String legalName,
412                    java.lang.String legalId, java.lang.String legalType,
413                    java.lang.String sicCode, java.lang.String tickerSymbol,
414                    java.lang.String industry, java.lang.String type,
415                    java.lang.String size, java.lang.String languageId,
416                    java.lang.String timeZoneId,
417                    java.util.List<com.liferay.portal.kernel.model.Address> addresses,
418                    java.util.List<com.liferay.portal.kernel.model.EmailAddress> emailAddresses,
419                    java.util.List<com.liferay.portal.kernel.model.Phone> phones,
420                    java.util.List<com.liferay.portal.kernel.model.Website> websites,
421                    com.liferay.portal.kernel.util.UnicodeProperties properties)
422                    throws com.liferay.portal.kernel.exception.PortalException {
423                    try {
424                            MethodKey methodKey = new MethodKey(CompanyServiceUtil.class,
425                                            "updateCompany", _updateCompanyParameterTypes11);
426    
427                            MethodHandler methodHandler = new MethodHandler(methodKey,
428                                            companyId, virtualHost, mx, homeURL, logo, logoBytes, name,
429                                            legalName, legalId, legalType, sicCode, tickerSymbol,
430                                            industry, type, size, languageId, timeZoneId, addresses,
431                                            emailAddresses, phones, websites, properties);
432    
433                            Object returnObj = null;
434    
435                            try {
436                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
437                            }
438                            catch (Exception e) {
439                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
440                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
441                                    }
442    
443                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
444                            }
445    
446                            return (com.liferay.portal.kernel.model.Company)returnObj;
447                    }
448                    catch (com.liferay.portal.kernel.exception.SystemException se) {
449                            _log.error(se, se);
450    
451                            throw se;
452                    }
453            }
454    
455            public static com.liferay.portal.kernel.model.Company updateCompany(
456                    HttpPrincipal httpPrincipal, long companyId,
457                    java.lang.String virtualHost, java.lang.String mx,
458                    java.lang.String homeURL, java.lang.String name,
459                    java.lang.String legalName, java.lang.String legalId,
460                    java.lang.String legalType, java.lang.String sicCode,
461                    java.lang.String tickerSymbol, java.lang.String industry,
462                    java.lang.String type, java.lang.String size)
463                    throws com.liferay.portal.kernel.exception.PortalException {
464                    try {
465                            MethodKey methodKey = new MethodKey(CompanyServiceUtil.class,
466                                            "updateCompany", _updateCompanyParameterTypes12);
467    
468                            MethodHandler methodHandler = new MethodHandler(methodKey,
469                                            companyId, virtualHost, mx, homeURL, name, legalName,
470                                            legalId, legalType, sicCode, tickerSymbol, industry, type,
471                                            size);
472    
473                            Object returnObj = null;
474    
475                            try {
476                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
477                            }
478                            catch (Exception e) {
479                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
480                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
481                                    }
482    
483                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
484                            }
485    
486                            return (com.liferay.portal.kernel.model.Company)returnObj;
487                    }
488                    catch (com.liferay.portal.kernel.exception.SystemException se) {
489                            _log.error(se, se);
490    
491                            throw se;
492                    }
493            }
494    
495            public static com.liferay.portal.kernel.model.Company updateCompany(
496                    HttpPrincipal httpPrincipal, long companyId,
497                    java.lang.String virtualHost, java.lang.String mx,
498                    java.lang.String homeURL, java.lang.String name,
499                    java.lang.String legalName, java.lang.String legalId,
500                    java.lang.String legalType, java.lang.String sicCode,
501                    java.lang.String tickerSymbol, java.lang.String industry,
502                    java.lang.String type, java.lang.String size,
503                    java.lang.String languageId, java.lang.String timeZoneId,
504                    java.util.List<com.liferay.portal.kernel.model.Address> addresses,
505                    java.util.List<com.liferay.portal.kernel.model.EmailAddress> emailAddresses,
506                    java.util.List<com.liferay.portal.kernel.model.Phone> phones,
507                    java.util.List<com.liferay.portal.kernel.model.Website> websites,
508                    com.liferay.portal.kernel.util.UnicodeProperties properties)
509                    throws com.liferay.portal.kernel.exception.PortalException {
510                    try {
511                            MethodKey methodKey = new MethodKey(CompanyServiceUtil.class,
512                                            "updateCompany", _updateCompanyParameterTypes13);
513    
514                            MethodHandler methodHandler = new MethodHandler(methodKey,
515                                            companyId, virtualHost, mx, homeURL, name, legalName,
516                                            legalId, legalType, sicCode, tickerSymbol, industry, type,
517                                            size, languageId, timeZoneId, addresses, emailAddresses,
518                                            phones, websites, properties);
519    
520                            Object returnObj = null;
521    
522                            try {
523                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
524                            }
525                            catch (Exception e) {
526                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
527                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
528                                    }
529    
530                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
531                            }
532    
533                            return (com.liferay.portal.kernel.model.Company)returnObj;
534                    }
535                    catch (com.liferay.portal.kernel.exception.SystemException se) {
536                            _log.error(se, se);
537    
538                            throw se;
539                    }
540            }
541    
542            public static void updateDisplay(HttpPrincipal httpPrincipal,
543                    long companyId, java.lang.String languageId, java.lang.String timeZoneId)
544                    throws com.liferay.portal.kernel.exception.PortalException {
545                    try {
546                            MethodKey methodKey = new MethodKey(CompanyServiceUtil.class,
547                                            "updateDisplay", _updateDisplayParameterTypes14);
548    
549                            MethodHandler methodHandler = new MethodHandler(methodKey,
550                                            companyId, languageId, timeZoneId);
551    
552                            try {
553                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
554                            }
555                            catch (Exception e) {
556                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
557                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
558                                    }
559    
560                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
561                            }
562                    }
563                    catch (com.liferay.portal.kernel.exception.SystemException se) {
564                            _log.error(se, se);
565    
566                            throw se;
567                    }
568            }
569    
570            public static com.liferay.portal.kernel.model.Company updateLogo(
571                    HttpPrincipal httpPrincipal, long companyId, byte[] bytes)
572                    throws com.liferay.portal.kernel.exception.PortalException {
573                    try {
574                            MethodKey methodKey = new MethodKey(CompanyServiceUtil.class,
575                                            "updateLogo", _updateLogoParameterTypes15);
576    
577                            MethodHandler methodHandler = new MethodHandler(methodKey,
578                                            companyId, bytes);
579    
580                            Object returnObj = null;
581    
582                            try {
583                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
584                            }
585                            catch (Exception e) {
586                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
587                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
588                                    }
589    
590                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
591                            }
592    
593                            return (com.liferay.portal.kernel.model.Company)returnObj;
594                    }
595                    catch (com.liferay.portal.kernel.exception.SystemException se) {
596                            _log.error(se, se);
597    
598                            throw se;
599                    }
600            }
601    
602            public static com.liferay.portal.kernel.model.Company updateLogo(
603                    HttpPrincipal httpPrincipal, long companyId,
604                    java.io.InputStream inputStream)
605                    throws com.liferay.portal.kernel.exception.PortalException {
606                    try {
607                            MethodKey methodKey = new MethodKey(CompanyServiceUtil.class,
608                                            "updateLogo", _updateLogoParameterTypes16);
609    
610                            MethodHandler methodHandler = new MethodHandler(methodKey,
611                                            companyId, inputStream);
612    
613                            Object returnObj = null;
614    
615                            try {
616                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
617                            }
618                            catch (Exception e) {
619                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
620                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
621                                    }
622    
623                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
624                            }
625    
626                            return (com.liferay.portal.kernel.model.Company)returnObj;
627                    }
628                    catch (com.liferay.portal.kernel.exception.SystemException se) {
629                            _log.error(se, se);
630    
631                            throw se;
632                    }
633            }
634    
635            public static void updatePreferences(HttpPrincipal httpPrincipal,
636                    long companyId,
637                    com.liferay.portal.kernel.util.UnicodeProperties properties)
638                    throws com.liferay.portal.kernel.exception.PortalException {
639                    try {
640                            MethodKey methodKey = new MethodKey(CompanyServiceUtil.class,
641                                            "updatePreferences", _updatePreferencesParameterTypes17);
642    
643                            MethodHandler methodHandler = new MethodHandler(methodKey,
644                                            companyId, properties);
645    
646                            try {
647                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
648                            }
649                            catch (Exception e) {
650                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
651                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
652                                    }
653    
654                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
655                            }
656                    }
657                    catch (com.liferay.portal.kernel.exception.SystemException se) {
658                            _log.error(se, se);
659    
660                            throw se;
661                    }
662            }
663    
664            public static void updateSecurity(HttpPrincipal httpPrincipal,
665                    long companyId, java.lang.String authType, boolean autoLogin,
666                    boolean sendPassword, boolean strangers, boolean strangersWithMx,
667                    boolean strangersVerify, boolean siteLogo)
668                    throws com.liferay.portal.kernel.exception.PortalException {
669                    try {
670                            MethodKey methodKey = new MethodKey(CompanyServiceUtil.class,
671                                            "updateSecurity", _updateSecurityParameterTypes18);
672    
673                            MethodHandler methodHandler = new MethodHandler(methodKey,
674                                            companyId, authType, autoLogin, sendPassword, strangers,
675                                            strangersWithMx, strangersVerify, siteLogo);
676    
677                            try {
678                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
679                            }
680                            catch (Exception e) {
681                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
682                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
683                                    }
684    
685                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
686                            }
687                    }
688                    catch (com.liferay.portal.kernel.exception.SystemException se) {
689                            _log.error(se, se);
690    
691                            throw se;
692                    }
693            }
694    
695            private static Log _log = LogFactoryUtil.getLog(CompanyServiceHttp.class);
696            private static final Class<?>[] _addCompanyParameterTypes0 = new Class[] {
697                            java.lang.String.class, java.lang.String.class,
698                            java.lang.String.class, boolean.class, int.class, boolean.class
699                    };
700            private static final Class<?>[] _deleteCompanyParameterTypes1 = new Class[] {
701                            long.class
702                    };
703            private static final Class<?>[] _deleteLogoParameterTypes2 = new Class[] {
704                            long.class
705                    };
706            private static final Class<?>[] _getCompanyByIdParameterTypes3 = new Class[] {
707                            long.class
708                    };
709            private static final Class<?>[] _getCompanyByLogoIdParameterTypes4 = new Class[] {
710                            long.class
711                    };
712            private static final Class<?>[] _getCompanyByMxParameterTypes5 = new Class[] {
713                            java.lang.String.class
714                    };
715            private static final Class<?>[] _getCompanyByVirtualHostParameterTypes6 = new Class[] {
716                            java.lang.String.class
717                    };
718            private static final Class<?>[] _getCompanyByWebIdParameterTypes7 = new Class[] {
719                            java.lang.String.class
720                    };
721            private static final Class<?>[] _removePreferencesParameterTypes8 = new Class[] {
722                            long.class, java.lang.String[].class
723                    };
724            private static final Class<?>[] _updateCompanyParameterTypes9 = new Class[] {
725                            long.class, java.lang.String.class, java.lang.String.class,
726                            int.class, boolean.class
727                    };
728            private static final Class<?>[] _updateCompanyParameterTypes10 = new Class[] {
729                            long.class, java.lang.String.class, java.lang.String.class,
730                            java.lang.String.class, boolean.class, byte[].class,
731                            java.lang.String.class, java.lang.String.class,
732                            java.lang.String.class, java.lang.String.class,
733                            java.lang.String.class, java.lang.String.class,
734                            java.lang.String.class, java.lang.String.class,
735                            java.lang.String.class
736                    };
737            private static final Class<?>[] _updateCompanyParameterTypes11 = new Class[] {
738                            long.class, java.lang.String.class, java.lang.String.class,
739                            java.lang.String.class, boolean.class, byte[].class,
740                            java.lang.String.class, java.lang.String.class,
741                            java.lang.String.class, java.lang.String.class,
742                            java.lang.String.class, java.lang.String.class,
743                            java.lang.String.class, java.lang.String.class,
744                            java.lang.String.class, java.lang.String.class,
745                            java.lang.String.class, java.util.List.class, java.util.List.class,
746                            java.util.List.class, java.util.List.class,
747                            com.liferay.portal.kernel.util.UnicodeProperties.class
748                    };
749            private static final Class<?>[] _updateCompanyParameterTypes12 = new Class[] {
750                            long.class, java.lang.String.class, java.lang.String.class,
751                            java.lang.String.class, java.lang.String.class,
752                            java.lang.String.class, java.lang.String.class,
753                            java.lang.String.class, java.lang.String.class,
754                            java.lang.String.class, java.lang.String.class,
755                            java.lang.String.class, java.lang.String.class
756                    };
757            private static final Class<?>[] _updateCompanyParameterTypes13 = new Class[] {
758                            long.class, java.lang.String.class, java.lang.String.class,
759                            java.lang.String.class, java.lang.String.class,
760                            java.lang.String.class, java.lang.String.class,
761                            java.lang.String.class, java.lang.String.class,
762                            java.lang.String.class, java.lang.String.class,
763                            java.lang.String.class, java.lang.String.class,
764                            java.lang.String.class, java.lang.String.class, java.util.List.class,
765                            java.util.List.class, java.util.List.class, java.util.List.class,
766                            com.liferay.portal.kernel.util.UnicodeProperties.class
767                    };
768            private static final Class<?>[] _updateDisplayParameterTypes14 = new Class[] {
769                            long.class, java.lang.String.class, java.lang.String.class
770                    };
771            private static final Class<?>[] _updateLogoParameterTypes15 = new Class[] {
772                            long.class, byte[].class
773                    };
774            private static final Class<?>[] _updateLogoParameterTypes16 = new Class[] {
775                            long.class, java.io.InputStream.class
776                    };
777            private static final Class<?>[] _updatePreferencesParameterTypes17 = new Class[] {
778                            long.class, com.liferay.portal.kernel.util.UnicodeProperties.class
779                    };
780            private static final Class<?>[] _updateSecurityParameterTypes18 = new Class[] {
781                            long.class, java.lang.String.class, boolean.class, boolean.class,
782                            boolean.class, boolean.class, boolean.class, boolean.class
783                    };
784    }