001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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.OrganizationServiceUtil;
023    
024    /**
025     * <p>
026     * This class provides a HTTP utility for the
027     * {@link com.liferay.portal.service.OrganizationServiceUtil} service utility. The
028     * static methods of this class calls the same methods of the service utility.
029     * However, the signatures are different because it requires an additional
030     * {@link com.liferay.portal.security.auth.HttpPrincipal} parameter.
031     * </p>
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       com.liferay.portal.security.auth.HttpPrincipal
051     * @see       com.liferay.portal.service.OrganizationServiceUtil
052     * @generated
053     */
054    public class OrganizationServiceHttp {
055            public static void addGroupOrganizations(HttpPrincipal httpPrincipal,
056                    long groupId, long[] organizationIds)
057                    throws com.liferay.portal.kernel.exception.PortalException,
058                            com.liferay.portal.kernel.exception.SystemException {
059                    try {
060                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class.getName(),
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                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
076                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
077                                    }
078    
079                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
080                            }
081                    }
082                    catch (com.liferay.portal.kernel.exception.SystemException se) {
083                            _log.error(se, se);
084    
085                            throw se;
086                    }
087            }
088    
089            public static void addPasswordPolicyOrganizations(
090                    HttpPrincipal httpPrincipal, long passwordPolicyId,
091                    long[] organizationIds)
092                    throws com.liferay.portal.kernel.exception.PortalException,
093                            com.liferay.portal.kernel.exception.SystemException {
094                    try {
095                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class.getName(),
096                                            "addPasswordPolicyOrganizations",
097                                            _addPasswordPolicyOrganizationsParameterTypes1);
098    
099                            MethodHandler methodHandler = new MethodHandler(methodKey,
100                                            passwordPolicyId, organizationIds);
101    
102                            try {
103                                    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                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
111                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
112                                    }
113    
114                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
115                            }
116                    }
117                    catch (com.liferay.portal.kernel.exception.SystemException se) {
118                            _log.error(se, se);
119    
120                            throw se;
121                    }
122            }
123    
124            public static com.liferay.portal.model.Organization addOrganization(
125                    HttpPrincipal httpPrincipal, long parentOrganizationId,
126                    java.lang.String name, java.lang.String type, boolean recursable,
127                    long regionId, long countryId, int statusId, java.lang.String comments,
128                    com.liferay.portal.service.ServiceContext serviceContext)
129                    throws com.liferay.portal.kernel.exception.PortalException,
130                            com.liferay.portal.kernel.exception.SystemException {
131                    try {
132                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class.getName(),
133                                            "addOrganization", _addOrganizationParameterTypes2);
134    
135                            MethodHandler methodHandler = new MethodHandler(methodKey,
136                                            parentOrganizationId, name, type, recursable, regionId,
137                                            countryId, statusId, comments, serviceContext);
138    
139                            Object returnObj = null;
140    
141                            try {
142                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
143                            }
144                            catch (Exception e) {
145                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
146                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
147                                    }
148    
149                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
150                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
151                                    }
152    
153                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
154                            }
155    
156                            return (com.liferay.portal.model.Organization)returnObj;
157                    }
158                    catch (com.liferay.portal.kernel.exception.SystemException se) {
159                            _log.error(se, se);
160    
161                            throw se;
162                    }
163            }
164    
165            public static com.liferay.portal.model.Organization addOrganization(
166                    HttpPrincipal httpPrincipal, long parentOrganizationId,
167                    java.lang.String name, java.lang.String type, boolean recursable,
168                    long regionId, long countryId, int statusId, java.lang.String comments,
169                    java.util.List<com.liferay.portal.model.Address> addresses,
170                    java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
171                    java.util.List<com.liferay.portal.model.OrgLabor> orgLabors,
172                    java.util.List<com.liferay.portal.model.Phone> phones,
173                    java.util.List<com.liferay.portal.model.Website> websites,
174                    com.liferay.portal.service.ServiceContext serviceContext)
175                    throws com.liferay.portal.kernel.exception.PortalException,
176                            com.liferay.portal.kernel.exception.SystemException {
177                    try {
178                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class.getName(),
179                                            "addOrganization", _addOrganizationParameterTypes3);
180    
181                            MethodHandler methodHandler = new MethodHandler(methodKey,
182                                            parentOrganizationId, name, type, recursable, regionId,
183                                            countryId, statusId, comments, addresses, emailAddresses,
184                                            orgLabors, phones, websites, serviceContext);
185    
186                            Object returnObj = null;
187    
188                            try {
189                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
190                            }
191                            catch (Exception e) {
192                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
193                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
194                                    }
195    
196                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
197                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
198                                    }
199    
200                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
201                            }
202    
203                            return (com.liferay.portal.model.Organization)returnObj;
204                    }
205                    catch (com.liferay.portal.kernel.exception.SystemException se) {
206                            _log.error(se, se);
207    
208                            throw se;
209                    }
210            }
211    
212            public static void deleteLogo(HttpPrincipal httpPrincipal,
213                    long organizationId)
214                    throws com.liferay.portal.kernel.exception.PortalException,
215                            com.liferay.portal.kernel.exception.SystemException {
216                    try {
217                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class.getName(),
218                                            "deleteLogo", _deleteLogoParameterTypes4);
219    
220                            MethodHandler methodHandler = new MethodHandler(methodKey,
221                                            organizationId);
222    
223                            try {
224                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
225                            }
226                            catch (Exception e) {
227                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
228                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
229                                    }
230    
231                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
232                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
233                                    }
234    
235                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
236                            }
237                    }
238                    catch (com.liferay.portal.kernel.exception.SystemException se) {
239                            _log.error(se, se);
240    
241                            throw se;
242                    }
243            }
244    
245            public static void deleteOrganization(HttpPrincipal httpPrincipal,
246                    long organizationId)
247                    throws com.liferay.portal.kernel.exception.PortalException,
248                            com.liferay.portal.kernel.exception.SystemException {
249                    try {
250                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class.getName(),
251                                            "deleteOrganization", _deleteOrganizationParameterTypes5);
252    
253                            MethodHandler methodHandler = new MethodHandler(methodKey,
254                                            organizationId);
255    
256                            try {
257                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
258                            }
259                            catch (Exception e) {
260                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
261                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
262                                    }
263    
264                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
265                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
266                                    }
267    
268                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
269                            }
270                    }
271                    catch (com.liferay.portal.kernel.exception.SystemException se) {
272                            _log.error(se, se);
273    
274                            throw se;
275                    }
276            }
277    
278            public static java.util.List<com.liferay.portal.model.Organization> getManageableOrganizations(
279                    HttpPrincipal httpPrincipal, java.lang.String actionId, int max)
280                    throws com.liferay.portal.kernel.exception.PortalException,
281                            com.liferay.portal.kernel.exception.SystemException {
282                    try {
283                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class.getName(),
284                                            "getManageableOrganizations",
285                                            _getManageableOrganizationsParameterTypes6);
286    
287                            MethodHandler methodHandler = new MethodHandler(methodKey,
288                                            actionId, max);
289    
290                            Object returnObj = null;
291    
292                            try {
293                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
294                            }
295                            catch (Exception e) {
296                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
297                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
298                                    }
299    
300                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
301                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
302                                    }
303    
304                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
305                            }
306    
307                            return (java.util.List<com.liferay.portal.model.Organization>)returnObj;
308                    }
309                    catch (com.liferay.portal.kernel.exception.SystemException se) {
310                            _log.error(se, se);
311    
312                            throw se;
313                    }
314            }
315    
316            public static com.liferay.portal.model.Organization getOrganization(
317                    HttpPrincipal httpPrincipal, long organizationId)
318                    throws com.liferay.portal.kernel.exception.PortalException,
319                            com.liferay.portal.kernel.exception.SystemException {
320                    try {
321                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class.getName(),
322                                            "getOrganization", _getOrganizationParameterTypes7);
323    
324                            MethodHandler methodHandler = new MethodHandler(methodKey,
325                                            organizationId);
326    
327                            Object returnObj = null;
328    
329                            try {
330                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
331                            }
332                            catch (Exception e) {
333                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
334                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
335                                    }
336    
337                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
338                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
339                                    }
340    
341                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
342                            }
343    
344                            return (com.liferay.portal.model.Organization)returnObj;
345                    }
346                    catch (com.liferay.portal.kernel.exception.SystemException se) {
347                            _log.error(se, se);
348    
349                            throw se;
350                    }
351            }
352    
353            public static long getOrganizationId(HttpPrincipal httpPrincipal,
354                    long companyId, java.lang.String name)
355                    throws com.liferay.portal.kernel.exception.SystemException {
356                    try {
357                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class.getName(),
358                                            "getOrganizationId", _getOrganizationIdParameterTypes8);
359    
360                            MethodHandler methodHandler = new MethodHandler(methodKey,
361                                            companyId, name);
362    
363                            Object returnObj = null;
364    
365                            try {
366                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
367                            }
368                            catch (Exception e) {
369                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
370                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
371                                    }
372    
373                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
374                            }
375    
376                            return ((Long)returnObj).longValue();
377                    }
378                    catch (com.liferay.portal.kernel.exception.SystemException se) {
379                            _log.error(se, se);
380    
381                            throw se;
382                    }
383            }
384    
385            public static java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
386                    HttpPrincipal httpPrincipal, long userId)
387                    throws com.liferay.portal.kernel.exception.PortalException,
388                            com.liferay.portal.kernel.exception.SystemException {
389                    try {
390                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class.getName(),
391                                            "getUserOrganizations", _getUserOrganizationsParameterTypes9);
392    
393                            MethodHandler methodHandler = new MethodHandler(methodKey, userId);
394    
395                            Object returnObj = null;
396    
397                            try {
398                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
399                            }
400                            catch (Exception e) {
401                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
402                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
403                                    }
404    
405                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
406                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
407                                    }
408    
409                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
410                            }
411    
412                            return (java.util.List<com.liferay.portal.model.Organization>)returnObj;
413                    }
414                    catch (com.liferay.portal.kernel.exception.SystemException se) {
415                            _log.error(se, se);
416    
417                            throw se;
418                    }
419            }
420    
421            public static java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
422                    HttpPrincipal httpPrincipal, long userId, boolean inheritUserGroups)
423                    throws com.liferay.portal.kernel.exception.PortalException,
424                            com.liferay.portal.kernel.exception.SystemException {
425                    try {
426                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class.getName(),
427                                            "getUserOrganizations",
428                                            _getUserOrganizationsParameterTypes10);
429    
430                            MethodHandler methodHandler = new MethodHandler(methodKey, userId,
431                                            inheritUserGroups);
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                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
444                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
445                                    }
446    
447                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
448                            }
449    
450                            return (java.util.List<com.liferay.portal.model.Organization>)returnObj;
451                    }
452                    catch (com.liferay.portal.kernel.exception.SystemException se) {
453                            _log.error(se, se);
454    
455                            throw se;
456                    }
457            }
458    
459            public static void setGroupOrganizations(HttpPrincipal httpPrincipal,
460                    long groupId, long[] organizationIds)
461                    throws com.liferay.portal.kernel.exception.PortalException,
462                            com.liferay.portal.kernel.exception.SystemException {
463                    try {
464                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class.getName(),
465                                            "setGroupOrganizations",
466                                            _setGroupOrganizationsParameterTypes11);
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                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
480                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
481                                    }
482    
483                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
484                            }
485                    }
486                    catch (com.liferay.portal.kernel.exception.SystemException se) {
487                            _log.error(se, se);
488    
489                            throw se;
490                    }
491            }
492    
493            public static void unsetGroupOrganizations(HttpPrincipal httpPrincipal,
494                    long groupId, long[] organizationIds)
495                    throws com.liferay.portal.kernel.exception.PortalException,
496                            com.liferay.portal.kernel.exception.SystemException {
497                    try {
498                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class.getName(),
499                                            "unsetGroupOrganizations",
500                                            _unsetGroupOrganizationsParameterTypes12);
501    
502                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
503                                            organizationIds);
504    
505                            try {
506                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
507                            }
508                            catch (Exception e) {
509                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
510                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
511                                    }
512    
513                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
514                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
515                                    }
516    
517                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
518                            }
519                    }
520                    catch (com.liferay.portal.kernel.exception.SystemException se) {
521                            _log.error(se, se);
522    
523                            throw se;
524                    }
525            }
526    
527            public static void unsetPasswordPolicyOrganizations(
528                    HttpPrincipal httpPrincipal, long passwordPolicyId,
529                    long[] organizationIds)
530                    throws com.liferay.portal.kernel.exception.PortalException,
531                            com.liferay.portal.kernel.exception.SystemException {
532                    try {
533                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class.getName(),
534                                            "unsetPasswordPolicyOrganizations",
535                                            _unsetPasswordPolicyOrganizationsParameterTypes13);
536    
537                            MethodHandler methodHandler = new MethodHandler(methodKey,
538                                            passwordPolicyId, organizationIds);
539    
540                            try {
541                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
542                            }
543                            catch (Exception e) {
544                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
545                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
546                                    }
547    
548                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
549                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
550                                    }
551    
552                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
553                            }
554                    }
555                    catch (com.liferay.portal.kernel.exception.SystemException se) {
556                            _log.error(se, se);
557    
558                            throw se;
559                    }
560            }
561    
562            public static com.liferay.portal.model.Organization updateOrganization(
563                    HttpPrincipal httpPrincipal, long organizationId,
564                    long parentOrganizationId, java.lang.String name,
565                    java.lang.String type, boolean recursable, long regionId,
566                    long countryId, int statusId, java.lang.String comments,
567                    com.liferay.portal.service.ServiceContext serviceContext)
568                    throws com.liferay.portal.kernel.exception.PortalException,
569                            com.liferay.portal.kernel.exception.SystemException {
570                    try {
571                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class.getName(),
572                                            "updateOrganization", _updateOrganizationParameterTypes14);
573    
574                            MethodHandler methodHandler = new MethodHandler(methodKey,
575                                            organizationId, parentOrganizationId, name, type,
576                                            recursable, regionId, countryId, statusId, comments,
577                                            serviceContext);
578    
579                            Object returnObj = null;
580    
581                            try {
582                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
583                            }
584                            catch (Exception e) {
585                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
586                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
587                                    }
588    
589                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
590                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
591                                    }
592    
593                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
594                            }
595    
596                            return (com.liferay.portal.model.Organization)returnObj;
597                    }
598                    catch (com.liferay.portal.kernel.exception.SystemException se) {
599                            _log.error(se, se);
600    
601                            throw se;
602                    }
603            }
604    
605            public static com.liferay.portal.model.Organization updateOrganization(
606                    HttpPrincipal httpPrincipal, long organizationId,
607                    long parentOrganizationId, java.lang.String name,
608                    java.lang.String type, boolean recursable, long regionId,
609                    long countryId, int statusId, java.lang.String comments,
610                    java.util.List<com.liferay.portal.model.Address> addresses,
611                    java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
612                    java.util.List<com.liferay.portal.model.OrgLabor> orgLabors,
613                    java.util.List<com.liferay.portal.model.Phone> phones,
614                    java.util.List<com.liferay.portal.model.Website> websites,
615                    com.liferay.portal.service.ServiceContext serviceContext)
616                    throws com.liferay.portal.kernel.exception.PortalException,
617                            com.liferay.portal.kernel.exception.SystemException {
618                    try {
619                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class.getName(),
620                                            "updateOrganization", _updateOrganizationParameterTypes15);
621    
622                            MethodHandler methodHandler = new MethodHandler(methodKey,
623                                            organizationId, parentOrganizationId, name, type,
624                                            recursable, regionId, countryId, statusId, comments,
625                                            addresses, emailAddresses, orgLabors, phones, websites,
626                                            serviceContext);
627    
628                            Object returnObj = null;
629    
630                            try {
631                                    returnObj = 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                            return (com.liferay.portal.model.Organization)returnObj;
646                    }
647                    catch (com.liferay.portal.kernel.exception.SystemException se) {
648                            _log.error(se, se);
649    
650                            throw se;
651                    }
652            }
653    
654            private static Log _log = LogFactoryUtil.getLog(OrganizationServiceHttp.class);
655            private static final Class<?>[] _addGroupOrganizationsParameterTypes0 = new Class[] {
656                            long.class, long[].class
657                    };
658            private static final Class<?>[] _addPasswordPolicyOrganizationsParameterTypes1 =
659                    new Class[] { long.class, long[].class };
660            private static final Class<?>[] _addOrganizationParameterTypes2 = new Class[] {
661                            long.class, java.lang.String.class, java.lang.String.class,
662                            boolean.class, long.class, long.class, int.class,
663                            java.lang.String.class,
664                            com.liferay.portal.service.ServiceContext.class
665                    };
666            private static final Class<?>[] _addOrganizationParameterTypes3 = new Class[] {
667                            long.class, java.lang.String.class, java.lang.String.class,
668                            boolean.class, long.class, long.class, int.class,
669                            java.lang.String.class, java.util.List.class, java.util.List.class,
670                            java.util.List.class, java.util.List.class, java.util.List.class,
671                            com.liferay.portal.service.ServiceContext.class
672                    };
673            private static final Class<?>[] _deleteLogoParameterTypes4 = new Class[] {
674                            long.class
675                    };
676            private static final Class<?>[] _deleteOrganizationParameterTypes5 = new Class[] {
677                            long.class
678                    };
679            private static final Class<?>[] _getManageableOrganizationsParameterTypes6 = new Class[] {
680                            java.lang.String.class, int.class
681                    };
682            private static final Class<?>[] _getOrganizationParameterTypes7 = new Class[] {
683                            long.class
684                    };
685            private static final Class<?>[] _getOrganizationIdParameterTypes8 = new Class[] {
686                            long.class, java.lang.String.class
687                    };
688            private static final Class<?>[] _getUserOrganizationsParameterTypes9 = new Class[] {
689                            long.class
690                    };
691            private static final Class<?>[] _getUserOrganizationsParameterTypes10 = new Class[] {
692                            long.class, boolean.class
693                    };
694            private static final Class<?>[] _setGroupOrganizationsParameterTypes11 = new Class[] {
695                            long.class, long[].class
696                    };
697            private static final Class<?>[] _unsetGroupOrganizationsParameterTypes12 = new Class[] {
698                            long.class, long[].class
699                    };
700            private static final Class<?>[] _unsetPasswordPolicyOrganizationsParameterTypes13 =
701                    new Class[] { long.class, long[].class };
702            private static final Class<?>[] _updateOrganizationParameterTypes14 = new Class[] {
703                            long.class, long.class, java.lang.String.class,
704                            java.lang.String.class, boolean.class, long.class, long.class,
705                            int.class, java.lang.String.class,
706                            com.liferay.portal.service.ServiceContext.class
707                    };
708            private static final Class<?>[] _updateOrganizationParameterTypes15 = new Class[] {
709                            long.class, long.class, java.lang.String.class,
710                            java.lang.String.class, boolean.class, long.class, long.class,
711                            int.class, java.lang.String.class, java.util.List.class,
712                            java.util.List.class, java.util.List.class, java.util.List.class,
713                            java.util.List.class,
714                            com.liferay.portal.service.ServiceContext.class
715                    };
716    }