001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service.http;
016    
017    import com.liferay.portal.kernel.log.Log;
018    import com.liferay.portal.kernel.log.LogFactoryUtil;
019    import com.liferay.portal.kernel.util.MethodHandler;
020    import com.liferay.portal.kernel.util.MethodKey;
021    import com.liferay.portal.security.auth.HttpPrincipal;
022    import com.liferay.portal.service.UserServiceUtil;
023    
024    /**
025     * <p>
026     * This class provides a HTTP utility for the
027     * {@link com.liferay.portal.service.UserServiceUtil} 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       UserServiceSoap
050     * @see       com.liferay.portal.security.auth.HttpPrincipal
051     * @see       com.liferay.portal.service.UserServiceUtil
052     * @generated
053     */
054    public class UserServiceHttp {
055            public static void addGroupUsers(HttpPrincipal httpPrincipal, long groupId,
056                    long[] userIds, com.liferay.portal.service.ServiceContext serviceContext)
057                    throws com.liferay.portal.kernel.exception.PortalException,
058                            com.liferay.portal.kernel.exception.SystemException {
059                    try {
060                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
061                                            "addGroupUsers", _addGroupUsersParameterTypes0);
062    
063                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
064                                            userIds, serviceContext);
065    
066                            try {
067                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
068                            }
069                            catch (Exception e) {
070                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
071                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
072                                    }
073    
074                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
075                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
076                                    }
077    
078                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
079                            }
080                    }
081                    catch (com.liferay.portal.kernel.exception.SystemException se) {
082                            _log.error(se, se);
083    
084                            throw se;
085                    }
086            }
087    
088            public static void addOrganizationUsers(HttpPrincipal httpPrincipal,
089                    long organizationId, long[] userIds)
090                    throws com.liferay.portal.kernel.exception.PortalException,
091                            com.liferay.portal.kernel.exception.SystemException {
092                    try {
093                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
094                                            "addOrganizationUsers", _addOrganizationUsersParameterTypes1);
095    
096                            MethodHandler methodHandler = new MethodHandler(methodKey,
097                                            organizationId, userIds);
098    
099                            try {
100                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
101                            }
102                            catch (Exception e) {
103                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
104                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
105                                    }
106    
107                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
108                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
109                                    }
110    
111                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
112                            }
113                    }
114                    catch (com.liferay.portal.kernel.exception.SystemException se) {
115                            _log.error(se, se);
116    
117                            throw se;
118                    }
119            }
120    
121            public static void addPasswordPolicyUsers(HttpPrincipal httpPrincipal,
122                    long passwordPolicyId, long[] userIds)
123                    throws com.liferay.portal.kernel.exception.PortalException,
124                            com.liferay.portal.kernel.exception.SystemException {
125                    try {
126                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
127                                            "addPasswordPolicyUsers",
128                                            _addPasswordPolicyUsersParameterTypes2);
129    
130                            MethodHandler methodHandler = new MethodHandler(methodKey,
131                                            passwordPolicyId, userIds);
132    
133                            try {
134                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
135                            }
136                            catch (Exception e) {
137                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
138                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
139                                    }
140    
141                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
142                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
143                                    }
144    
145                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
146                            }
147                    }
148                    catch (com.liferay.portal.kernel.exception.SystemException se) {
149                            _log.error(se, se);
150    
151                            throw se;
152                    }
153            }
154    
155            public static void addRoleUsers(HttpPrincipal httpPrincipal, long roleId,
156                    long[] userIds)
157                    throws com.liferay.portal.kernel.exception.PortalException,
158                            com.liferay.portal.kernel.exception.SystemException {
159                    try {
160                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
161                                            "addRoleUsers", _addRoleUsersParameterTypes3);
162    
163                            MethodHandler methodHandler = new MethodHandler(methodKey, roleId,
164                                            userIds);
165    
166                            try {
167                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
168                            }
169                            catch (Exception e) {
170                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
171                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
172                                    }
173    
174                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
175                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
176                                    }
177    
178                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
179                            }
180                    }
181                    catch (com.liferay.portal.kernel.exception.SystemException se) {
182                            _log.error(se, se);
183    
184                            throw se;
185                    }
186            }
187    
188            public static void addTeamUsers(HttpPrincipal httpPrincipal, long teamId,
189                    long[] userIds)
190                    throws com.liferay.portal.kernel.exception.PortalException,
191                            com.liferay.portal.kernel.exception.SystemException {
192                    try {
193                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
194                                            "addTeamUsers", _addTeamUsersParameterTypes4);
195    
196                            MethodHandler methodHandler = new MethodHandler(methodKey, teamId,
197                                            userIds);
198    
199                            try {
200                                    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                    catch (com.liferay.portal.kernel.exception.SystemException se) {
215                            _log.error(se, se);
216    
217                            throw se;
218                    }
219            }
220    
221            public static com.liferay.portal.model.User addUser(
222                    HttpPrincipal httpPrincipal, long companyId, boolean autoPassword,
223                    java.lang.String password1, java.lang.String password2,
224                    boolean autoScreenName, java.lang.String screenName,
225                    java.lang.String emailAddress, long facebookId,
226                    java.lang.String openId, java.util.Locale locale,
227                    java.lang.String firstName, java.lang.String middleName,
228                    java.lang.String lastName, int prefixId, int suffixId, boolean male,
229                    int birthdayMonth, int birthdayDay, int birthdayYear,
230                    java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
231                    long[] roleIds, long[] userGroupIds, boolean sendEmail,
232                    com.liferay.portal.service.ServiceContext serviceContext)
233                    throws com.liferay.portal.kernel.exception.PortalException,
234                            com.liferay.portal.kernel.exception.SystemException {
235                    try {
236                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
237                                            "addUser", _addUserParameterTypes5);
238    
239                            MethodHandler methodHandler = new MethodHandler(methodKey,
240                                            companyId, autoPassword, password1, password2,
241                                            autoScreenName, screenName, emailAddress, facebookId,
242                                            openId, locale, firstName, middleName, lastName, prefixId,
243                                            suffixId, male, birthdayMonth, birthdayDay, birthdayYear,
244                                            jobTitle, groupIds, organizationIds, roleIds, userGroupIds,
245                                            sendEmail, serviceContext);
246    
247                            Object returnObj = null;
248    
249                            try {
250                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
251                            }
252                            catch (Exception e) {
253                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
254                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
255                                    }
256    
257                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
258                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
259                                    }
260    
261                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
262                            }
263    
264                            return (com.liferay.portal.model.User)returnObj;
265                    }
266                    catch (com.liferay.portal.kernel.exception.SystemException se) {
267                            _log.error(se, se);
268    
269                            throw se;
270                    }
271            }
272    
273            public static com.liferay.portal.model.User addUser(
274                    HttpPrincipal httpPrincipal, long companyId, boolean autoPassword,
275                    java.lang.String password1, java.lang.String password2,
276                    boolean autoScreenName, java.lang.String screenName,
277                    java.lang.String emailAddress, long facebookId,
278                    java.lang.String openId, java.util.Locale locale,
279                    java.lang.String firstName, java.lang.String middleName,
280                    java.lang.String lastName, int prefixId, int suffixId, boolean male,
281                    int birthdayMonth, int birthdayDay, int birthdayYear,
282                    java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
283                    long[] roleIds, long[] userGroupIds,
284                    java.util.List<com.liferay.portal.model.Address> addresses,
285                    java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
286                    java.util.List<com.liferay.portal.model.Phone> phones,
287                    java.util.List<com.liferay.portal.model.Website> websites,
288                    java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> announcementsDelivers,
289                    boolean sendEmail,
290                    com.liferay.portal.service.ServiceContext serviceContext)
291                    throws com.liferay.portal.kernel.exception.PortalException,
292                            com.liferay.portal.kernel.exception.SystemException {
293                    try {
294                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
295                                            "addUser", _addUserParameterTypes6);
296    
297                            MethodHandler methodHandler = new MethodHandler(methodKey,
298                                            companyId, autoPassword, password1, password2,
299                                            autoScreenName, screenName, emailAddress, facebookId,
300                                            openId, locale, firstName, middleName, lastName, prefixId,
301                                            suffixId, male, birthdayMonth, birthdayDay, birthdayYear,
302                                            jobTitle, groupIds, organizationIds, roleIds, userGroupIds,
303                                            addresses, emailAddresses, phones, websites,
304                                            announcementsDelivers, sendEmail, serviceContext);
305    
306                            Object returnObj = null;
307    
308                            try {
309                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
310                            }
311                            catch (Exception e) {
312                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
313                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
314                                    }
315    
316                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
317                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
318                                    }
319    
320                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
321                            }
322    
323                            return (com.liferay.portal.model.User)returnObj;
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 addUserGroupUsers(HttpPrincipal httpPrincipal,
333                    long userGroupId, long[] userIds)
334                    throws com.liferay.portal.kernel.exception.PortalException,
335                            com.liferay.portal.kernel.exception.SystemException {
336                    try {
337                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
338                                            "addUserGroupUsers", _addUserGroupUsersParameterTypes7);
339    
340                            MethodHandler methodHandler = new MethodHandler(methodKey,
341                                            userGroupId, userIds);
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 com.liferay.portal.model.User addUserWithWorkflow(
366                    HttpPrincipal httpPrincipal, long companyId, boolean autoPassword,
367                    java.lang.String password1, java.lang.String password2,
368                    boolean autoScreenName, java.lang.String screenName,
369                    java.lang.String emailAddress, long facebookId,
370                    java.lang.String openId, java.util.Locale locale,
371                    java.lang.String firstName, java.lang.String middleName,
372                    java.lang.String lastName, int prefixId, int suffixId, boolean male,
373                    int birthdayMonth, int birthdayDay, int birthdayYear,
374                    java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
375                    long[] roleIds, long[] userGroupIds, boolean sendEmail,
376                    com.liferay.portal.service.ServiceContext serviceContext)
377                    throws com.liferay.portal.kernel.exception.PortalException,
378                            com.liferay.portal.kernel.exception.SystemException {
379                    try {
380                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
381                                            "addUserWithWorkflow", _addUserWithWorkflowParameterTypes8);
382    
383                            MethodHandler methodHandler = new MethodHandler(methodKey,
384                                            companyId, autoPassword, password1, password2,
385                                            autoScreenName, screenName, emailAddress, facebookId,
386                                            openId, locale, firstName, middleName, lastName, prefixId,
387                                            suffixId, male, birthdayMonth, birthdayDay, birthdayYear,
388                                            jobTitle, groupIds, organizationIds, roleIds, userGroupIds,
389                                            sendEmail, serviceContext);
390    
391                            Object returnObj = null;
392    
393                            try {
394                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
395                            }
396                            catch (Exception e) {
397                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
398                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
399                                    }
400    
401                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
402                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
403                                    }
404    
405                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
406                            }
407    
408                            return (com.liferay.portal.model.User)returnObj;
409                    }
410                    catch (com.liferay.portal.kernel.exception.SystemException se) {
411                            _log.error(se, se);
412    
413                            throw se;
414                    }
415            }
416    
417            public static com.liferay.portal.model.User addUserWithWorkflow(
418                    HttpPrincipal httpPrincipal, long companyId, boolean autoPassword,
419                    java.lang.String password1, java.lang.String password2,
420                    boolean autoScreenName, java.lang.String screenName,
421                    java.lang.String emailAddress, long facebookId,
422                    java.lang.String openId, java.util.Locale locale,
423                    java.lang.String firstName, java.lang.String middleName,
424                    java.lang.String lastName, int prefixId, int suffixId, boolean male,
425                    int birthdayMonth, int birthdayDay, int birthdayYear,
426                    java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
427                    long[] roleIds, long[] userGroupIds,
428                    java.util.List<com.liferay.portal.model.Address> addresses,
429                    java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
430                    java.util.List<com.liferay.portal.model.Phone> phones,
431                    java.util.List<com.liferay.portal.model.Website> websites,
432                    java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> announcementsDelivers,
433                    boolean sendEmail,
434                    com.liferay.portal.service.ServiceContext serviceContext)
435                    throws com.liferay.portal.kernel.exception.PortalException,
436                            com.liferay.portal.kernel.exception.SystemException {
437                    try {
438                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
439                                            "addUserWithWorkflow", _addUserWithWorkflowParameterTypes9);
440    
441                            MethodHandler methodHandler = new MethodHandler(methodKey,
442                                            companyId, autoPassword, password1, password2,
443                                            autoScreenName, screenName, emailAddress, facebookId,
444                                            openId, locale, firstName, middleName, lastName, prefixId,
445                                            suffixId, male, birthdayMonth, birthdayDay, birthdayYear,
446                                            jobTitle, groupIds, organizationIds, roleIds, userGroupIds,
447                                            addresses, emailAddresses, phones, websites,
448                                            announcementsDelivers, sendEmail, serviceContext);
449    
450                            Object returnObj = null;
451    
452                            try {
453                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
454                            }
455                            catch (Exception e) {
456                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
457                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
458                                    }
459    
460                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
461                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
462                                    }
463    
464                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
465                            }
466    
467                            return (com.liferay.portal.model.User)returnObj;
468                    }
469                    catch (com.liferay.portal.kernel.exception.SystemException se) {
470                            _log.error(se, se);
471    
472                            throw se;
473                    }
474            }
475    
476            public static void deletePortrait(HttpPrincipal httpPrincipal, long userId)
477                    throws com.liferay.portal.kernel.exception.PortalException,
478                            com.liferay.portal.kernel.exception.SystemException {
479                    try {
480                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
481                                            "deletePortrait", _deletePortraitParameterTypes10);
482    
483                            MethodHandler methodHandler = new MethodHandler(methodKey, userId);
484    
485                            try {
486                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
487                            }
488                            catch (Exception e) {
489                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
490                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
491                                    }
492    
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                    catch (com.liferay.portal.kernel.exception.SystemException se) {
501                            _log.error(se, se);
502    
503                            throw se;
504                    }
505            }
506    
507            public static void deleteRoleUser(HttpPrincipal httpPrincipal, long roleId,
508                    long userId)
509                    throws com.liferay.portal.kernel.exception.PortalException,
510                            com.liferay.portal.kernel.exception.SystemException {
511                    try {
512                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
513                                            "deleteRoleUser", _deleteRoleUserParameterTypes11);
514    
515                            MethodHandler methodHandler = new MethodHandler(methodKey, roleId,
516                                            userId);
517    
518                            try {
519                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
520                            }
521                            catch (Exception e) {
522                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
523                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
524                                    }
525    
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                    catch (com.liferay.portal.kernel.exception.SystemException se) {
534                            _log.error(se, se);
535    
536                            throw se;
537                    }
538            }
539    
540            public static void deleteUser(HttpPrincipal httpPrincipal, long userId)
541                    throws com.liferay.portal.kernel.exception.PortalException,
542                            com.liferay.portal.kernel.exception.SystemException {
543                    try {
544                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
545                                            "deleteUser", _deleteUserParameterTypes12);
546    
547                            MethodHandler methodHandler = new MethodHandler(methodKey, userId);
548    
549                            try {
550                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
551                            }
552                            catch (Exception e) {
553                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
554                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
555                                    }
556    
557                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
558                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
559                                    }
560    
561                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
562                            }
563                    }
564                    catch (com.liferay.portal.kernel.exception.SystemException se) {
565                            _log.error(se, se);
566    
567                            throw se;
568                    }
569            }
570    
571            public static java.util.List<com.liferay.portal.model.User> getCompanyUsers(
572                    HttpPrincipal httpPrincipal, long companyId, int start, int end)
573                    throws com.liferay.portal.kernel.exception.PortalException,
574                            com.liferay.portal.kernel.exception.SystemException {
575                    try {
576                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
577                                            "getCompanyUsers", _getCompanyUsersParameterTypes13);
578    
579                            MethodHandler methodHandler = new MethodHandler(methodKey,
580                                            companyId, start, end);
581    
582                            Object returnObj = null;
583    
584                            try {
585                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
586                            }
587                            catch (Exception e) {
588                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
589                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
590                                    }
591    
592                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
593                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
594                                    }
595    
596                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
597                            }
598    
599                            return (java.util.List<com.liferay.portal.model.User>)returnObj;
600                    }
601                    catch (com.liferay.portal.kernel.exception.SystemException se) {
602                            _log.error(se, se);
603    
604                            throw se;
605                    }
606            }
607    
608            public static int getCompanyUsersCount(HttpPrincipal httpPrincipal,
609                    long companyId)
610                    throws com.liferay.portal.kernel.exception.PortalException,
611                            com.liferay.portal.kernel.exception.SystemException {
612                    try {
613                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
614                                            "getCompanyUsersCount",
615                                            _getCompanyUsersCountParameterTypes14);
616    
617                            MethodHandler methodHandler = new MethodHandler(methodKey, companyId);
618    
619                            Object returnObj = null;
620    
621                            try {
622                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
623                            }
624                            catch (Exception e) {
625                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
626                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
627                                    }
628    
629                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
630                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
631                                    }
632    
633                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
634                            }
635    
636                            return ((Integer)returnObj).intValue();
637                    }
638                    catch (com.liferay.portal.kernel.exception.SystemException se) {
639                            _log.error(se, se);
640    
641                            throw se;
642                    }
643            }
644    
645            public static long[] getGroupUserIds(HttpPrincipal httpPrincipal,
646                    long groupId)
647                    throws com.liferay.portal.kernel.exception.PortalException,
648                            com.liferay.portal.kernel.exception.SystemException {
649                    try {
650                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
651                                            "getGroupUserIds", _getGroupUserIdsParameterTypes15);
652    
653                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId);
654    
655                            Object returnObj = null;
656    
657                            try {
658                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
659                            }
660                            catch (Exception e) {
661                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
662                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
663                                    }
664    
665                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
666                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
667                                    }
668    
669                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
670                            }
671    
672                            return (long[])returnObj;
673                    }
674                    catch (com.liferay.portal.kernel.exception.SystemException se) {
675                            _log.error(se, se);
676    
677                            throw se;
678                    }
679            }
680    
681            public static java.util.List<com.liferay.portal.model.User> getGroupUsers(
682                    HttpPrincipal httpPrincipal, long groupId)
683                    throws com.liferay.portal.kernel.exception.PortalException,
684                            com.liferay.portal.kernel.exception.SystemException {
685                    try {
686                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
687                                            "getGroupUsers", _getGroupUsersParameterTypes16);
688    
689                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId);
690    
691                            Object returnObj = null;
692    
693                            try {
694                                    returnObj = 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                            return (java.util.List<com.liferay.portal.model.User>)returnObj;
709                    }
710                    catch (com.liferay.portal.kernel.exception.SystemException se) {
711                            _log.error(se, se);
712    
713                            throw se;
714                    }
715            }
716    
717            public static long[] getOrganizationUserIds(HttpPrincipal httpPrincipal,
718                    long organizationId)
719                    throws com.liferay.portal.kernel.exception.PortalException,
720                            com.liferay.portal.kernel.exception.SystemException {
721                    try {
722                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
723                                            "getOrganizationUserIds",
724                                            _getOrganizationUserIdsParameterTypes17);
725    
726                            MethodHandler methodHandler = new MethodHandler(methodKey,
727                                            organizationId);
728    
729                            Object returnObj = null;
730    
731                            try {
732                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
733                            }
734                            catch (Exception e) {
735                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
736                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
737                                    }
738    
739                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
740                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
741                                    }
742    
743                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
744                            }
745    
746                            return (long[])returnObj;
747                    }
748                    catch (com.liferay.portal.kernel.exception.SystemException se) {
749                            _log.error(se, se);
750    
751                            throw se;
752                    }
753            }
754    
755            public static java.util.List<com.liferay.portal.model.User> getOrganizationUsers(
756                    HttpPrincipal httpPrincipal, long organizationId)
757                    throws com.liferay.portal.kernel.exception.PortalException,
758                            com.liferay.portal.kernel.exception.SystemException {
759                    try {
760                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
761                                            "getOrganizationUsers",
762                                            _getOrganizationUsersParameterTypes18);
763    
764                            MethodHandler methodHandler = new MethodHandler(methodKey,
765                                            organizationId);
766    
767                            Object returnObj = null;
768    
769                            try {
770                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
771                            }
772                            catch (Exception e) {
773                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
774                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
775                                    }
776    
777                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
778                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
779                                    }
780    
781                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
782                            }
783    
784                            return (java.util.List<com.liferay.portal.model.User>)returnObj;
785                    }
786                    catch (com.liferay.portal.kernel.exception.SystemException se) {
787                            _log.error(se, se);
788    
789                            throw se;
790                    }
791            }
792    
793            public static long[] getRoleUserIds(HttpPrincipal httpPrincipal, long roleId)
794                    throws com.liferay.portal.kernel.exception.PortalException,
795                            com.liferay.portal.kernel.exception.SystemException {
796                    try {
797                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
798                                            "getRoleUserIds", _getRoleUserIdsParameterTypes19);
799    
800                            MethodHandler methodHandler = new MethodHandler(methodKey, roleId);
801    
802                            Object returnObj = null;
803    
804                            try {
805                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
806                            }
807                            catch (Exception e) {
808                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
809                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
810                                    }
811    
812                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
813                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
814                                    }
815    
816                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
817                            }
818    
819                            return (long[])returnObj;
820                    }
821                    catch (com.liferay.portal.kernel.exception.SystemException se) {
822                            _log.error(se, se);
823    
824                            throw se;
825                    }
826            }
827    
828            public static com.liferay.portal.model.User getUserByEmailAddress(
829                    HttpPrincipal httpPrincipal, long companyId,
830                    java.lang.String emailAddress)
831                    throws com.liferay.portal.kernel.exception.PortalException,
832                            com.liferay.portal.kernel.exception.SystemException {
833                    try {
834                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
835                                            "getUserByEmailAddress",
836                                            _getUserByEmailAddressParameterTypes20);
837    
838                            MethodHandler methodHandler = new MethodHandler(methodKey,
839                                            companyId, emailAddress);
840    
841                            Object returnObj = null;
842    
843                            try {
844                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
845                            }
846                            catch (Exception e) {
847                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
848                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
849                                    }
850    
851                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
852                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
853                                    }
854    
855                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
856                            }
857    
858                            return (com.liferay.portal.model.User)returnObj;
859                    }
860                    catch (com.liferay.portal.kernel.exception.SystemException se) {
861                            _log.error(se, se);
862    
863                            throw se;
864                    }
865            }
866    
867            public static com.liferay.portal.model.User getUserById(
868                    HttpPrincipal httpPrincipal, long userId)
869                    throws com.liferay.portal.kernel.exception.PortalException,
870                            com.liferay.portal.kernel.exception.SystemException {
871                    try {
872                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
873                                            "getUserById", _getUserByIdParameterTypes21);
874    
875                            MethodHandler methodHandler = new MethodHandler(methodKey, userId);
876    
877                            Object returnObj = null;
878    
879                            try {
880                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
881                            }
882                            catch (Exception e) {
883                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
884                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
885                                    }
886    
887                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
888                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
889                                    }
890    
891                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
892                            }
893    
894                            return (com.liferay.portal.model.User)returnObj;
895                    }
896                    catch (com.liferay.portal.kernel.exception.SystemException se) {
897                            _log.error(se, se);
898    
899                            throw se;
900                    }
901            }
902    
903            public static com.liferay.portal.model.User getUserByScreenName(
904                    HttpPrincipal httpPrincipal, long companyId, java.lang.String screenName)
905                    throws com.liferay.portal.kernel.exception.PortalException,
906                            com.liferay.portal.kernel.exception.SystemException {
907                    try {
908                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
909                                            "getUserByScreenName", _getUserByScreenNameParameterTypes22);
910    
911                            MethodHandler methodHandler = new MethodHandler(methodKey,
912                                            companyId, screenName);
913    
914                            Object returnObj = null;
915    
916                            try {
917                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
918                            }
919                            catch (Exception e) {
920                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
921                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
922                                    }
923    
924                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
925                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
926                                    }
927    
928                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
929                            }
930    
931                            return (com.liferay.portal.model.User)returnObj;
932                    }
933                    catch (com.liferay.portal.kernel.exception.SystemException se) {
934                            _log.error(se, se);
935    
936                            throw se;
937                    }
938            }
939    
940            public static java.util.List<com.liferay.portal.model.User> getUserGroupUsers(
941                    HttpPrincipal httpPrincipal, long userGroupId)
942                    throws com.liferay.portal.kernel.exception.PortalException,
943                            com.liferay.portal.kernel.exception.SystemException {
944                    try {
945                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
946                                            "getUserGroupUsers", _getUserGroupUsersParameterTypes23);
947    
948                            MethodHandler methodHandler = new MethodHandler(methodKey,
949                                            userGroupId);
950    
951                            Object returnObj = null;
952    
953                            try {
954                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
955                            }
956                            catch (Exception e) {
957                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
958                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
959                                    }
960    
961                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
962                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
963                                    }
964    
965                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
966                            }
967    
968                            return (java.util.List<com.liferay.portal.model.User>)returnObj;
969                    }
970                    catch (com.liferay.portal.kernel.exception.SystemException se) {
971                            _log.error(se, se);
972    
973                            throw se;
974                    }
975            }
976    
977            public static long getUserIdByEmailAddress(HttpPrincipal httpPrincipal,
978                    long companyId, java.lang.String emailAddress)
979                    throws com.liferay.portal.kernel.exception.PortalException,
980                            com.liferay.portal.kernel.exception.SystemException {
981                    try {
982                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
983                                            "getUserIdByEmailAddress",
984                                            _getUserIdByEmailAddressParameterTypes24);
985    
986                            MethodHandler methodHandler = new MethodHandler(methodKey,
987                                            companyId, emailAddress);
988    
989                            Object returnObj = null;
990    
991                            try {
992                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
993                            }
994                            catch (Exception e) {
995                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
996                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
997                                    }
998    
999                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1000                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1001                                    }
1002    
1003                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1004                            }
1005    
1006                            return ((Long)returnObj).longValue();
1007                    }
1008                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1009                            _log.error(se, se);
1010    
1011                            throw se;
1012                    }
1013            }
1014    
1015            public static long getUserIdByScreenName(HttpPrincipal httpPrincipal,
1016                    long companyId, java.lang.String screenName)
1017                    throws com.liferay.portal.kernel.exception.PortalException,
1018                            com.liferay.portal.kernel.exception.SystemException {
1019                    try {
1020                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
1021                                            "getUserIdByScreenName",
1022                                            _getUserIdByScreenNameParameterTypes25);
1023    
1024                            MethodHandler methodHandler = new MethodHandler(methodKey,
1025                                            companyId, screenName);
1026    
1027                            Object returnObj = null;
1028    
1029                            try {
1030                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1031                            }
1032                            catch (Exception e) {
1033                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1034                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1035                                    }
1036    
1037                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1038                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1039                                    }
1040    
1041                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1042                            }
1043    
1044                            return ((Long)returnObj).longValue();
1045                    }
1046                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1047                            _log.error(se, se);
1048    
1049                            throw se;
1050                    }
1051            }
1052    
1053            public static boolean hasGroupUser(HttpPrincipal httpPrincipal,
1054                    long groupId, long userId)
1055                    throws com.liferay.portal.kernel.exception.PortalException,
1056                            com.liferay.portal.kernel.exception.SystemException {
1057                    try {
1058                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
1059                                            "hasGroupUser", _hasGroupUserParameterTypes26);
1060    
1061                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
1062                                            userId);
1063    
1064                            Object returnObj = null;
1065    
1066                            try {
1067                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1068                            }
1069                            catch (Exception e) {
1070                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1071                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1072                                    }
1073    
1074                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1075                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1076                                    }
1077    
1078                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1079                            }
1080    
1081                            return ((Boolean)returnObj).booleanValue();
1082                    }
1083                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1084                            _log.error(se, se);
1085    
1086                            throw se;
1087                    }
1088            }
1089    
1090            public static boolean hasRoleUser(HttpPrincipal httpPrincipal, long roleId,
1091                    long userId)
1092                    throws com.liferay.portal.kernel.exception.PortalException,
1093                            com.liferay.portal.kernel.exception.SystemException {
1094                    try {
1095                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
1096                                            "hasRoleUser", _hasRoleUserParameterTypes27);
1097    
1098                            MethodHandler methodHandler = new MethodHandler(methodKey, roleId,
1099                                            userId);
1100    
1101                            Object returnObj = null;
1102    
1103                            try {
1104                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1105                            }
1106                            catch (Exception e) {
1107                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1108                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1109                                    }
1110    
1111                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1112                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1113                                    }
1114    
1115                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1116                            }
1117    
1118                            return ((Boolean)returnObj).booleanValue();
1119                    }
1120                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1121                            _log.error(se, se);
1122    
1123                            throw se;
1124                    }
1125            }
1126    
1127            public static boolean hasRoleUser(HttpPrincipal httpPrincipal,
1128                    long companyId, java.lang.String name, long userId, boolean inherited)
1129                    throws com.liferay.portal.kernel.exception.PortalException,
1130                            com.liferay.portal.kernel.exception.SystemException {
1131                    try {
1132                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
1133                                            "hasRoleUser", _hasRoleUserParameterTypes28);
1134    
1135                            MethodHandler methodHandler = new MethodHandler(methodKey,
1136                                            companyId, name, userId, inherited);
1137    
1138                            Object returnObj = null;
1139    
1140                            try {
1141                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1142                            }
1143                            catch (Exception e) {
1144                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1145                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1146                                    }
1147    
1148                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1149                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1150                                    }
1151    
1152                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1153                            }
1154    
1155                            return ((Boolean)returnObj).booleanValue();
1156                    }
1157                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1158                            _log.error(se, se);
1159    
1160                            throw se;
1161                    }
1162            }
1163    
1164            public static void setRoleUsers(HttpPrincipal httpPrincipal, long roleId,
1165                    long[] userIds)
1166                    throws com.liferay.portal.kernel.exception.PortalException,
1167                            com.liferay.portal.kernel.exception.SystemException {
1168                    try {
1169                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
1170                                            "setRoleUsers", _setRoleUsersParameterTypes29);
1171    
1172                            MethodHandler methodHandler = new MethodHandler(methodKey, roleId,
1173                                            userIds);
1174    
1175                            try {
1176                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
1177                            }
1178                            catch (Exception e) {
1179                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1180                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1181                                    }
1182    
1183                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1184                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1185                                    }
1186    
1187                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1188                            }
1189                    }
1190                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1191                            _log.error(se, se);
1192    
1193                            throw se;
1194                    }
1195            }
1196    
1197            public static void setUserGroupUsers(HttpPrincipal httpPrincipal,
1198                    long userGroupId, long[] userIds)
1199                    throws com.liferay.portal.kernel.exception.PortalException,
1200                            com.liferay.portal.kernel.exception.SystemException {
1201                    try {
1202                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
1203                                            "setUserGroupUsers", _setUserGroupUsersParameterTypes30);
1204    
1205                            MethodHandler methodHandler = new MethodHandler(methodKey,
1206                                            userGroupId, userIds);
1207    
1208                            try {
1209                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
1210                            }
1211                            catch (Exception e) {
1212                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1213                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1214                                    }
1215    
1216                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1217                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1218                                    }
1219    
1220                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1221                            }
1222                    }
1223                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1224                            _log.error(se, se);
1225    
1226                            throw se;
1227                    }
1228            }
1229    
1230            public static void unsetGroupTeamsUsers(HttpPrincipal httpPrincipal,
1231                    long groupId, long[] userIds)
1232                    throws com.liferay.portal.kernel.exception.PortalException,
1233                            com.liferay.portal.kernel.exception.SystemException {
1234                    try {
1235                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
1236                                            "unsetGroupTeamsUsers",
1237                                            _unsetGroupTeamsUsersParameterTypes31);
1238    
1239                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
1240                                            userIds);
1241    
1242                            try {
1243                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
1244                            }
1245                            catch (Exception e) {
1246                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1247                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1248                                    }
1249    
1250                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1251                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1252                                    }
1253    
1254                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1255                            }
1256                    }
1257                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1258                            _log.error(se, se);
1259    
1260                            throw se;
1261                    }
1262            }
1263    
1264            public static void unsetGroupUsers(HttpPrincipal httpPrincipal,
1265                    long groupId, long[] userIds,
1266                    com.liferay.portal.service.ServiceContext serviceContext)
1267                    throws com.liferay.portal.kernel.exception.PortalException,
1268                            com.liferay.portal.kernel.exception.SystemException {
1269                    try {
1270                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
1271                                            "unsetGroupUsers", _unsetGroupUsersParameterTypes32);
1272    
1273                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
1274                                            userIds, serviceContext);
1275    
1276                            try {
1277                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
1278                            }
1279                            catch (Exception e) {
1280                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1281                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1282                                    }
1283    
1284                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1285                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1286                                    }
1287    
1288                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1289                            }
1290                    }
1291                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1292                            _log.error(se, se);
1293    
1294                            throw se;
1295                    }
1296            }
1297    
1298            public static void unsetOrganizationUsers(HttpPrincipal httpPrincipal,
1299                    long organizationId, long[] userIds)
1300                    throws com.liferay.portal.kernel.exception.PortalException,
1301                            com.liferay.portal.kernel.exception.SystemException {
1302                    try {
1303                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
1304                                            "unsetOrganizationUsers",
1305                                            _unsetOrganizationUsersParameterTypes33);
1306    
1307                            MethodHandler methodHandler = new MethodHandler(methodKey,
1308                                            organizationId, userIds);
1309    
1310                            try {
1311                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
1312                            }
1313                            catch (Exception e) {
1314                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1315                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1316                                    }
1317    
1318                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1319                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1320                                    }
1321    
1322                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1323                            }
1324                    }
1325                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1326                            _log.error(se, se);
1327    
1328                            throw se;
1329                    }
1330            }
1331    
1332            public static void unsetPasswordPolicyUsers(HttpPrincipal httpPrincipal,
1333                    long passwordPolicyId, long[] userIds)
1334                    throws com.liferay.portal.kernel.exception.PortalException,
1335                            com.liferay.portal.kernel.exception.SystemException {
1336                    try {
1337                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
1338                                            "unsetPasswordPolicyUsers",
1339                                            _unsetPasswordPolicyUsersParameterTypes34);
1340    
1341                            MethodHandler methodHandler = new MethodHandler(methodKey,
1342                                            passwordPolicyId, userIds);
1343    
1344                            try {
1345                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
1346                            }
1347                            catch (Exception e) {
1348                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1349                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1350                                    }
1351    
1352                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1353                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1354                                    }
1355    
1356                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1357                            }
1358                    }
1359                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1360                            _log.error(se, se);
1361    
1362                            throw se;
1363                    }
1364            }
1365    
1366            public static void unsetRoleUsers(HttpPrincipal httpPrincipal, long roleId,
1367                    long[] userIds)
1368                    throws com.liferay.portal.kernel.exception.PortalException,
1369                            com.liferay.portal.kernel.exception.SystemException {
1370                    try {
1371                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
1372                                            "unsetRoleUsers", _unsetRoleUsersParameterTypes35);
1373    
1374                            MethodHandler methodHandler = new MethodHandler(methodKey, roleId,
1375                                            userIds);
1376    
1377                            try {
1378                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
1379                            }
1380                            catch (Exception e) {
1381                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1382                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1383                                    }
1384    
1385                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1386                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1387                                    }
1388    
1389                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1390                            }
1391                    }
1392                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1393                            _log.error(se, se);
1394    
1395                            throw se;
1396                    }
1397            }
1398    
1399            public static void unsetTeamUsers(HttpPrincipal httpPrincipal, long teamId,
1400                    long[] userIds)
1401                    throws com.liferay.portal.kernel.exception.PortalException,
1402                            com.liferay.portal.kernel.exception.SystemException {
1403                    try {
1404                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
1405                                            "unsetTeamUsers", _unsetTeamUsersParameterTypes36);
1406    
1407                            MethodHandler methodHandler = new MethodHandler(methodKey, teamId,
1408                                            userIds);
1409    
1410                            try {
1411                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
1412                            }
1413                            catch (Exception e) {
1414                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1415                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1416                                    }
1417    
1418                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1419                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1420                                    }
1421    
1422                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1423                            }
1424                    }
1425                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1426                            _log.error(se, se);
1427    
1428                            throw se;
1429                    }
1430            }
1431    
1432            public static void unsetUserGroupUsers(HttpPrincipal httpPrincipal,
1433                    long userGroupId, long[] userIds)
1434                    throws com.liferay.portal.kernel.exception.PortalException,
1435                            com.liferay.portal.kernel.exception.SystemException {
1436                    try {
1437                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
1438                                            "unsetUserGroupUsers", _unsetUserGroupUsersParameterTypes37);
1439    
1440                            MethodHandler methodHandler = new MethodHandler(methodKey,
1441                                            userGroupId, userIds);
1442    
1443                            try {
1444                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
1445                            }
1446                            catch (Exception e) {
1447                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1448                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1449                                    }
1450    
1451                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1452                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1453                                    }
1454    
1455                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1456                            }
1457                    }
1458                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1459                            _log.error(se, se);
1460    
1461                            throw se;
1462                    }
1463            }
1464    
1465            public static com.liferay.portal.model.User updateAgreedToTermsOfUse(
1466                    HttpPrincipal httpPrincipal, long userId, boolean agreedToTermsOfUse)
1467                    throws com.liferay.portal.kernel.exception.PortalException,
1468                            com.liferay.portal.kernel.exception.SystemException {
1469                    try {
1470                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
1471                                            "updateAgreedToTermsOfUse",
1472                                            _updateAgreedToTermsOfUseParameterTypes38);
1473    
1474                            MethodHandler methodHandler = new MethodHandler(methodKey, userId,
1475                                            agreedToTermsOfUse);
1476    
1477                            Object returnObj = null;
1478    
1479                            try {
1480                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1481                            }
1482                            catch (Exception e) {
1483                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1484                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1485                                    }
1486    
1487                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1488                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1489                                    }
1490    
1491                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1492                            }
1493    
1494                            return (com.liferay.portal.model.User)returnObj;
1495                    }
1496                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1497                            _log.error(se, se);
1498    
1499                            throw se;
1500                    }
1501            }
1502    
1503            public static com.liferay.portal.model.User updateEmailAddress(
1504                    HttpPrincipal httpPrincipal, long userId, java.lang.String password,
1505                    java.lang.String emailAddress1, java.lang.String emailAddress2,
1506                    com.liferay.portal.service.ServiceContext serviceContext)
1507                    throws com.liferay.portal.kernel.exception.PortalException,
1508                            com.liferay.portal.kernel.exception.SystemException {
1509                    try {
1510                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
1511                                            "updateEmailAddress", _updateEmailAddressParameterTypes39);
1512    
1513                            MethodHandler methodHandler = new MethodHandler(methodKey, userId,
1514                                            password, emailAddress1, emailAddress2, serviceContext);
1515    
1516                            Object returnObj = null;
1517    
1518                            try {
1519                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1520                            }
1521                            catch (Exception e) {
1522                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1523                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1524                                    }
1525    
1526                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1527                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1528                                    }
1529    
1530                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1531                            }
1532    
1533                            return (com.liferay.portal.model.User)returnObj;
1534                    }
1535                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1536                            _log.error(se, se);
1537    
1538                            throw se;
1539                    }
1540            }
1541    
1542            public static com.liferay.portal.model.User updateIncompleteUser(
1543                    HttpPrincipal httpPrincipal, long companyId, boolean autoPassword,
1544                    java.lang.String password1, java.lang.String password2,
1545                    boolean autoScreenName, java.lang.String screenName,
1546                    java.lang.String emailAddress, long facebookId,
1547                    java.lang.String openId, java.util.Locale locale,
1548                    java.lang.String firstName, java.lang.String middleName,
1549                    java.lang.String lastName, int prefixId, int suffixId, boolean male,
1550                    int birthdayMonth, int birthdayDay, int birthdayYear,
1551                    java.lang.String jobTitle, boolean updateUserInformation,
1552                    boolean sendEmail,
1553                    com.liferay.portal.service.ServiceContext serviceContext)
1554                    throws com.liferay.portal.kernel.exception.PortalException,
1555                            com.liferay.portal.kernel.exception.SystemException {
1556                    try {
1557                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
1558                                            "updateIncompleteUser",
1559                                            _updateIncompleteUserParameterTypes40);
1560    
1561                            MethodHandler methodHandler = new MethodHandler(methodKey,
1562                                            companyId, autoPassword, password1, password2,
1563                                            autoScreenName, screenName, emailAddress, facebookId,
1564                                            openId, locale, firstName, middleName, lastName, prefixId,
1565                                            suffixId, male, birthdayMonth, birthdayDay, birthdayYear,
1566                                            jobTitle, updateUserInformation, sendEmail, serviceContext);
1567    
1568                            Object returnObj = null;
1569    
1570                            try {
1571                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1572                            }
1573                            catch (Exception e) {
1574                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1575                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1576                                    }
1577    
1578                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1579                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1580                                    }
1581    
1582                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1583                            }
1584    
1585                            return (com.liferay.portal.model.User)returnObj;
1586                    }
1587                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1588                            _log.error(se, se);
1589    
1590                            throw se;
1591                    }
1592            }
1593    
1594            public static com.liferay.portal.model.User updateLockoutById(
1595                    HttpPrincipal httpPrincipal, long userId, boolean lockout)
1596                    throws com.liferay.portal.kernel.exception.PortalException,
1597                            com.liferay.portal.kernel.exception.SystemException {
1598                    try {
1599                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
1600                                            "updateLockoutById", _updateLockoutByIdParameterTypes41);
1601    
1602                            MethodHandler methodHandler = new MethodHandler(methodKey, userId,
1603                                            lockout);
1604    
1605                            Object returnObj = null;
1606    
1607                            try {
1608                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1609                            }
1610                            catch (Exception e) {
1611                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1612                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1613                                    }
1614    
1615                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1616                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1617                                    }
1618    
1619                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1620                            }
1621    
1622                            return (com.liferay.portal.model.User)returnObj;
1623                    }
1624                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1625                            _log.error(se, se);
1626    
1627                            throw se;
1628                    }
1629            }
1630    
1631            public static com.liferay.portal.model.User updateOpenId(
1632                    HttpPrincipal httpPrincipal, long userId, java.lang.String openId)
1633                    throws com.liferay.portal.kernel.exception.PortalException,
1634                            com.liferay.portal.kernel.exception.SystemException {
1635                    try {
1636                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
1637                                            "updateOpenId", _updateOpenIdParameterTypes42);
1638    
1639                            MethodHandler methodHandler = new MethodHandler(methodKey, userId,
1640                                            openId);
1641    
1642                            Object returnObj = null;
1643    
1644                            try {
1645                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1646                            }
1647                            catch (Exception e) {
1648                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1649                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1650                                    }
1651    
1652                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1653                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1654                                    }
1655    
1656                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1657                            }
1658    
1659                            return (com.liferay.portal.model.User)returnObj;
1660                    }
1661                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1662                            _log.error(se, se);
1663    
1664                            throw se;
1665                    }
1666            }
1667    
1668            public static void updateOrganizations(HttpPrincipal httpPrincipal,
1669                    long userId, long[] organizationIds,
1670                    com.liferay.portal.service.ServiceContext serviceContext)
1671                    throws com.liferay.portal.kernel.exception.PortalException,
1672                            com.liferay.portal.kernel.exception.SystemException {
1673                    try {
1674                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
1675                                            "updateOrganizations", _updateOrganizationsParameterTypes43);
1676    
1677                            MethodHandler methodHandler = new MethodHandler(methodKey, userId,
1678                                            organizationIds, serviceContext);
1679    
1680                            try {
1681                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
1682                            }
1683                            catch (Exception e) {
1684                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1685                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1686                                    }
1687    
1688                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1689                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1690                                    }
1691    
1692                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1693                            }
1694                    }
1695                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1696                            _log.error(se, se);
1697    
1698                            throw se;
1699                    }
1700            }
1701    
1702            public static com.liferay.portal.model.User updatePassword(
1703                    HttpPrincipal httpPrincipal, long userId, java.lang.String password1,
1704                    java.lang.String password2, boolean passwordReset)
1705                    throws com.liferay.portal.kernel.exception.PortalException,
1706                            com.liferay.portal.kernel.exception.SystemException {
1707                    try {
1708                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
1709                                            "updatePassword", _updatePasswordParameterTypes44);
1710    
1711                            MethodHandler methodHandler = new MethodHandler(methodKey, userId,
1712                                            password1, password2, passwordReset);
1713    
1714                            Object returnObj = null;
1715    
1716                            try {
1717                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1718                            }
1719                            catch (Exception e) {
1720                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1721                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1722                                    }
1723    
1724                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1725                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1726                                    }
1727    
1728                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1729                            }
1730    
1731                            return (com.liferay.portal.model.User)returnObj;
1732                    }
1733                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1734                            _log.error(se, se);
1735    
1736                            throw se;
1737                    }
1738            }
1739    
1740            public static com.liferay.portal.model.User updatePortrait(
1741                    HttpPrincipal httpPrincipal, long userId, byte[] bytes)
1742                    throws com.liferay.portal.kernel.exception.PortalException,
1743                            com.liferay.portal.kernel.exception.SystemException {
1744                    try {
1745                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
1746                                            "updatePortrait", _updatePortraitParameterTypes45);
1747    
1748                            MethodHandler methodHandler = new MethodHandler(methodKey, userId,
1749                                            bytes);
1750    
1751                            Object returnObj = null;
1752    
1753                            try {
1754                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1755                            }
1756                            catch (Exception e) {
1757                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1758                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1759                                    }
1760    
1761                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1762                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1763                                    }
1764    
1765                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1766                            }
1767    
1768                            return (com.liferay.portal.model.User)returnObj;
1769                    }
1770                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1771                            _log.error(se, se);
1772    
1773                            throw se;
1774                    }
1775            }
1776    
1777            public static com.liferay.portal.model.User updateReminderQuery(
1778                    HttpPrincipal httpPrincipal, long userId, java.lang.String question,
1779                    java.lang.String answer)
1780                    throws com.liferay.portal.kernel.exception.PortalException,
1781                            com.liferay.portal.kernel.exception.SystemException {
1782                    try {
1783                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
1784                                            "updateReminderQuery", _updateReminderQueryParameterTypes46);
1785    
1786                            MethodHandler methodHandler = new MethodHandler(methodKey, userId,
1787                                            question, answer);
1788    
1789                            Object returnObj = null;
1790    
1791                            try {
1792                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1793                            }
1794                            catch (Exception e) {
1795                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1796                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1797                                    }
1798    
1799                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1800                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1801                                    }
1802    
1803                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1804                            }
1805    
1806                            return (com.liferay.portal.model.User)returnObj;
1807                    }
1808                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1809                            _log.error(se, se);
1810    
1811                            throw se;
1812                    }
1813            }
1814    
1815            public static com.liferay.portal.model.User updateScreenName(
1816                    HttpPrincipal httpPrincipal, long userId, java.lang.String screenName)
1817                    throws com.liferay.portal.kernel.exception.PortalException,
1818                            com.liferay.portal.kernel.exception.SystemException {
1819                    try {
1820                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
1821                                            "updateScreenName", _updateScreenNameParameterTypes47);
1822    
1823                            MethodHandler methodHandler = new MethodHandler(methodKey, userId,
1824                                            screenName);
1825    
1826                            Object returnObj = null;
1827    
1828                            try {
1829                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1830                            }
1831                            catch (Exception e) {
1832                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1833                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1834                                    }
1835    
1836                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1837                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1838                                    }
1839    
1840                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1841                            }
1842    
1843                            return (com.liferay.portal.model.User)returnObj;
1844                    }
1845                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1846                            _log.error(se, se);
1847    
1848                            throw se;
1849                    }
1850            }
1851    
1852            public static com.liferay.portal.model.User updateStatus(
1853                    HttpPrincipal httpPrincipal, long userId, int status)
1854                    throws com.liferay.portal.kernel.exception.PortalException,
1855                            com.liferay.portal.kernel.exception.SystemException {
1856                    try {
1857                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
1858                                            "updateStatus", _updateStatusParameterTypes48);
1859    
1860                            MethodHandler methodHandler = new MethodHandler(methodKey, userId,
1861                                            status);
1862    
1863                            Object returnObj = null;
1864    
1865                            try {
1866                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1867                            }
1868                            catch (Exception e) {
1869                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1870                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1871                                    }
1872    
1873                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1874                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1875                                    }
1876    
1877                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1878                            }
1879    
1880                            return (com.liferay.portal.model.User)returnObj;
1881                    }
1882                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1883                            _log.error(se, se);
1884    
1885                            throw se;
1886                    }
1887            }
1888    
1889            public static com.liferay.portal.model.User updateUser(
1890                    HttpPrincipal httpPrincipal, long userId, java.lang.String oldPassword,
1891                    java.lang.String newPassword1, java.lang.String newPassword2,
1892                    boolean passwordReset, java.lang.String reminderQueryQuestion,
1893                    java.lang.String reminderQueryAnswer, java.lang.String screenName,
1894                    java.lang.String emailAddress, long facebookId,
1895                    java.lang.String openId, java.lang.String languageId,
1896                    java.lang.String timeZoneId, java.lang.String greeting,
1897                    java.lang.String comments, java.lang.String firstName,
1898                    java.lang.String middleName, java.lang.String lastName, int prefixId,
1899                    int suffixId, boolean male, int birthdayMonth, int birthdayDay,
1900                    int birthdayYear, java.lang.String smsSn, java.lang.String aimSn,
1901                    java.lang.String facebookSn, java.lang.String icqSn,
1902                    java.lang.String jabberSn, java.lang.String msnSn,
1903                    java.lang.String mySpaceSn, java.lang.String skypeSn,
1904                    java.lang.String twitterSn, java.lang.String ymSn,
1905                    java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
1906                    long[] roleIds,
1907                    java.util.List<com.liferay.portal.model.UserGroupRole> userGroupRoles,
1908                    long[] userGroupIds,
1909                    java.util.List<com.liferay.portal.model.Address> addresses,
1910                    java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
1911                    java.util.List<com.liferay.portal.model.Phone> phones,
1912                    java.util.List<com.liferay.portal.model.Website> websites,
1913                    java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> announcementsDelivers,
1914                    com.liferay.portal.service.ServiceContext serviceContext)
1915                    throws com.liferay.portal.kernel.exception.PortalException,
1916                            com.liferay.portal.kernel.exception.SystemException {
1917                    try {
1918                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
1919                                            "updateUser", _updateUserParameterTypes49);
1920    
1921                            MethodHandler methodHandler = new MethodHandler(methodKey, userId,
1922                                            oldPassword, newPassword1, newPassword2, passwordReset,
1923                                            reminderQueryQuestion, reminderQueryAnswer, screenName,
1924                                            emailAddress, facebookId, openId, languageId, timeZoneId,
1925                                            greeting, comments, firstName, middleName, lastName,
1926                                            prefixId, suffixId, male, birthdayMonth, birthdayDay,
1927                                            birthdayYear, smsSn, aimSn, facebookSn, icqSn, jabberSn,
1928                                            msnSn, mySpaceSn, skypeSn, twitterSn, ymSn, jobTitle,
1929                                            groupIds, organizationIds, roleIds, userGroupRoles,
1930                                            userGroupIds, addresses, emailAddresses, phones, websites,
1931                                            announcementsDelivers, serviceContext);
1932    
1933                            Object returnObj = null;
1934    
1935                            try {
1936                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1937                            }
1938                            catch (Exception e) {
1939                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1940                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1941                                    }
1942    
1943                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1944                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1945                                    }
1946    
1947                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1948                            }
1949    
1950                            return (com.liferay.portal.model.User)returnObj;
1951                    }
1952                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1953                            _log.error(se, se);
1954    
1955                            throw se;
1956                    }
1957            }
1958    
1959            public static com.liferay.portal.model.User updateUser(
1960                    HttpPrincipal httpPrincipal, long userId, java.lang.String oldPassword,
1961                    java.lang.String newPassword1, java.lang.String newPassword2,
1962                    boolean passwordReset, java.lang.String reminderQueryQuestion,
1963                    java.lang.String reminderQueryAnswer, java.lang.String screenName,
1964                    java.lang.String emailAddress, long facebookId,
1965                    java.lang.String openId, java.lang.String languageId,
1966                    java.lang.String timeZoneId, java.lang.String greeting,
1967                    java.lang.String comments, java.lang.String firstName,
1968                    java.lang.String middleName, java.lang.String lastName, int prefixId,
1969                    int suffixId, boolean male, int birthdayMonth, int birthdayDay,
1970                    int birthdayYear, java.lang.String smsSn, java.lang.String aimSn,
1971                    java.lang.String facebookSn, java.lang.String icqSn,
1972                    java.lang.String jabberSn, java.lang.String msnSn,
1973                    java.lang.String mySpaceSn, java.lang.String skypeSn,
1974                    java.lang.String twitterSn, java.lang.String ymSn,
1975                    java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
1976                    long[] roleIds,
1977                    java.util.List<com.liferay.portal.model.UserGroupRole> userGroupRoles,
1978                    long[] userGroupIds,
1979                    com.liferay.portal.service.ServiceContext serviceContext)
1980                    throws com.liferay.portal.kernel.exception.PortalException,
1981                            com.liferay.portal.kernel.exception.SystemException {
1982                    try {
1983                            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
1984                                            "updateUser", _updateUserParameterTypes50);
1985    
1986                            MethodHandler methodHandler = new MethodHandler(methodKey, userId,
1987                                            oldPassword, newPassword1, newPassword2, passwordReset,
1988                                            reminderQueryQuestion, reminderQueryAnswer, screenName,
1989                                            emailAddress, facebookId, openId, languageId, timeZoneId,
1990                                            greeting, comments, firstName, middleName, lastName,
1991                                            prefixId, suffixId, male, birthdayMonth, birthdayDay,
1992                                            birthdayYear, smsSn, aimSn, facebookSn, icqSn, jabberSn,
1993                                            msnSn, mySpaceSn, skypeSn, twitterSn, ymSn, jobTitle,
1994                                            groupIds, organizationIds, roleIds, userGroupRoles,
1995                                            userGroupIds, serviceContext);
1996    
1997                            Object returnObj = null;
1998    
1999                            try {
2000                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
2001                            }
2002                            catch (Exception e) {
2003                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
2004                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
2005                                    }
2006    
2007                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
2008                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
2009                                    }
2010    
2011                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
2012                            }
2013    
2014                            return (com.liferay.portal.model.User)returnObj;
2015                    }
2016                    catch (com.liferay.portal.kernel.exception.SystemException se) {
2017                            _log.error(se, se);
2018    
2019                            throw se;
2020                    }
2021            }
2022    
2023            private static Log _log = LogFactoryUtil.getLog(UserServiceHttp.class);
2024            private static final Class<?>[] _addGroupUsersParameterTypes0 = new Class[] {
2025                            long.class, long[].class,
2026                            com.liferay.portal.service.ServiceContext.class
2027                    };
2028            private static final Class<?>[] _addOrganizationUsersParameterTypes1 = new Class[] {
2029                            long.class, long[].class
2030                    };
2031            private static final Class<?>[] _addPasswordPolicyUsersParameterTypes2 = new Class[] {
2032                            long.class, long[].class
2033                    };
2034            private static final Class<?>[] _addRoleUsersParameterTypes3 = new Class[] {
2035                            long.class, long[].class
2036                    };
2037            private static final Class<?>[] _addTeamUsersParameterTypes4 = new Class[] {
2038                            long.class, long[].class
2039                    };
2040            private static final Class<?>[] _addUserParameterTypes5 = new Class[] {
2041                            long.class, boolean.class, java.lang.String.class,
2042                            java.lang.String.class, boolean.class, java.lang.String.class,
2043                            java.lang.String.class, long.class, java.lang.String.class,
2044                            java.util.Locale.class, java.lang.String.class,
2045                            java.lang.String.class, java.lang.String.class, int.class, int.class,
2046                            boolean.class, int.class, int.class, int.class,
2047                            java.lang.String.class, long[].class, long[].class, long[].class,
2048                            long[].class, boolean.class,
2049                            com.liferay.portal.service.ServiceContext.class
2050                    };
2051            private static final Class<?>[] _addUserParameterTypes6 = new Class[] {
2052                            long.class, boolean.class, java.lang.String.class,
2053                            java.lang.String.class, boolean.class, java.lang.String.class,
2054                            java.lang.String.class, long.class, java.lang.String.class,
2055                            java.util.Locale.class, java.lang.String.class,
2056                            java.lang.String.class, java.lang.String.class, int.class, int.class,
2057                            boolean.class, int.class, int.class, int.class,
2058                            java.lang.String.class, long[].class, long[].class, long[].class,
2059                            long[].class, java.util.List.class, java.util.List.class,
2060                            java.util.List.class, java.util.List.class, java.util.List.class,
2061                            boolean.class, com.liferay.portal.service.ServiceContext.class
2062                    };
2063            private static final Class<?>[] _addUserGroupUsersParameterTypes7 = new Class[] {
2064                            long.class, long[].class
2065                    };
2066            private static final Class<?>[] _addUserWithWorkflowParameterTypes8 = new Class[] {
2067                            long.class, boolean.class, java.lang.String.class,
2068                            java.lang.String.class, boolean.class, java.lang.String.class,
2069                            java.lang.String.class, long.class, java.lang.String.class,
2070                            java.util.Locale.class, java.lang.String.class,
2071                            java.lang.String.class, java.lang.String.class, int.class, int.class,
2072                            boolean.class, int.class, int.class, int.class,
2073                            java.lang.String.class, long[].class, long[].class, long[].class,
2074                            long[].class, boolean.class,
2075                            com.liferay.portal.service.ServiceContext.class
2076                    };
2077            private static final Class<?>[] _addUserWithWorkflowParameterTypes9 = new Class[] {
2078                            long.class, boolean.class, java.lang.String.class,
2079                            java.lang.String.class, boolean.class, java.lang.String.class,
2080                            java.lang.String.class, long.class, java.lang.String.class,
2081                            java.util.Locale.class, java.lang.String.class,
2082                            java.lang.String.class, java.lang.String.class, int.class, int.class,
2083                            boolean.class, int.class, int.class, int.class,
2084                            java.lang.String.class, long[].class, long[].class, long[].class,
2085                            long[].class, java.util.List.class, java.util.List.class,
2086                            java.util.List.class, java.util.List.class, java.util.List.class,
2087                            boolean.class, com.liferay.portal.service.ServiceContext.class
2088                    };
2089            private static final Class<?>[] _deletePortraitParameterTypes10 = new Class[] {
2090                            long.class
2091                    };
2092            private static final Class<?>[] _deleteRoleUserParameterTypes11 = new Class[] {
2093                            long.class, long.class
2094                    };
2095            private static final Class<?>[] _deleteUserParameterTypes12 = new Class[] {
2096                            long.class
2097                    };
2098            private static final Class<?>[] _getCompanyUsersParameterTypes13 = new Class[] {
2099                            long.class, int.class, int.class
2100                    };
2101            private static final Class<?>[] _getCompanyUsersCountParameterTypes14 = new Class[] {
2102                            long.class
2103                    };
2104            private static final Class<?>[] _getGroupUserIdsParameterTypes15 = new Class[] {
2105                            long.class
2106                    };
2107            private static final Class<?>[] _getGroupUsersParameterTypes16 = new Class[] {
2108                            long.class
2109                    };
2110            private static final Class<?>[] _getOrganizationUserIdsParameterTypes17 = new Class[] {
2111                            long.class
2112                    };
2113            private static final Class<?>[] _getOrganizationUsersParameterTypes18 = new Class[] {
2114                            long.class
2115                    };
2116            private static final Class<?>[] _getRoleUserIdsParameterTypes19 = new Class[] {
2117                            long.class
2118                    };
2119            private static final Class<?>[] _getUserByEmailAddressParameterTypes20 = new Class[] {
2120                            long.class, java.lang.String.class
2121                    };
2122            private static final Class<?>[] _getUserByIdParameterTypes21 = new Class[] {
2123                            long.class
2124                    };
2125            private static final Class<?>[] _getUserByScreenNameParameterTypes22 = new Class[] {
2126                            long.class, java.lang.String.class
2127                    };
2128            private static final Class<?>[] _getUserGroupUsersParameterTypes23 = new Class[] {
2129                            long.class
2130                    };
2131            private static final Class<?>[] _getUserIdByEmailAddressParameterTypes24 = new Class[] {
2132                            long.class, java.lang.String.class
2133                    };
2134            private static final Class<?>[] _getUserIdByScreenNameParameterTypes25 = new Class[] {
2135                            long.class, java.lang.String.class
2136                    };
2137            private static final Class<?>[] _hasGroupUserParameterTypes26 = new Class[] {
2138                            long.class, long.class
2139                    };
2140            private static final Class<?>[] _hasRoleUserParameterTypes27 = new Class[] {
2141                            long.class, long.class
2142                    };
2143            private static final Class<?>[] _hasRoleUserParameterTypes28 = new Class[] {
2144                            long.class, java.lang.String.class, long.class, boolean.class
2145                    };
2146            private static final Class<?>[] _setRoleUsersParameterTypes29 = new Class[] {
2147                            long.class, long[].class
2148                    };
2149            private static final Class<?>[] _setUserGroupUsersParameterTypes30 = new Class[] {
2150                            long.class, long[].class
2151                    };
2152            private static final Class<?>[] _unsetGroupTeamsUsersParameterTypes31 = new Class[] {
2153                            long.class, long[].class
2154                    };
2155            private static final Class<?>[] _unsetGroupUsersParameterTypes32 = new Class[] {
2156                            long.class, long[].class,
2157                            com.liferay.portal.service.ServiceContext.class
2158                    };
2159            private static final Class<?>[] _unsetOrganizationUsersParameterTypes33 = new Class[] {
2160                            long.class, long[].class
2161                    };
2162            private static final Class<?>[] _unsetPasswordPolicyUsersParameterTypes34 = new Class[] {
2163                            long.class, long[].class
2164                    };
2165            private static final Class<?>[] _unsetRoleUsersParameterTypes35 = new Class[] {
2166                            long.class, long[].class
2167                    };
2168            private static final Class<?>[] _unsetTeamUsersParameterTypes36 = new Class[] {
2169                            long.class, long[].class
2170                    };
2171            private static final Class<?>[] _unsetUserGroupUsersParameterTypes37 = new Class[] {
2172                            long.class, long[].class
2173                    };
2174            private static final Class<?>[] _updateAgreedToTermsOfUseParameterTypes38 = new Class[] {
2175                            long.class, boolean.class
2176                    };
2177            private static final Class<?>[] _updateEmailAddressParameterTypes39 = new Class[] {
2178                            long.class, java.lang.String.class, java.lang.String.class,
2179                            java.lang.String.class,
2180                            com.liferay.portal.service.ServiceContext.class
2181                    };
2182            private static final Class<?>[] _updateIncompleteUserParameterTypes40 = new Class[] {
2183                            long.class, boolean.class, java.lang.String.class,
2184                            java.lang.String.class, boolean.class, java.lang.String.class,
2185                            java.lang.String.class, long.class, java.lang.String.class,
2186                            java.util.Locale.class, java.lang.String.class,
2187                            java.lang.String.class, java.lang.String.class, int.class, int.class,
2188                            boolean.class, int.class, int.class, int.class,
2189                            java.lang.String.class, boolean.class, boolean.class,
2190                            com.liferay.portal.service.ServiceContext.class
2191                    };
2192            private static final Class<?>[] _updateLockoutByIdParameterTypes41 = new Class[] {
2193                            long.class, boolean.class
2194                    };
2195            private static final Class<?>[] _updateOpenIdParameterTypes42 = new Class[] {
2196                            long.class, java.lang.String.class
2197                    };
2198            private static final Class<?>[] _updateOrganizationsParameterTypes43 = new Class[] {
2199                            long.class, long[].class,
2200                            com.liferay.portal.service.ServiceContext.class
2201                    };
2202            private static final Class<?>[] _updatePasswordParameterTypes44 = new Class[] {
2203                            long.class, java.lang.String.class, java.lang.String.class,
2204                            boolean.class
2205                    };
2206            private static final Class<?>[] _updatePortraitParameterTypes45 = new Class[] {
2207                            long.class, byte[].class
2208                    };
2209            private static final Class<?>[] _updateReminderQueryParameterTypes46 = new Class[] {
2210                            long.class, java.lang.String.class, java.lang.String.class
2211                    };
2212            private static final Class<?>[] _updateScreenNameParameterTypes47 = new Class[] {
2213                            long.class, java.lang.String.class
2214                    };
2215            private static final Class<?>[] _updateStatusParameterTypes48 = new Class[] {
2216                            long.class, int.class
2217                    };
2218            private static final Class<?>[] _updateUserParameterTypes49 = new Class[] {
2219                            long.class, java.lang.String.class, java.lang.String.class,
2220                            java.lang.String.class, boolean.class, java.lang.String.class,
2221                            java.lang.String.class, java.lang.String.class,
2222                            java.lang.String.class, long.class, java.lang.String.class,
2223                            java.lang.String.class, java.lang.String.class,
2224                            java.lang.String.class, java.lang.String.class,
2225                            java.lang.String.class, java.lang.String.class,
2226                            java.lang.String.class, int.class, int.class, boolean.class,
2227                            int.class, int.class, int.class, java.lang.String.class,
2228                            java.lang.String.class, java.lang.String.class,
2229                            java.lang.String.class, java.lang.String.class,
2230                            java.lang.String.class, java.lang.String.class,
2231                            java.lang.String.class, java.lang.String.class,
2232                            java.lang.String.class, java.lang.String.class, long[].class,
2233                            long[].class, long[].class, java.util.List.class, long[].class,
2234                            java.util.List.class, java.util.List.class, java.util.List.class,
2235                            java.util.List.class, java.util.List.class,
2236                            com.liferay.portal.service.ServiceContext.class
2237                    };
2238            private static final Class<?>[] _updateUserParameterTypes50 = new Class[] {
2239                            long.class, java.lang.String.class, java.lang.String.class,
2240                            java.lang.String.class, boolean.class, java.lang.String.class,
2241                            java.lang.String.class, java.lang.String.class,
2242                            java.lang.String.class, long.class, java.lang.String.class,
2243                            java.lang.String.class, java.lang.String.class,
2244                            java.lang.String.class, java.lang.String.class,
2245                            java.lang.String.class, java.lang.String.class,
2246                            java.lang.String.class, int.class, int.class, boolean.class,
2247                            int.class, int.class, int.class, java.lang.String.class,
2248                            java.lang.String.class, java.lang.String.class,
2249                            java.lang.String.class, java.lang.String.class,
2250                            java.lang.String.class, java.lang.String.class,
2251                            java.lang.String.class, java.lang.String.class,
2252                            java.lang.String.class, java.lang.String.class, long[].class,
2253                            long[].class, long[].class, java.util.List.class, long[].class,
2254                            com.liferay.portal.service.ServiceContext.class
2255                    };
2256    }