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