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