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