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