001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service.http;
016    
017    import com.liferay.portal.kernel.log.Log;
018    import com.liferay.portal.kernel.log.LogFactoryUtil;
019    import com.liferay.portal.kernel.util.MethodHandler;
020    import com.liferay.portal.kernel.util.MethodKey;
021    import com.liferay.portal.security.auth.HttpPrincipal;
022    import com.liferay.portal.service.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,
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,
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,
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 com.liferay.portal.model.Organization addOrganization(
179                    HttpPrincipal httpPrincipal, long parentOrganizationId,
180                    java.lang.String name, java.lang.String type, long regionId,
181                    long countryId, int statusId, java.lang.String comments, boolean site,
182                    java.util.List<com.liferay.portal.model.Address> addresses,
183                    java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
184                    java.util.List<com.liferay.portal.model.OrgLabor> orgLabors,
185                    java.util.List<com.liferay.portal.model.Phone> phones,
186                    java.util.List<com.liferay.portal.model.Website> websites,
187                    com.liferay.portal.service.ServiceContext serviceContext)
188                    throws com.liferay.portal.kernel.exception.PortalException,
189                            com.liferay.portal.kernel.exception.SystemException {
190                    try {
191                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class,
192                                            "addOrganization", _addOrganizationParameterTypes3);
193    
194                            MethodHandler methodHandler = new MethodHandler(methodKey,
195                                            parentOrganizationId, name, type, regionId, countryId,
196                                            statusId, comments, site, addresses, emailAddresses,
197                                            orgLabors, phones, websites, serviceContext);
198    
199                            Object returnObj = null;
200    
201                            try {
202                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
203                            }
204                            catch (Exception e) {
205                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
206                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
207                                    }
208    
209                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
210                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
211                                    }
212    
213                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
214                            }
215    
216                            return (com.liferay.portal.model.Organization)returnObj;
217                    }
218                    catch (com.liferay.portal.kernel.exception.SystemException se) {
219                            _log.error(se, se);
220    
221                            throw se;
222                    }
223            }
224    
225            public static com.liferay.portal.model.Organization addOrganization(
226                    HttpPrincipal httpPrincipal, long parentOrganizationId,
227                    java.lang.String name, java.lang.String type, long regionId,
228                    long countryId, int statusId, java.lang.String comments, boolean site,
229                    com.liferay.portal.service.ServiceContext serviceContext)
230                    throws com.liferay.portal.kernel.exception.PortalException,
231                            com.liferay.portal.kernel.exception.SystemException {
232                    try {
233                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class,
234                                            "addOrganization", _addOrganizationParameterTypes4);
235    
236                            MethodHandler methodHandler = new MethodHandler(methodKey,
237                                            parentOrganizationId, name, type, regionId, countryId,
238                                            statusId, comments, site, serviceContext);
239    
240                            Object returnObj = null;
241    
242                            try {
243                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
244                            }
245                            catch (Exception e) {
246                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
247                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
248                                    }
249    
250                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
251                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
252                                    }
253    
254                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
255                            }
256    
257                            return (com.liferay.portal.model.Organization)returnObj;
258                    }
259                    catch (com.liferay.portal.kernel.exception.SystemException se) {
260                            _log.error(se, se);
261    
262                            throw se;
263                    }
264            }
265    
266            public static void addPasswordPolicyOrganizations(
267                    HttpPrincipal httpPrincipal, long passwordPolicyId,
268                    long[] organizationIds)
269                    throws com.liferay.portal.kernel.exception.PortalException,
270                            com.liferay.portal.kernel.exception.SystemException {
271                    try {
272                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class,
273                                            "addPasswordPolicyOrganizations",
274                                            _addPasswordPolicyOrganizationsParameterTypes5);
275    
276                            MethodHandler methodHandler = new MethodHandler(methodKey,
277                                            passwordPolicyId, organizationIds);
278    
279                            try {
280                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
281                            }
282                            catch (Exception e) {
283                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
284                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
285                                    }
286    
287                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
288                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
289                                    }
290    
291                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
292                            }
293                    }
294                    catch (com.liferay.portal.kernel.exception.SystemException se) {
295                            _log.error(se, se);
296    
297                            throw se;
298                    }
299            }
300    
301            public static void deleteLogo(HttpPrincipal httpPrincipal,
302                    long organizationId)
303                    throws com.liferay.portal.kernel.exception.PortalException,
304                            com.liferay.portal.kernel.exception.SystemException {
305                    try {
306                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class,
307                                            "deleteLogo", _deleteLogoParameterTypes6);
308    
309                            MethodHandler methodHandler = new MethodHandler(methodKey,
310                                            organizationId);
311    
312                            try {
313                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
314                            }
315                            catch (Exception e) {
316                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
317                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
318                                    }
319    
320                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
321                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
322                                    }
323    
324                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
325                            }
326                    }
327                    catch (com.liferay.portal.kernel.exception.SystemException se) {
328                            _log.error(se, se);
329    
330                            throw se;
331                    }
332            }
333    
334            public static void deleteOrganization(HttpPrincipal httpPrincipal,
335                    long organizationId)
336                    throws com.liferay.portal.kernel.exception.PortalException,
337                            com.liferay.portal.kernel.exception.SystemException {
338                    try {
339                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class,
340                                            "deleteOrganization", _deleteOrganizationParameterTypes7);
341    
342                            MethodHandler methodHandler = new MethodHandler(methodKey,
343                                            organizationId);
344    
345                            try {
346                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
347                            }
348                            catch (Exception e) {
349                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
350                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
351                                    }
352    
353                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
354                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
355                                    }
356    
357                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
358                            }
359                    }
360                    catch (com.liferay.portal.kernel.exception.SystemException se) {
361                            _log.error(se, se);
362    
363                            throw se;
364                    }
365            }
366    
367            public static java.util.List<com.liferay.portal.model.Organization> getManageableOrganizations(
368                    HttpPrincipal httpPrincipal, java.lang.String actionId, int max)
369                    throws com.liferay.portal.kernel.exception.PortalException,
370                            com.liferay.portal.kernel.exception.SystemException {
371                    try {
372                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class,
373                                            "getManageableOrganizations",
374                                            _getManageableOrganizationsParameterTypes8);
375    
376                            MethodHandler methodHandler = new MethodHandler(methodKey,
377                                            actionId, max);
378    
379                            Object returnObj = null;
380    
381                            try {
382                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
383                            }
384                            catch (Exception e) {
385                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
386                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
387                                    }
388    
389                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
390                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
391                                    }
392    
393                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
394                            }
395    
396                            return (java.util.List<com.liferay.portal.model.Organization>)returnObj;
397                    }
398                    catch (com.liferay.portal.kernel.exception.SystemException se) {
399                            _log.error(se, se);
400    
401                            throw se;
402                    }
403            }
404    
405            public static com.liferay.portal.model.Organization getOrganization(
406                    HttpPrincipal httpPrincipal, long organizationId)
407                    throws com.liferay.portal.kernel.exception.PortalException,
408                            com.liferay.portal.kernel.exception.SystemException {
409                    try {
410                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class,
411                                            "getOrganization", _getOrganizationParameterTypes9);
412    
413                            MethodHandler methodHandler = new MethodHandler(methodKey,
414                                            organizationId);
415    
416                            Object returnObj = null;
417    
418                            try {
419                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
420                            }
421                            catch (Exception e) {
422                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
423                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
424                                    }
425    
426                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
427                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
428                                    }
429    
430                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
431                            }
432    
433                            return (com.liferay.portal.model.Organization)returnObj;
434                    }
435                    catch (com.liferay.portal.kernel.exception.SystemException se) {
436                            _log.error(se, se);
437    
438                            throw se;
439                    }
440            }
441    
442            public static long getOrganizationId(HttpPrincipal httpPrincipal,
443                    long companyId, java.lang.String name)
444                    throws com.liferay.portal.kernel.exception.PortalException,
445                            com.liferay.portal.kernel.exception.SystemException {
446                    try {
447                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class,
448                                            "getOrganizationId", _getOrganizationIdParameterTypes10);
449    
450                            MethodHandler methodHandler = new MethodHandler(methodKey,
451                                            companyId, name);
452    
453                            Object returnObj = null;
454    
455                            try {
456                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
457                            }
458                            catch (Exception e) {
459                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
460                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
461                                    }
462    
463                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
464                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
465                                    }
466    
467                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
468                            }
469    
470                            return ((Long)returnObj).longValue();
471                    }
472                    catch (com.liferay.portal.kernel.exception.SystemException se) {
473                            _log.error(se, se);
474    
475                            throw se;
476                    }
477            }
478    
479            public static java.util.List<com.liferay.portal.model.Organization> getOrganizations(
480                    HttpPrincipal httpPrincipal, long companyId, long parentOrganizationId)
481                    throws com.liferay.portal.kernel.exception.SystemException {
482                    try {
483                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class,
484                                            "getOrganizations", _getOrganizationsParameterTypes11);
485    
486                            MethodHandler methodHandler = new MethodHandler(methodKey,
487                                            companyId, parentOrganizationId);
488    
489                            Object returnObj = null;
490    
491                            try {
492                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
493                            }
494                            catch (Exception e) {
495                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
496                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
497                                    }
498    
499                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
500                            }
501    
502                            return (java.util.List<com.liferay.portal.model.Organization>)returnObj;
503                    }
504                    catch (com.liferay.portal.kernel.exception.SystemException se) {
505                            _log.error(se, se);
506    
507                            throw se;
508                    }
509            }
510    
511            public static java.util.List<com.liferay.portal.model.Organization> getOrganizations(
512                    HttpPrincipal httpPrincipal, long companyId, long parentOrganizationId,
513                    int start, int end)
514                    throws com.liferay.portal.kernel.exception.SystemException {
515                    try {
516                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class,
517                                            "getOrganizations", _getOrganizationsParameterTypes12);
518    
519                            MethodHandler methodHandler = new MethodHandler(methodKey,
520                                            companyId, parentOrganizationId, start, end);
521    
522                            Object returnObj = null;
523    
524                            try {
525                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
526                            }
527                            catch (Exception e) {
528                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
529                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
530                                    }
531    
532                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
533                            }
534    
535                            return (java.util.List<com.liferay.portal.model.Organization>)returnObj;
536                    }
537                    catch (com.liferay.portal.kernel.exception.SystemException se) {
538                            _log.error(se, se);
539    
540                            throw se;
541                    }
542            }
543    
544            public static int getOrganizationsCount(HttpPrincipal httpPrincipal,
545                    long companyId, long parentOrganizationId)
546                    throws com.liferay.portal.kernel.exception.SystemException {
547                    try {
548                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class,
549                                            "getOrganizationsCount",
550                                            _getOrganizationsCountParameterTypes13);
551    
552                            MethodHandler methodHandler = new MethodHandler(methodKey,
553                                            companyId, parentOrganizationId);
554    
555                            Object returnObj = null;
556    
557                            try {
558                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
559                            }
560                            catch (Exception e) {
561                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
562                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
563                                    }
564    
565                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
566                            }
567    
568                            return ((Integer)returnObj).intValue();
569                    }
570                    catch (com.liferay.portal.kernel.exception.SystemException se) {
571                            _log.error(se, se);
572    
573                            throw se;
574                    }
575            }
576    
577            public static java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
578                    HttpPrincipal httpPrincipal, long userId)
579                    throws com.liferay.portal.kernel.exception.PortalException,
580                            com.liferay.portal.kernel.exception.SystemException {
581                    try {
582                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class,
583                                            "getUserOrganizations",
584                                            _getUserOrganizationsParameterTypes14);
585    
586                            MethodHandler methodHandler = new MethodHandler(methodKey, userId);
587    
588                            Object returnObj = null;
589    
590                            try {
591                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
592                            }
593                            catch (Exception e) {
594                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
595                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
596                                    }
597    
598                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
599                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
600                                    }
601    
602                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
603                            }
604    
605                            return (java.util.List<com.liferay.portal.model.Organization>)returnObj;
606                    }
607                    catch (com.liferay.portal.kernel.exception.SystemException se) {
608                            _log.error(se, se);
609    
610                            throw se;
611                    }
612            }
613    
614            public static void setGroupOrganizations(HttpPrincipal httpPrincipal,
615                    long groupId, long[] organizationIds)
616                    throws com.liferay.portal.kernel.exception.PortalException,
617                            com.liferay.portal.kernel.exception.SystemException {
618                    try {
619                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class,
620                                            "setGroupOrganizations",
621                                            _setGroupOrganizationsParameterTypes15);
622    
623                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
624                                            organizationIds);
625    
626                            try {
627                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
628                            }
629                            catch (Exception e) {
630                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
631                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
632                                    }
633    
634                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
635                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
636                                    }
637    
638                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
639                            }
640                    }
641                    catch (com.liferay.portal.kernel.exception.SystemException se) {
642                            _log.error(se, se);
643    
644                            throw se;
645                    }
646            }
647    
648            public static void unsetGroupOrganizations(HttpPrincipal httpPrincipal,
649                    long groupId, long[] organizationIds)
650                    throws com.liferay.portal.kernel.exception.PortalException,
651                            com.liferay.portal.kernel.exception.SystemException {
652                    try {
653                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class,
654                                            "unsetGroupOrganizations",
655                                            _unsetGroupOrganizationsParameterTypes16);
656    
657                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
658                                            organizationIds);
659    
660                            try {
661                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
662                            }
663                            catch (Exception e) {
664                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
665                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
666                                    }
667    
668                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
669                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
670                                    }
671    
672                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
673                            }
674                    }
675                    catch (com.liferay.portal.kernel.exception.SystemException se) {
676                            _log.error(se, se);
677    
678                            throw se;
679                    }
680            }
681    
682            public static void unsetPasswordPolicyOrganizations(
683                    HttpPrincipal httpPrincipal, long passwordPolicyId,
684                    long[] organizationIds)
685                    throws com.liferay.portal.kernel.exception.PortalException,
686                            com.liferay.portal.kernel.exception.SystemException {
687                    try {
688                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class,
689                                            "unsetPasswordPolicyOrganizations",
690                                            _unsetPasswordPolicyOrganizationsParameterTypes17);
691    
692                            MethodHandler methodHandler = new MethodHandler(methodKey,
693                                            passwordPolicyId, organizationIds);
694    
695                            try {
696                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
697                            }
698                            catch (Exception e) {
699                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
700                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
701                                    }
702    
703                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
704                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
705                                    }
706    
707                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
708                            }
709                    }
710                    catch (com.liferay.portal.kernel.exception.SystemException se) {
711                            _log.error(se, se);
712    
713                            throw se;
714                    }
715            }
716    
717            public static com.liferay.portal.model.Organization updateOrganization(
718                    HttpPrincipal httpPrincipal, long organizationId,
719                    long parentOrganizationId, java.lang.String name,
720                    java.lang.String type, boolean recursable, long regionId,
721                    long countryId, int statusId, java.lang.String comments, boolean site,
722                    java.util.List<com.liferay.portal.model.Address> addresses,
723                    java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
724                    java.util.List<com.liferay.portal.model.OrgLabor> orgLabors,
725                    java.util.List<com.liferay.portal.model.Phone> phones,
726                    java.util.List<com.liferay.portal.model.Website> websites,
727                    com.liferay.portal.service.ServiceContext serviceContext)
728                    throws com.liferay.portal.kernel.exception.PortalException,
729                            com.liferay.portal.kernel.exception.SystemException {
730                    try {
731                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class,
732                                            "updateOrganization", _updateOrganizationParameterTypes18);
733    
734                            MethodHandler methodHandler = new MethodHandler(methodKey,
735                                            organizationId, parentOrganizationId, name, type,
736                                            recursable, regionId, countryId, statusId, comments, site,
737                                            addresses, emailAddresses, orgLabors, phones, websites,
738                                            serviceContext);
739    
740                            Object returnObj = null;
741    
742                            try {
743                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
744                            }
745                            catch (Exception e) {
746                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
747                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
748                                    }
749    
750                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
751                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
752                                    }
753    
754                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
755                            }
756    
757                            return (com.liferay.portal.model.Organization)returnObj;
758                    }
759                    catch (com.liferay.portal.kernel.exception.SystemException se) {
760                            _log.error(se, se);
761    
762                            throw se;
763                    }
764            }
765    
766            public static com.liferay.portal.model.Organization updateOrganization(
767                    HttpPrincipal httpPrincipal, long organizationId,
768                    long parentOrganizationId, java.lang.String name,
769                    java.lang.String type, boolean recursable, long regionId,
770                    long countryId, int statusId, java.lang.String comments, boolean site,
771                    com.liferay.portal.service.ServiceContext serviceContext)
772                    throws com.liferay.portal.kernel.exception.PortalException,
773                            com.liferay.portal.kernel.exception.SystemException {
774                    try {
775                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class,
776                                            "updateOrganization", _updateOrganizationParameterTypes19);
777    
778                            MethodHandler methodHandler = new MethodHandler(methodKey,
779                                            organizationId, parentOrganizationId, name, type,
780                                            recursable, regionId, countryId, statusId, comments, site,
781                                            serviceContext);
782    
783                            Object returnObj = null;
784    
785                            try {
786                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
787                            }
788                            catch (Exception e) {
789                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
790                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
791                                    }
792    
793                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
794                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
795                                    }
796    
797                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
798                            }
799    
800                            return (com.liferay.portal.model.Organization)returnObj;
801                    }
802                    catch (com.liferay.portal.kernel.exception.SystemException se) {
803                            _log.error(se, se);
804    
805                            throw se;
806                    }
807            }
808    
809            public static com.liferay.portal.model.Organization updateOrganization(
810                    HttpPrincipal httpPrincipal, long organizationId,
811                    long parentOrganizationId, java.lang.String name,
812                    java.lang.String type, long regionId, long countryId, int statusId,
813                    java.lang.String comments, boolean site,
814                    java.util.List<com.liferay.portal.model.Address> addresses,
815                    java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
816                    java.util.List<com.liferay.portal.model.OrgLabor> orgLabors,
817                    java.util.List<com.liferay.portal.model.Phone> phones,
818                    java.util.List<com.liferay.portal.model.Website> websites,
819                    com.liferay.portal.service.ServiceContext serviceContext)
820                    throws com.liferay.portal.kernel.exception.PortalException,
821                            com.liferay.portal.kernel.exception.SystemException {
822                    try {
823                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class,
824                                            "updateOrganization", _updateOrganizationParameterTypes20);
825    
826                            MethodHandler methodHandler = new MethodHandler(methodKey,
827                                            organizationId, parentOrganizationId, name, type, regionId,
828                                            countryId, statusId, comments, site, addresses,
829                                            emailAddresses, orgLabors, phones, websites, serviceContext);
830    
831                            Object returnObj = null;
832    
833                            try {
834                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
835                            }
836                            catch (Exception e) {
837                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
838                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
839                                    }
840    
841                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
842                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
843                                    }
844    
845                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
846                            }
847    
848                            return (com.liferay.portal.model.Organization)returnObj;
849                    }
850                    catch (com.liferay.portal.kernel.exception.SystemException se) {
851                            _log.error(se, se);
852    
853                            throw se;
854                    }
855            }
856    
857            public static com.liferay.portal.model.Organization updateOrganization(
858                    HttpPrincipal httpPrincipal, long organizationId,
859                    long parentOrganizationId, java.lang.String name,
860                    java.lang.String type, long regionId, long countryId, int statusId,
861                    java.lang.String comments, boolean site,
862                    com.liferay.portal.service.ServiceContext serviceContext)
863                    throws com.liferay.portal.kernel.exception.PortalException,
864                            com.liferay.portal.kernel.exception.SystemException {
865                    try {
866                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class,
867                                            "updateOrganization", _updateOrganizationParameterTypes21);
868    
869                            MethodHandler methodHandler = new MethodHandler(methodKey,
870                                            organizationId, parentOrganizationId, name, type, regionId,
871                                            countryId, statusId, comments, site, serviceContext);
872    
873                            Object returnObj = null;
874    
875                            try {
876                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
877                            }
878                            catch (Exception e) {
879                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
880                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
881                                    }
882    
883                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
884                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
885                                    }
886    
887                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
888                            }
889    
890                            return (com.liferay.portal.model.Organization)returnObj;
891                    }
892                    catch (com.liferay.portal.kernel.exception.SystemException se) {
893                            _log.error(se, se);
894    
895                            throw se;
896                    }
897            }
898    
899            private static Log _log = LogFactoryUtil.getLog(OrganizationServiceHttp.class);
900            private static final Class<?>[] _addGroupOrganizationsParameterTypes0 = new Class[] {
901                            long.class, long[].class
902                    };
903            private static final Class<?>[] _addOrganizationParameterTypes1 = new Class[] {
904                            long.class, java.lang.String.class, java.lang.String.class,
905                            boolean.class, long.class, long.class, int.class,
906                            java.lang.String.class, boolean.class, java.util.List.class,
907                            java.util.List.class, java.util.List.class, java.util.List.class,
908                            java.util.List.class,
909                            com.liferay.portal.service.ServiceContext.class
910                    };
911            private static final Class<?>[] _addOrganizationParameterTypes2 = new Class[] {
912                            long.class, java.lang.String.class, java.lang.String.class,
913                            boolean.class, long.class, long.class, int.class,
914                            java.lang.String.class, boolean.class,
915                            com.liferay.portal.service.ServiceContext.class
916                    };
917            private static final Class<?>[] _addOrganizationParameterTypes3 = new Class[] {
918                            long.class, java.lang.String.class, java.lang.String.class,
919                            long.class, long.class, int.class, java.lang.String.class,
920                            boolean.class, java.util.List.class, java.util.List.class,
921                            java.util.List.class, java.util.List.class, java.util.List.class,
922                            com.liferay.portal.service.ServiceContext.class
923                    };
924            private static final Class<?>[] _addOrganizationParameterTypes4 = new Class[] {
925                            long.class, java.lang.String.class, java.lang.String.class,
926                            long.class, long.class, int.class, java.lang.String.class,
927                            boolean.class, com.liferay.portal.service.ServiceContext.class
928                    };
929            private static final Class<?>[] _addPasswordPolicyOrganizationsParameterTypes5 =
930                    new Class[] { long.class, long[].class };
931            private static final Class<?>[] _deleteLogoParameterTypes6 = new Class[] {
932                            long.class
933                    };
934            private static final Class<?>[] _deleteOrganizationParameterTypes7 = new Class[] {
935                            long.class
936                    };
937            private static final Class<?>[] _getManageableOrganizationsParameterTypes8 = new Class[] {
938                            java.lang.String.class, int.class
939                    };
940            private static final Class<?>[] _getOrganizationParameterTypes9 = new Class[] {
941                            long.class
942                    };
943            private static final Class<?>[] _getOrganizationIdParameterTypes10 = new Class[] {
944                            long.class, java.lang.String.class
945                    };
946            private static final Class<?>[] _getOrganizationsParameterTypes11 = new Class[] {
947                            long.class, long.class
948                    };
949            private static final Class<?>[] _getOrganizationsParameterTypes12 = new Class[] {
950                            long.class, long.class, int.class, int.class
951                    };
952            private static final Class<?>[] _getOrganizationsCountParameterTypes13 = new Class[] {
953                            long.class, long.class
954                    };
955            private static final Class<?>[] _getUserOrganizationsParameterTypes14 = new Class[] {
956                            long.class
957                    };
958            private static final Class<?>[] _setGroupOrganizationsParameterTypes15 = new Class[] {
959                            long.class, long[].class
960                    };
961            private static final Class<?>[] _unsetGroupOrganizationsParameterTypes16 = new Class[] {
962                            long.class, long[].class
963                    };
964            private static final Class<?>[] _unsetPasswordPolicyOrganizationsParameterTypes17 =
965                    new Class[] { long.class, long[].class };
966            private static final Class<?>[] _updateOrganizationParameterTypes18 = new Class[] {
967                            long.class, long.class, java.lang.String.class,
968                            java.lang.String.class, boolean.class, long.class, long.class,
969                            int.class, java.lang.String.class, boolean.class,
970                            java.util.List.class, java.util.List.class, java.util.List.class,
971                            java.util.List.class, java.util.List.class,
972                            com.liferay.portal.service.ServiceContext.class
973                    };
974            private static final Class<?>[] _updateOrganizationParameterTypes19 = new Class[] {
975                            long.class, long.class, java.lang.String.class,
976                            java.lang.String.class, boolean.class, long.class, long.class,
977                            int.class, java.lang.String.class, boolean.class,
978                            com.liferay.portal.service.ServiceContext.class
979                    };
980            private static final Class<?>[] _updateOrganizationParameterTypes20 = new Class[] {
981                            long.class, long.class, java.lang.String.class,
982                            java.lang.String.class, long.class, long.class, int.class,
983                            java.lang.String.class, boolean.class, java.util.List.class,
984                            java.util.List.class, java.util.List.class, java.util.List.class,
985                            java.util.List.class,
986                            com.liferay.portal.service.ServiceContext.class
987                    };
988            private static final Class<?>[] _updateOrganizationParameterTypes21 = new Class[] {
989                            long.class, long.class, java.lang.String.class,
990                            java.lang.String.class, long.class, long.class, int.class,
991                            java.lang.String.class, boolean.class,
992                            com.liferay.portal.service.ServiceContext.class
993                    };
994    }