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     * Provides the HTTP utility for the
026     * {@link com.liferay.portal.service.OrganizationServiceUtil} service utility. The
027     * static methods of this class calls the same methods of the service utility.
028     * However, the signatures are different because it requires an additional
029     * {@link com.liferay.portal.security.auth.HttpPrincipal} parameter.
030     *
031     * <p>
032     * The benefits of using the HTTP utility is that it is fast and allows for
033     * tunneling without the cost of serializing to text. The drawback is that it
034     * only works with Java.
035     * </p>
036     *
037     * <p>
038     * Set the property <b>tunnel.servlet.hosts.allowed</b> in portal.properties to
039     * configure security.
040     * </p>
041     *
042     * <p>
043     * The HTTP utility is only generated for remote services.
044     * </p>
045     *
046     * @author Brian Wing Shun Chan
047     * @see OrganizationServiceSoap
048     * @see com.liferay.portal.security.auth.HttpPrincipal
049     * @see com.liferay.portal.service.OrganizationServiceUtil
050     * @generated
051     */
052    public class OrganizationServiceHttp {
053            public static void addGroupOrganizations(HttpPrincipal httpPrincipal,
054                    long groupId, long[] organizationIds)
055                    throws com.liferay.portal.kernel.exception.PortalException,
056                            com.liferay.portal.kernel.exception.SystemException {
057                    try {
058                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class,
059                                            "addGroupOrganizations",
060                                            _addGroupOrganizationsParameterTypes0);
061    
062                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
063                                            organizationIds);
064    
065                            try {
066                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
067                            }
068                            catch (Exception e) {
069                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
070                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
071                                    }
072    
073                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
074                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
075                                    }
076    
077                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
078                            }
079                    }
080                    catch (com.liferay.portal.kernel.exception.SystemException se) {
081                            _log.error(se, se);
082    
083                            throw se;
084                    }
085            }
086    
087            public static com.liferay.portal.model.Organization addOrganization(
088                    HttpPrincipal httpPrincipal, long parentOrganizationId,
089                    java.lang.String name, java.lang.String type, boolean recursable,
090                    long regionId, long countryId, int statusId, java.lang.String comments,
091                    boolean site,
092                    java.util.List<com.liferay.portal.model.Address> addresses,
093                    java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
094                    java.util.List<com.liferay.portal.model.OrgLabor> orgLabors,
095                    java.util.List<com.liferay.portal.model.Phone> phones,
096                    java.util.List<com.liferay.portal.model.Website> websites,
097                    com.liferay.portal.service.ServiceContext serviceContext)
098                    throws com.liferay.portal.kernel.exception.PortalException,
099                            com.liferay.portal.kernel.exception.SystemException {
100                    try {
101                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class,
102                                            "addOrganization", _addOrganizationParameterTypes1);
103    
104                            MethodHandler methodHandler = new MethodHandler(methodKey,
105                                            parentOrganizationId, name, type, recursable, regionId,
106                                            countryId, statusId, comments, site, addresses,
107                                            emailAddresses, orgLabors, phones, websites, serviceContext);
108    
109                            Object returnObj = null;
110    
111                            try {
112                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
113                            }
114                            catch (Exception e) {
115                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
116                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
117                                    }
118    
119                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
120                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
121                                    }
122    
123                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
124                            }
125    
126                            return (com.liferay.portal.model.Organization)returnObj;
127                    }
128                    catch (com.liferay.portal.kernel.exception.SystemException se) {
129                            _log.error(se, se);
130    
131                            throw se;
132                    }
133            }
134    
135            public static com.liferay.portal.model.Organization addOrganization(
136                    HttpPrincipal httpPrincipal, long parentOrganizationId,
137                    java.lang.String name, java.lang.String type, boolean recursable,
138                    long regionId, long countryId, int statusId, java.lang.String comments,
139                    boolean site, com.liferay.portal.service.ServiceContext serviceContext)
140                    throws com.liferay.portal.kernel.exception.PortalException,
141                            com.liferay.portal.kernel.exception.SystemException {
142                    try {
143                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class,
144                                            "addOrganization", _addOrganizationParameterTypes2);
145    
146                            MethodHandler methodHandler = new MethodHandler(methodKey,
147                                            parentOrganizationId, name, type, recursable, regionId,
148                                            countryId, statusId, comments, site, serviceContext);
149    
150                            Object returnObj = null;
151    
152                            try {
153                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
154                            }
155                            catch (Exception e) {
156                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
157                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
158                                    }
159    
160                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
161                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
162                                    }
163    
164                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
165                            }
166    
167                            return (com.liferay.portal.model.Organization)returnObj;
168                    }
169                    catch (com.liferay.portal.kernel.exception.SystemException se) {
170                            _log.error(se, se);
171    
172                            throw se;
173                    }
174            }
175    
176            public static com.liferay.portal.model.Organization addOrganization(
177                    HttpPrincipal httpPrincipal, long parentOrganizationId,
178                    java.lang.String name, java.lang.String type, long regionId,
179                    long countryId, int statusId, java.lang.String comments, boolean site,
180                    java.util.List<com.liferay.portal.model.Address> addresses,
181                    java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
182                    java.util.List<com.liferay.portal.model.OrgLabor> orgLabors,
183                    java.util.List<com.liferay.portal.model.Phone> phones,
184                    java.util.List<com.liferay.portal.model.Website> websites,
185                    com.liferay.portal.service.ServiceContext serviceContext)
186                    throws com.liferay.portal.kernel.exception.PortalException,
187                            com.liferay.portal.kernel.exception.SystemException {
188                    try {
189                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class,
190                                            "addOrganization", _addOrganizationParameterTypes3);
191    
192                            MethodHandler methodHandler = new MethodHandler(methodKey,
193                                            parentOrganizationId, name, type, regionId, countryId,
194                                            statusId, comments, site, addresses, emailAddresses,
195                                            orgLabors, phones, websites, serviceContext);
196    
197                            Object returnObj = null;
198    
199                            try {
200                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
201                            }
202                            catch (Exception e) {
203                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
204                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
205                                    }
206    
207                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
208                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
209                                    }
210    
211                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
212                            }
213    
214                            return (com.liferay.portal.model.Organization)returnObj;
215                    }
216                    catch (com.liferay.portal.kernel.exception.SystemException se) {
217                            _log.error(se, se);
218    
219                            throw se;
220                    }
221            }
222    
223            public static com.liferay.portal.model.Organization addOrganization(
224                    HttpPrincipal httpPrincipal, long parentOrganizationId,
225                    java.lang.String name, java.lang.String type, long regionId,
226                    long countryId, int statusId, java.lang.String comments, boolean site,
227                    com.liferay.portal.service.ServiceContext serviceContext)
228                    throws com.liferay.portal.kernel.exception.PortalException,
229                            com.liferay.portal.kernel.exception.SystemException {
230                    try {
231                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class,
232                                            "addOrganization", _addOrganizationParameterTypes4);
233    
234                            MethodHandler methodHandler = new MethodHandler(methodKey,
235                                            parentOrganizationId, name, type, regionId, countryId,
236                                            statusId, comments, site, serviceContext);
237    
238                            Object returnObj = null;
239    
240                            try {
241                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
242                            }
243                            catch (Exception e) {
244                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
245                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
246                                    }
247    
248                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
249                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
250                                    }
251    
252                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
253                            }
254    
255                            return (com.liferay.portal.model.Organization)returnObj;
256                    }
257                    catch (com.liferay.portal.kernel.exception.SystemException se) {
258                            _log.error(se, se);
259    
260                            throw se;
261                    }
262            }
263    
264            public static void addPasswordPolicyOrganizations(
265                    HttpPrincipal httpPrincipal, long passwordPolicyId,
266                    long[] organizationIds)
267                    throws com.liferay.portal.kernel.exception.PortalException,
268                            com.liferay.portal.kernel.exception.SystemException {
269                    try {
270                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class,
271                                            "addPasswordPolicyOrganizations",
272                                            _addPasswordPolicyOrganizationsParameterTypes5);
273    
274                            MethodHandler methodHandler = new MethodHandler(methodKey,
275                                            passwordPolicyId, organizationIds);
276    
277                            try {
278                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
279                            }
280                            catch (Exception e) {
281                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
282                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
283                                    }
284    
285                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
286                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
287                                    }
288    
289                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
290                            }
291                    }
292                    catch (com.liferay.portal.kernel.exception.SystemException se) {
293                            _log.error(se, se);
294    
295                            throw se;
296                    }
297            }
298    
299            public static void deleteLogo(HttpPrincipal httpPrincipal,
300                    long organizationId)
301                    throws com.liferay.portal.kernel.exception.PortalException,
302                            com.liferay.portal.kernel.exception.SystemException {
303                    try {
304                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class,
305                                            "deleteLogo", _deleteLogoParameterTypes6);
306    
307                            MethodHandler methodHandler = new MethodHandler(methodKey,
308                                            organizationId);
309    
310                            try {
311                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
312                            }
313                            catch (Exception e) {
314                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
315                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
316                                    }
317    
318                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
319                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
320                                    }
321    
322                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
323                            }
324                    }
325                    catch (com.liferay.portal.kernel.exception.SystemException se) {
326                            _log.error(se, se);
327    
328                            throw se;
329                    }
330            }
331    
332            public static void deleteOrganization(HttpPrincipal httpPrincipal,
333                    long organizationId)
334                    throws com.liferay.portal.kernel.exception.PortalException,
335                            com.liferay.portal.kernel.exception.SystemException {
336                    try {
337                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class,
338                                            "deleteOrganization", _deleteOrganizationParameterTypes7);
339    
340                            MethodHandler methodHandler = new MethodHandler(methodKey,
341                                            organizationId);
342    
343                            try {
344                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
345                            }
346                            catch (Exception e) {
347                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
348                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
349                                    }
350    
351                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
352                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
353                                    }
354    
355                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
356                            }
357                    }
358                    catch (com.liferay.portal.kernel.exception.SystemException se) {
359                            _log.error(se, se);
360    
361                            throw se;
362                    }
363            }
364    
365            public static java.util.List<com.liferay.portal.model.Organization> getManageableOrganizations(
366                    HttpPrincipal httpPrincipal, java.lang.String actionId, int max)
367                    throws com.liferay.portal.kernel.exception.PortalException,
368                            com.liferay.portal.kernel.exception.SystemException {
369                    try {
370                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class,
371                                            "getManageableOrganizations",
372                                            _getManageableOrganizationsParameterTypes8);
373    
374                            MethodHandler methodHandler = new MethodHandler(methodKey,
375                                            actionId, max);
376    
377                            Object returnObj = null;
378    
379                            try {
380                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
381                            }
382                            catch (Exception e) {
383                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
384                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
385                                    }
386    
387                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
388                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
389                                    }
390    
391                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
392                            }
393    
394                            return (java.util.List<com.liferay.portal.model.Organization>)returnObj;
395                    }
396                    catch (com.liferay.portal.kernel.exception.SystemException se) {
397                            _log.error(se, se);
398    
399                            throw se;
400                    }
401            }
402    
403            public static com.liferay.portal.model.Organization getOrganization(
404                    HttpPrincipal httpPrincipal, long organizationId)
405                    throws com.liferay.portal.kernel.exception.PortalException,
406                            com.liferay.portal.kernel.exception.SystemException {
407                    try {
408                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class,
409                                            "getOrganization", _getOrganizationParameterTypes9);
410    
411                            MethodHandler methodHandler = new MethodHandler(methodKey,
412                                            organizationId);
413    
414                            Object returnObj = null;
415    
416                            try {
417                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
418                            }
419                            catch (Exception e) {
420                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
421                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
422                                    }
423    
424                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
425                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
426                                    }
427    
428                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
429                            }
430    
431                            return (com.liferay.portal.model.Organization)returnObj;
432                    }
433                    catch (com.liferay.portal.kernel.exception.SystemException se) {
434                            _log.error(se, se);
435    
436                            throw se;
437                    }
438            }
439    
440            public static long getOrganizationId(HttpPrincipal httpPrincipal,
441                    long companyId, java.lang.String name)
442                    throws com.liferay.portal.kernel.exception.PortalException,
443                            com.liferay.portal.kernel.exception.SystemException {
444                    try {
445                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class,
446                                            "getOrganizationId", _getOrganizationIdParameterTypes10);
447    
448                            MethodHandler methodHandler = new MethodHandler(methodKey,
449                                            companyId, name);
450    
451                            Object returnObj = null;
452    
453                            try {
454                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
455                            }
456                            catch (Exception e) {
457                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
458                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
459                                    }
460    
461                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
462                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
463                                    }
464    
465                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
466                            }
467    
468                            return ((Long)returnObj).longValue();
469                    }
470                    catch (com.liferay.portal.kernel.exception.SystemException se) {
471                            _log.error(se, se);
472    
473                            throw se;
474                    }
475            }
476    
477            public static java.util.List<com.liferay.portal.model.Organization> getOrganizations(
478                    HttpPrincipal httpPrincipal, long companyId, long parentOrganizationId)
479                    throws com.liferay.portal.kernel.exception.SystemException {
480                    try {
481                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class,
482                                            "getOrganizations", _getOrganizationsParameterTypes11);
483    
484                            MethodHandler methodHandler = new MethodHandler(methodKey,
485                                            companyId, parentOrganizationId);
486    
487                            Object returnObj = null;
488    
489                            try {
490                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
491                            }
492                            catch (Exception e) {
493                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
494                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
495                                    }
496    
497                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
498                            }
499    
500                            return (java.util.List<com.liferay.portal.model.Organization>)returnObj;
501                    }
502                    catch (com.liferay.portal.kernel.exception.SystemException se) {
503                            _log.error(se, se);
504    
505                            throw se;
506                    }
507            }
508    
509            public static java.util.List<com.liferay.portal.model.Organization> getOrganizations(
510                    HttpPrincipal httpPrincipal, long companyId, long parentOrganizationId,
511                    int start, int end)
512                    throws com.liferay.portal.kernel.exception.SystemException {
513                    try {
514                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class,
515                                            "getOrganizations", _getOrganizationsParameterTypes12);
516    
517                            MethodHandler methodHandler = new MethodHandler(methodKey,
518                                            companyId, parentOrganizationId, start, end);
519    
520                            Object returnObj = null;
521    
522                            try {
523                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
524                            }
525                            catch (Exception e) {
526                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
527                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
528                                    }
529    
530                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
531                            }
532    
533                            return (java.util.List<com.liferay.portal.model.Organization>)returnObj;
534                    }
535                    catch (com.liferay.portal.kernel.exception.SystemException se) {
536                            _log.error(se, se);
537    
538                            throw se;
539                    }
540            }
541    
542            public static int getOrganizationsCount(HttpPrincipal httpPrincipal,
543                    long companyId, long parentOrganizationId)
544                    throws com.liferay.portal.kernel.exception.SystemException {
545                    try {
546                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class,
547                                            "getOrganizationsCount",
548                                            _getOrganizationsCountParameterTypes13);
549    
550                            MethodHandler methodHandler = new MethodHandler(methodKey,
551                                            companyId, parentOrganizationId);
552    
553                            Object returnObj = null;
554    
555                            try {
556                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
557                            }
558                            catch (Exception e) {
559                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
560                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
561                                    }
562    
563                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
564                            }
565    
566                            return ((Integer)returnObj).intValue();
567                    }
568                    catch (com.liferay.portal.kernel.exception.SystemException se) {
569                            _log.error(se, se);
570    
571                            throw se;
572                    }
573            }
574    
575            public static java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
576                    HttpPrincipal httpPrincipal, long userId)
577                    throws com.liferay.portal.kernel.exception.PortalException,
578                            com.liferay.portal.kernel.exception.SystemException {
579                    try {
580                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class,
581                                            "getUserOrganizations",
582                                            _getUserOrganizationsParameterTypes14);
583    
584                            MethodHandler methodHandler = new MethodHandler(methodKey, userId);
585    
586                            Object returnObj = null;
587    
588                            try {
589                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
590                            }
591                            catch (Exception e) {
592                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
593                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
594                                    }
595    
596                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
597                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
598                                    }
599    
600                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
601                            }
602    
603                            return (java.util.List<com.liferay.portal.model.Organization>)returnObj;
604                    }
605                    catch (com.liferay.portal.kernel.exception.SystemException se) {
606                            _log.error(se, se);
607    
608                            throw se;
609                    }
610            }
611    
612            public static void setGroupOrganizations(HttpPrincipal httpPrincipal,
613                    long groupId, long[] organizationIds)
614                    throws com.liferay.portal.kernel.exception.PortalException,
615                            com.liferay.portal.kernel.exception.SystemException {
616                    try {
617                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class,
618                                            "setGroupOrganizations",
619                                            _setGroupOrganizationsParameterTypes15);
620    
621                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
622                                            organizationIds);
623    
624                            try {
625                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
626                            }
627                            catch (Exception e) {
628                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
629                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
630                                    }
631    
632                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
633                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
634                                    }
635    
636                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
637                            }
638                    }
639                    catch (com.liferay.portal.kernel.exception.SystemException se) {
640                            _log.error(se, se);
641    
642                            throw se;
643                    }
644            }
645    
646            public static void unsetGroupOrganizations(HttpPrincipal httpPrincipal,
647                    long groupId, long[] organizationIds)
648                    throws com.liferay.portal.kernel.exception.PortalException,
649                            com.liferay.portal.kernel.exception.SystemException {
650                    try {
651                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class,
652                                            "unsetGroupOrganizations",
653                                            _unsetGroupOrganizationsParameterTypes16);
654    
655                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
656                                            organizationIds);
657    
658                            try {
659                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
660                            }
661                            catch (Exception e) {
662                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
663                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
664                                    }
665    
666                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
667                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
668                                    }
669    
670                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
671                            }
672                    }
673                    catch (com.liferay.portal.kernel.exception.SystemException se) {
674                            _log.error(se, se);
675    
676                            throw se;
677                    }
678            }
679    
680            public static void unsetPasswordPolicyOrganizations(
681                    HttpPrincipal httpPrincipal, long passwordPolicyId,
682                    long[] organizationIds)
683                    throws com.liferay.portal.kernel.exception.PortalException,
684                            com.liferay.portal.kernel.exception.SystemException {
685                    try {
686                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class,
687                                            "unsetPasswordPolicyOrganizations",
688                                            _unsetPasswordPolicyOrganizationsParameterTypes17);
689    
690                            MethodHandler methodHandler = new MethodHandler(methodKey,
691                                            passwordPolicyId, organizationIds);
692    
693                            try {
694                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
695                            }
696                            catch (Exception e) {
697                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
698                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
699                                    }
700    
701                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
702                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
703                                    }
704    
705                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
706                            }
707                    }
708                    catch (com.liferay.portal.kernel.exception.SystemException se) {
709                            _log.error(se, se);
710    
711                            throw se;
712                    }
713            }
714    
715            public static com.liferay.portal.model.Organization updateOrganization(
716                    HttpPrincipal httpPrincipal, long organizationId,
717                    long parentOrganizationId, java.lang.String name,
718                    java.lang.String type, boolean recursable, long regionId,
719                    long countryId, int statusId, java.lang.String comments, boolean site,
720                    java.util.List<com.liferay.portal.model.Address> addresses,
721                    java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
722                    java.util.List<com.liferay.portal.model.OrgLabor> orgLabors,
723                    java.util.List<com.liferay.portal.model.Phone> phones,
724                    java.util.List<com.liferay.portal.model.Website> websites,
725                    com.liferay.portal.service.ServiceContext serviceContext)
726                    throws com.liferay.portal.kernel.exception.PortalException,
727                            com.liferay.portal.kernel.exception.SystemException {
728                    try {
729                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class,
730                                            "updateOrganization", _updateOrganizationParameterTypes18);
731    
732                            MethodHandler methodHandler = new MethodHandler(methodKey,
733                                            organizationId, parentOrganizationId, name, type,
734                                            recursable, regionId, countryId, statusId, comments, site,
735                                            addresses, emailAddresses, orgLabors, phones, websites,
736                                            serviceContext);
737    
738                            Object returnObj = null;
739    
740                            try {
741                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
742                            }
743                            catch (Exception e) {
744                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
745                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
746                                    }
747    
748                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
749                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
750                                    }
751    
752                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
753                            }
754    
755                            return (com.liferay.portal.model.Organization)returnObj;
756                    }
757                    catch (com.liferay.portal.kernel.exception.SystemException se) {
758                            _log.error(se, se);
759    
760                            throw se;
761                    }
762            }
763    
764            public static com.liferay.portal.model.Organization updateOrganization(
765                    HttpPrincipal httpPrincipal, long organizationId,
766                    long parentOrganizationId, java.lang.String name,
767                    java.lang.String type, boolean recursable, long regionId,
768                    long countryId, int statusId, java.lang.String comments, boolean site,
769                    com.liferay.portal.service.ServiceContext serviceContext)
770                    throws com.liferay.portal.kernel.exception.PortalException,
771                            com.liferay.portal.kernel.exception.SystemException {
772                    try {
773                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class,
774                                            "updateOrganization", _updateOrganizationParameterTypes19);
775    
776                            MethodHandler methodHandler = new MethodHandler(methodKey,
777                                            organizationId, parentOrganizationId, name, type,
778                                            recursable, regionId, countryId, statusId, comments, site,
779                                            serviceContext);
780    
781                            Object returnObj = null;
782    
783                            try {
784                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
785                            }
786                            catch (Exception e) {
787                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
788                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
789                                    }
790    
791                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
792                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
793                                    }
794    
795                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
796                            }
797    
798                            return (com.liferay.portal.model.Organization)returnObj;
799                    }
800                    catch (com.liferay.portal.kernel.exception.SystemException se) {
801                            _log.error(se, se);
802    
803                            throw se;
804                    }
805            }
806    
807            public static com.liferay.portal.model.Organization updateOrganization(
808                    HttpPrincipal httpPrincipal, long organizationId,
809                    long parentOrganizationId, java.lang.String name,
810                    java.lang.String type, long regionId, long countryId, int statusId,
811                    java.lang.String comments, boolean site,
812                    java.util.List<com.liferay.portal.model.Address> addresses,
813                    java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
814                    java.util.List<com.liferay.portal.model.OrgLabor> orgLabors,
815                    java.util.List<com.liferay.portal.model.Phone> phones,
816                    java.util.List<com.liferay.portal.model.Website> websites,
817                    com.liferay.portal.service.ServiceContext serviceContext)
818                    throws com.liferay.portal.kernel.exception.PortalException,
819                            com.liferay.portal.kernel.exception.SystemException {
820                    try {
821                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class,
822                                            "updateOrganization", _updateOrganizationParameterTypes20);
823    
824                            MethodHandler methodHandler = new MethodHandler(methodKey,
825                                            organizationId, parentOrganizationId, name, type, regionId,
826                                            countryId, statusId, comments, site, addresses,
827                                            emailAddresses, orgLabors, phones, websites, serviceContext);
828    
829                            Object returnObj = null;
830    
831                            try {
832                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
833                            }
834                            catch (Exception e) {
835                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
836                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
837                                    }
838    
839                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
840                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
841                                    }
842    
843                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
844                            }
845    
846                            return (com.liferay.portal.model.Organization)returnObj;
847                    }
848                    catch (com.liferay.portal.kernel.exception.SystemException se) {
849                            _log.error(se, se);
850    
851                            throw se;
852                    }
853            }
854    
855            public static com.liferay.portal.model.Organization updateOrganization(
856                    HttpPrincipal httpPrincipal, long organizationId,
857                    long parentOrganizationId, java.lang.String name,
858                    java.lang.String type, long regionId, long countryId, int statusId,
859                    java.lang.String comments, boolean site,
860                    com.liferay.portal.service.ServiceContext serviceContext)
861                    throws com.liferay.portal.kernel.exception.PortalException,
862                            com.liferay.portal.kernel.exception.SystemException {
863                    try {
864                            MethodKey methodKey = new MethodKey(OrganizationServiceUtil.class,
865                                            "updateOrganization", _updateOrganizationParameterTypes21);
866    
867                            MethodHandler methodHandler = new MethodHandler(methodKey,
868                                            organizationId, parentOrganizationId, name, type, regionId,
869                                            countryId, statusId, comments, site, serviceContext);
870    
871                            Object returnObj = null;
872    
873                            try {
874                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
875                            }
876                            catch (Exception e) {
877                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
878                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
879                                    }
880    
881                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
882                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
883                                    }
884    
885                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
886                            }
887    
888                            return (com.liferay.portal.model.Organization)returnObj;
889                    }
890                    catch (com.liferay.portal.kernel.exception.SystemException se) {
891                            _log.error(se, se);
892    
893                            throw se;
894                    }
895            }
896    
897            private static Log _log = LogFactoryUtil.getLog(OrganizationServiceHttp.class);
898            private static final Class<?>[] _addGroupOrganizationsParameterTypes0 = new Class[] {
899                            long.class, long[].class
900                    };
901            private static final Class<?>[] _addOrganizationParameterTypes1 = new Class[] {
902                            long.class, java.lang.String.class, java.lang.String.class,
903                            boolean.class, long.class, long.class, int.class,
904                            java.lang.String.class, boolean.class, java.util.List.class,
905                            java.util.List.class, java.util.List.class, java.util.List.class,
906                            java.util.List.class,
907                            com.liferay.portal.service.ServiceContext.class
908                    };
909            private static final Class<?>[] _addOrganizationParameterTypes2 = new Class[] {
910                            long.class, java.lang.String.class, java.lang.String.class,
911                            boolean.class, long.class, long.class, int.class,
912                            java.lang.String.class, boolean.class,
913                            com.liferay.portal.service.ServiceContext.class
914                    };
915            private static final Class<?>[] _addOrganizationParameterTypes3 = new Class[] {
916                            long.class, java.lang.String.class, java.lang.String.class,
917                            long.class, long.class, int.class, java.lang.String.class,
918                            boolean.class, java.util.List.class, java.util.List.class,
919                            java.util.List.class, java.util.List.class, java.util.List.class,
920                            com.liferay.portal.service.ServiceContext.class
921                    };
922            private static final Class<?>[] _addOrganizationParameterTypes4 = new Class[] {
923                            long.class, java.lang.String.class, java.lang.String.class,
924                            long.class, long.class, int.class, java.lang.String.class,
925                            boolean.class, com.liferay.portal.service.ServiceContext.class
926                    };
927            private static final Class<?>[] _addPasswordPolicyOrganizationsParameterTypes5 =
928                    new Class[] { long.class, long[].class };
929            private static final Class<?>[] _deleteLogoParameterTypes6 = new Class[] {
930                            long.class
931                    };
932            private static final Class<?>[] _deleteOrganizationParameterTypes7 = new Class[] {
933                            long.class
934                    };
935            private static final Class<?>[] _getManageableOrganizationsParameterTypes8 = new Class[] {
936                            java.lang.String.class, int.class
937                    };
938            private static final Class<?>[] _getOrganizationParameterTypes9 = new Class[] {
939                            long.class
940                    };
941            private static final Class<?>[] _getOrganizationIdParameterTypes10 = new Class[] {
942                            long.class, java.lang.String.class
943                    };
944            private static final Class<?>[] _getOrganizationsParameterTypes11 = new Class[] {
945                            long.class, long.class
946                    };
947            private static final Class<?>[] _getOrganizationsParameterTypes12 = new Class[] {
948                            long.class, long.class, int.class, int.class
949                    };
950            private static final Class<?>[] _getOrganizationsCountParameterTypes13 = new Class[] {
951                            long.class, long.class
952                    };
953            private static final Class<?>[] _getUserOrganizationsParameterTypes14 = new Class[] {
954                            long.class
955                    };
956            private static final Class<?>[] _setGroupOrganizationsParameterTypes15 = new Class[] {
957                            long.class, long[].class
958                    };
959            private static final Class<?>[] _unsetGroupOrganizationsParameterTypes16 = new Class[] {
960                            long.class, long[].class
961                    };
962            private static final Class<?>[] _unsetPasswordPolicyOrganizationsParameterTypes17 =
963                    new Class[] { long.class, long[].class };
964            private static final Class<?>[] _updateOrganizationParameterTypes18 = new Class[] {
965                            long.class, long.class, java.lang.String.class,
966                            java.lang.String.class, boolean.class, long.class, long.class,
967                            int.class, java.lang.String.class, boolean.class,
968                            java.util.List.class, java.util.List.class, java.util.List.class,
969                            java.util.List.class, java.util.List.class,
970                            com.liferay.portal.service.ServiceContext.class
971                    };
972            private static final Class<?>[] _updateOrganizationParameterTypes19 = new Class[] {
973                            long.class, long.class, java.lang.String.class,
974                            java.lang.String.class, boolean.class, long.class, long.class,
975                            int.class, java.lang.String.class, boolean.class,
976                            com.liferay.portal.service.ServiceContext.class
977                    };
978            private static final Class<?>[] _updateOrganizationParameterTypes20 = new Class[] {
979                            long.class, long.class, java.lang.String.class,
980                            java.lang.String.class, long.class, long.class, int.class,
981                            java.lang.String.class, boolean.class, java.util.List.class,
982                            java.util.List.class, java.util.List.class, java.util.List.class,
983                            java.util.List.class,
984                            com.liferay.portal.service.ServiceContext.class
985                    };
986            private static final Class<?>[] _updateOrganizationParameterTypes21 = new Class[] {
987                            long.class, long.class, java.lang.String.class,
988                            java.lang.String.class, long.class, long.class, int.class,
989                            java.lang.String.class, boolean.class,
990                            com.liferay.portal.service.ServiceContext.class
991                    };
992    }