001    /**
002     * Copyright (c) 2000-2012 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.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 com.liferay.portal.model.Organization addOrganization(
090                    HttpPrincipal httpPrincipal, long parentOrganizationId,
091                    java.lang.String name, java.lang.String type, boolean recursable,
092                    long regionId, long countryId, int statusId, java.lang.String comments,
093                    boolean site,
094                    java.util.List<com.liferay.portal.model.Address> addresses,
095                    java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
096                    java.util.List<com.liferay.portal.model.OrgLabor> orgLabors,
097                    java.util.List<com.liferay.portal.model.Phone> phones,
098                    java.util.List<com.liferay.portal.model.Website> websites,
099                    com.liferay.portal.service.ServiceContext serviceContext)
100                    throws com.liferay.portal.kernel.exception.PortalException,
101                            com.liferay.portal.kernel.exception.SystemException {
102                    try {
103                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class.getName(),
104                                            "addOrganization", _addOrganizationParameterTypes1);
105    
106                            MethodHandler methodHandler = new MethodHandler(methodKey,
107                                            parentOrganizationId, name, type, recursable, regionId,
108                                            countryId, statusId, comments, site, addresses,
109                                            emailAddresses, orgLabors, phones, websites, serviceContext);
110    
111                            Object returnObj = null;
112    
113                            try {
114                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
115                            }
116                            catch (Exception e) {
117                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
118                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
119                                    }
120    
121                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
122                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
123                                    }
124    
125                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
126                            }
127    
128                            return (com.liferay.portal.model.Organization)returnObj;
129                    }
130                    catch (com.liferay.portal.kernel.exception.SystemException se) {
131                            _log.error(se, se);
132    
133                            throw se;
134                    }
135            }
136    
137            public static com.liferay.portal.model.Organization addOrganization(
138                    HttpPrincipal httpPrincipal, long parentOrganizationId,
139                    java.lang.String name, java.lang.String type, boolean recursable,
140                    long regionId, long countryId, int statusId, java.lang.String comments,
141                    boolean site, com.liferay.portal.service.ServiceContext serviceContext)
142                    throws com.liferay.portal.kernel.exception.PortalException,
143                            com.liferay.portal.kernel.exception.SystemException {
144                    try {
145                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class.getName(),
146                                            "addOrganization", _addOrganizationParameterTypes2);
147    
148                            MethodHandler methodHandler = new MethodHandler(methodKey,
149                                            parentOrganizationId, name, type, recursable, regionId,
150                                            countryId, statusId, comments, site, serviceContext);
151    
152                            Object returnObj = null;
153    
154                            try {
155                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
156                            }
157                            catch (Exception e) {
158                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
159                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
160                                    }
161    
162                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
163                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
164                                    }
165    
166                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
167                            }
168    
169                            return (com.liferay.portal.model.Organization)returnObj;
170                    }
171                    catch (com.liferay.portal.kernel.exception.SystemException se) {
172                            _log.error(se, se);
173    
174                            throw se;
175                    }
176            }
177    
178            public static void addPasswordPolicyOrganizations(
179                    HttpPrincipal httpPrincipal, long passwordPolicyId,
180                    long[] organizationIds)
181                    throws com.liferay.portal.kernel.exception.PortalException,
182                            com.liferay.portal.kernel.exception.SystemException {
183                    try {
184                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class.getName(),
185                                            "addPasswordPolicyOrganizations",
186                                            _addPasswordPolicyOrganizationsParameterTypes3);
187    
188                            MethodHandler methodHandler = new MethodHandler(methodKey,
189                                            passwordPolicyId, organizationIds);
190    
191                            try {
192                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
193                            }
194                            catch (Exception e) {
195                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
196                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
197                                    }
198    
199                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
200                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
201                                    }
202    
203                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
204                            }
205                    }
206                    catch (com.liferay.portal.kernel.exception.SystemException se) {
207                            _log.error(se, se);
208    
209                            throw se;
210                    }
211            }
212    
213            public static void deleteLogo(HttpPrincipal httpPrincipal,
214                    long organizationId)
215                    throws com.liferay.portal.kernel.exception.PortalException,
216                            com.liferay.portal.kernel.exception.SystemException {
217                    try {
218                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class.getName(),
219                                            "deleteLogo", _deleteLogoParameterTypes4);
220    
221                            MethodHandler methodHandler = new MethodHandler(methodKey,
222                                            organizationId);
223    
224                            try {
225                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
226                            }
227                            catch (Exception e) {
228                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
229                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
230                                    }
231    
232                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
233                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
234                                    }
235    
236                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
237                            }
238                    }
239                    catch (com.liferay.portal.kernel.exception.SystemException se) {
240                            _log.error(se, se);
241    
242                            throw se;
243                    }
244            }
245    
246            public static void deleteOrganization(HttpPrincipal httpPrincipal,
247                    long organizationId)
248                    throws com.liferay.portal.kernel.exception.PortalException,
249                            com.liferay.portal.kernel.exception.SystemException {
250                    try {
251                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class.getName(),
252                                            "deleteOrganization", _deleteOrganizationParameterTypes5);
253    
254                            MethodHandler methodHandler = new MethodHandler(methodKey,
255                                            organizationId);
256    
257                            try {
258                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
259                            }
260                            catch (Exception e) {
261                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
262                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
263                                    }
264    
265                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
266                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
267                                    }
268    
269                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
270                            }
271                    }
272                    catch (com.liferay.portal.kernel.exception.SystemException se) {
273                            _log.error(se, se);
274    
275                            throw se;
276                    }
277            }
278    
279            public static java.util.List<com.liferay.portal.model.Organization> getManageableOrganizations(
280                    HttpPrincipal httpPrincipal, java.lang.String actionId, int max)
281                    throws com.liferay.portal.kernel.exception.PortalException,
282                            com.liferay.portal.kernel.exception.SystemException {
283                    try {
284                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class.getName(),
285                                            "getManageableOrganizations",
286                                            _getManageableOrganizationsParameterTypes6);
287    
288                            MethodHandler methodHandler = new MethodHandler(methodKey,
289                                            actionId, max);
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                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
302                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
303                                    }
304    
305                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
306                            }
307    
308                            return (java.util.List<com.liferay.portal.model.Organization>)returnObj;
309                    }
310                    catch (com.liferay.portal.kernel.exception.SystemException se) {
311                            _log.error(se, se);
312    
313                            throw se;
314                    }
315            }
316    
317            public static com.liferay.portal.model.Organization getOrganization(
318                    HttpPrincipal httpPrincipal, long organizationId)
319                    throws com.liferay.portal.kernel.exception.PortalException,
320                            com.liferay.portal.kernel.exception.SystemException {
321                    try {
322                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class.getName(),
323                                            "getOrganization", _getOrganizationParameterTypes7);
324    
325                            MethodHandler methodHandler = new MethodHandler(methodKey,
326                                            organizationId);
327    
328                            Object returnObj = null;
329    
330                            try {
331                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
332                            }
333                            catch (Exception e) {
334                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
335                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
336                                    }
337    
338                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
339                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
340                                    }
341    
342                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
343                            }
344    
345                            return (com.liferay.portal.model.Organization)returnObj;
346                    }
347                    catch (com.liferay.portal.kernel.exception.SystemException se) {
348                            _log.error(se, se);
349    
350                            throw se;
351                    }
352            }
353    
354            public static long getOrganizationId(HttpPrincipal httpPrincipal,
355                    long companyId, java.lang.String name)
356                    throws com.liferay.portal.kernel.exception.SystemException {
357                    try {
358                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class.getName(),
359                                            "getOrganizationId", _getOrganizationIdParameterTypes8);
360    
361                            MethodHandler methodHandler = new MethodHandler(methodKey,
362                                            companyId, name);
363    
364                            Object returnObj = null;
365    
366                            try {
367                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
368                            }
369                            catch (Exception e) {
370                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
371                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
372                                    }
373    
374                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
375                            }
376    
377                            return ((Long)returnObj).longValue();
378                    }
379                    catch (com.liferay.portal.kernel.exception.SystemException se) {
380                            _log.error(se, se);
381    
382                            throw se;
383                    }
384            }
385    
386            public static java.util.List<com.liferay.portal.model.Organization> getOrganizations(
387                    HttpPrincipal httpPrincipal, long companyId, long parentOrganizationId)
388                    throws com.liferay.portal.kernel.exception.SystemException {
389                    try {
390                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class.getName(),
391                                            "getOrganizations", _getOrganizationsParameterTypes9);
392    
393                            MethodHandler methodHandler = new MethodHandler(methodKey,
394                                            companyId, parentOrganizationId);
395    
396                            Object returnObj = null;
397    
398                            try {
399                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
400                            }
401                            catch (Exception e) {
402                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
403                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
404                                    }
405    
406                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
407                            }
408    
409                            return (java.util.List<com.liferay.portal.model.Organization>)returnObj;
410                    }
411                    catch (com.liferay.portal.kernel.exception.SystemException se) {
412                            _log.error(se, se);
413    
414                            throw se;
415                    }
416            }
417    
418            public static java.util.List<com.liferay.portal.model.Organization> getOrganizations(
419                    HttpPrincipal httpPrincipal, long companyId, long parentOrganizationId,
420                    int start, int end)
421                    throws com.liferay.portal.kernel.exception.SystemException {
422                    try {
423                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class.getName(),
424                                            "getOrganizations", _getOrganizationsParameterTypes10);
425    
426                            MethodHandler methodHandler = new MethodHandler(methodKey,
427                                            companyId, parentOrganizationId, start, end);
428    
429                            Object returnObj = null;
430    
431                            try {
432                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
433                            }
434                            catch (Exception e) {
435                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
436                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
437                                    }
438    
439                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
440                            }
441    
442                            return (java.util.List<com.liferay.portal.model.Organization>)returnObj;
443                    }
444                    catch (com.liferay.portal.kernel.exception.SystemException se) {
445                            _log.error(se, se);
446    
447                            throw se;
448                    }
449            }
450    
451            public static int getOrganizationsCount(HttpPrincipal httpPrincipal,
452                    long companyId, long parentOrganizationId)
453                    throws com.liferay.portal.kernel.exception.SystemException {
454                    try {
455                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class.getName(),
456                                            "getOrganizationsCount",
457                                            _getOrganizationsCountParameterTypes11);
458    
459                            MethodHandler methodHandler = new MethodHandler(methodKey,
460                                            companyId, parentOrganizationId);
461    
462                            Object returnObj = null;
463    
464                            try {
465                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
466                            }
467                            catch (Exception e) {
468                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
469                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
470                                    }
471    
472                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
473                            }
474    
475                            return ((Integer)returnObj).intValue();
476                    }
477                    catch (com.liferay.portal.kernel.exception.SystemException se) {
478                            _log.error(se, se);
479    
480                            throw se;
481                    }
482            }
483    
484            public static java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
485                    HttpPrincipal httpPrincipal, long userId)
486                    throws com.liferay.portal.kernel.exception.PortalException,
487                            com.liferay.portal.kernel.exception.SystemException {
488                    try {
489                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class.getName(),
490                                            "getUserOrganizations",
491                                            _getUserOrganizationsParameterTypes12);
492    
493                            MethodHandler methodHandler = new MethodHandler(methodKey, userId);
494    
495                            Object returnObj = null;
496    
497                            try {
498                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
499                            }
500                            catch (Exception e) {
501                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
502                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
503                                    }
504    
505                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
506                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
507                                    }
508    
509                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
510                            }
511    
512                            return (java.util.List<com.liferay.portal.model.Organization>)returnObj;
513                    }
514                    catch (com.liferay.portal.kernel.exception.SystemException se) {
515                            _log.error(se, se);
516    
517                            throw se;
518                    }
519            }
520    
521            public static void setGroupOrganizations(HttpPrincipal httpPrincipal,
522                    long groupId, long[] organizationIds)
523                    throws com.liferay.portal.kernel.exception.PortalException,
524                            com.liferay.portal.kernel.exception.SystemException {
525                    try {
526                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class.getName(),
527                                            "setGroupOrganizations",
528                                            _setGroupOrganizationsParameterTypes13);
529    
530                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
531                                            organizationIds);
532    
533                            try {
534                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
535                            }
536                            catch (Exception e) {
537                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
538                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
539                                    }
540    
541                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
542                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
543                                    }
544    
545                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
546                            }
547                    }
548                    catch (com.liferay.portal.kernel.exception.SystemException se) {
549                            _log.error(se, se);
550    
551                            throw se;
552                    }
553            }
554    
555            public static void unsetGroupOrganizations(HttpPrincipal httpPrincipal,
556                    long groupId, long[] organizationIds)
557                    throws com.liferay.portal.kernel.exception.PortalException,
558                            com.liferay.portal.kernel.exception.SystemException {
559                    try {
560                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class.getName(),
561                                            "unsetGroupOrganizations",
562                                            _unsetGroupOrganizationsParameterTypes14);
563    
564                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
565                                            organizationIds);
566    
567                            try {
568                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
569                            }
570                            catch (Exception e) {
571                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
572                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
573                                    }
574    
575                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
576                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
577                                    }
578    
579                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
580                            }
581                    }
582                    catch (com.liferay.portal.kernel.exception.SystemException se) {
583                            _log.error(se, se);
584    
585                            throw se;
586                    }
587            }
588    
589            public static void unsetPasswordPolicyOrganizations(
590                    HttpPrincipal httpPrincipal, long passwordPolicyId,
591                    long[] organizationIds)
592                    throws com.liferay.portal.kernel.exception.PortalException,
593                            com.liferay.portal.kernel.exception.SystemException {
594                    try {
595                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class.getName(),
596                                            "unsetPasswordPolicyOrganizations",
597                                            _unsetPasswordPolicyOrganizationsParameterTypes15);
598    
599                            MethodHandler methodHandler = new MethodHandler(methodKey,
600                                            passwordPolicyId, organizationIds);
601    
602                            try {
603                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
604                            }
605                            catch (Exception e) {
606                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
607                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
608                                    }
609    
610                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
611                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
612                                    }
613    
614                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
615                            }
616                    }
617                    catch (com.liferay.portal.kernel.exception.SystemException se) {
618                            _log.error(se, se);
619    
620                            throw se;
621                    }
622            }
623    
624            public static com.liferay.portal.model.Organization updateOrganization(
625                    HttpPrincipal httpPrincipal, long organizationId,
626                    long parentOrganizationId, java.lang.String name,
627                    java.lang.String type, boolean recursable, long regionId,
628                    long countryId, int statusId, java.lang.String comments, boolean site,
629                    java.util.List<com.liferay.portal.model.Address> addresses,
630                    java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
631                    java.util.List<com.liferay.portal.model.OrgLabor> orgLabors,
632                    java.util.List<com.liferay.portal.model.Phone> phones,
633                    java.util.List<com.liferay.portal.model.Website> websites,
634                    com.liferay.portal.service.ServiceContext serviceContext)
635                    throws com.liferay.portal.kernel.exception.PortalException,
636                            com.liferay.portal.kernel.exception.SystemException {
637                    try {
638                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class.getName(),
639                                            "updateOrganization", _updateOrganizationParameterTypes16);
640    
641                            MethodHandler methodHandler = new MethodHandler(methodKey,
642                                            organizationId, parentOrganizationId, name, type,
643                                            recursable, regionId, countryId, statusId, comments, site,
644                                            addresses, emailAddresses, orgLabors, phones, websites,
645                                            serviceContext);
646    
647                            Object returnObj = null;
648    
649                            try {
650                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
651                            }
652                            catch (Exception e) {
653                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
654                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
655                                    }
656    
657                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
658                                            throw (com.liferay.portal.kernel.exception.SystemException)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            public static com.liferay.portal.model.Organization updateOrganization(
674                    HttpPrincipal httpPrincipal, long organizationId,
675                    long parentOrganizationId, java.lang.String name,
676                    java.lang.String type, boolean recursable, long regionId,
677                    long countryId, int statusId, java.lang.String comments, boolean site,
678                    com.liferay.portal.service.ServiceContext serviceContext)
679                    throws com.liferay.portal.kernel.exception.PortalException,
680                            com.liferay.portal.kernel.exception.SystemException {
681                    try {
682                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class.getName(),
683                                            "updateOrganization", _updateOrganizationParameterTypes17);
684    
685                            MethodHandler methodHandler = new MethodHandler(methodKey,
686                                            organizationId, parentOrganizationId, name, type,
687                                            recursable, regionId, countryId, statusId, comments, site,
688                                            serviceContext);
689    
690                            Object returnObj = null;
691    
692                            try {
693                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
694                            }
695                            catch (Exception e) {
696                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
697                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
698                                    }
699    
700                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
701                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
702                                    }
703    
704                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
705                            }
706    
707                            return (com.liferay.portal.model.Organization)returnObj;
708                    }
709                    catch (com.liferay.portal.kernel.exception.SystemException se) {
710                            _log.error(se, se);
711    
712                            throw se;
713                    }
714            }
715    
716            private static Log _log = LogFactoryUtil.getLog(OrganizationServiceHttp.class);
717            private static final Class<?>[] _addGroupOrganizationsParameterTypes0 = new Class[] {
718                            long.class, long[].class
719                    };
720            private static final Class<?>[] _addOrganizationParameterTypes1 = new Class[] {
721                            long.class, java.lang.String.class, java.lang.String.class,
722                            boolean.class, long.class, long.class, int.class,
723                            java.lang.String.class, boolean.class, java.util.List.class,
724                            java.util.List.class, java.util.List.class, java.util.List.class,
725                            java.util.List.class,
726                            com.liferay.portal.service.ServiceContext.class
727                    };
728            private static final Class<?>[] _addOrganizationParameterTypes2 = new Class[] {
729                            long.class, java.lang.String.class, java.lang.String.class,
730                            boolean.class, long.class, long.class, int.class,
731                            java.lang.String.class, boolean.class,
732                            com.liferay.portal.service.ServiceContext.class
733                    };
734            private static final Class<?>[] _addPasswordPolicyOrganizationsParameterTypes3 =
735                    new Class[] { long.class, long[].class };
736            private static final Class<?>[] _deleteLogoParameterTypes4 = new Class[] {
737                            long.class
738                    };
739            private static final Class<?>[] _deleteOrganizationParameterTypes5 = new Class[] {
740                            long.class
741                    };
742            private static final Class<?>[] _getManageableOrganizationsParameterTypes6 = new Class[] {
743                            java.lang.String.class, int.class
744                    };
745            private static final Class<?>[] _getOrganizationParameterTypes7 = new Class[] {
746                            long.class
747                    };
748            private static final Class<?>[] _getOrganizationIdParameterTypes8 = new Class[] {
749                            long.class, java.lang.String.class
750                    };
751            private static final Class<?>[] _getOrganizationsParameterTypes9 = new Class[] {
752                            long.class, long.class
753                    };
754            private static final Class<?>[] _getOrganizationsParameterTypes10 = new Class[] {
755                            long.class, long.class, int.class, int.class
756                    };
757            private static final Class<?>[] _getOrganizationsCountParameterTypes11 = new Class[] {
758                            long.class, long.class
759                    };
760            private static final Class<?>[] _getUserOrganizationsParameterTypes12 = new Class[] {
761                            long.class
762                    };
763            private static final Class<?>[] _setGroupOrganizationsParameterTypes13 = new Class[] {
764                            long.class, long[].class
765                    };
766            private static final Class<?>[] _unsetGroupOrganizationsParameterTypes14 = new Class[] {
767                            long.class, long[].class
768                    };
769            private static final Class<?>[] _unsetPasswordPolicyOrganizationsParameterTypes15 =
770                    new Class[] { long.class, long[].class };
771            private static final Class<?>[] _updateOrganizationParameterTypes16 = new Class[] {
772                            long.class, long.class, java.lang.String.class,
773                            java.lang.String.class, boolean.class, long.class, long.class,
774                            int.class, java.lang.String.class, boolean.class,
775                            java.util.List.class, java.util.List.class, java.util.List.class,
776                            java.util.List.class, java.util.List.class,
777                            com.liferay.portal.service.ServiceContext.class
778                    };
779            private static final Class<?>[] _updateOrganizationParameterTypes17 = new Class[] {
780                            long.class, long.class, java.lang.String.class,
781                            java.lang.String.class, boolean.class, long.class, long.class,
782                            int.class, java.lang.String.class, boolean.class,
783                            com.liferay.portal.service.ServiceContext.class
784                    };
785    }