1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.portal.service.http;
16  
17  import com.liferay.portal.kernel.log.Log;
18  import com.liferay.portal.kernel.log.LogFactoryUtil;
19  import com.liferay.portal.kernel.util.MethodHandler;
20  import com.liferay.portal.kernel.util.MethodKey;
21  import com.liferay.portal.security.auth.HttpPrincipal;
22  import com.liferay.portal.service.UserServiceUtil;
23  
24  /**
25   * <a href="UserServiceHttp.java.html"><b><i>View Source</i></b></a>
26   *
27   * <p>
28   * ServiceBuilder generated this class. Modifications in this class will be
29   * overwritten the next time is generated.
30   * </p>
31   *
32   * <p>
33   * This class provides a HTTP utility for the
34   * {@link com.liferay.portal.service.UserServiceUtil} service utility. The
35   * static methods of this class calls the same methods of the service utility.
36   * However, the signatures are different because it requires an additional
37   * {@link com.liferay.portal.security.auth.HttpPrincipal} parameter.
38   * </p>
39   *
40   * <p>
41   * The benefits of using the HTTP utility is that it is fast and allows for
42   * tunneling without the cost of serializing to text. The drawback is that it
43   * only works with Java.
44   * </p>
45   *
46   * <p>
47   * Set the property <b>tunnel.servlet.hosts.allowed</b> in portal.properties to
48   * configure security.
49   * </p>
50   *
51   * <p>
52   * The HTTP utility is only generated for remote services.
53   * </p>
54   *
55   * @author    Brian Wing Shun Chan
56   * @see       UserServiceSoap
57   * @see       com.liferay.portal.security.auth.HttpPrincipal
58   * @see       com.liferay.portal.service.UserServiceUtil
59   * @generated
60   */
61  public class UserServiceHttp {
62      public static void addGroupUsers(HttpPrincipal httpPrincipal, long groupId,
63          long[] userIds)
64          throws com.liferay.portal.PortalException,
65              com.liferay.portal.SystemException {
66          try {
67              MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
68                      "addGroupUsers", _addGroupUsersParameterTypes0);
69  
70              MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
71                      userIds);
72  
73              try {
74                  TunnelUtil.invoke(httpPrincipal, methodHandler);
75              }
76              catch (Exception e) {
77                  if (e instanceof com.liferay.portal.PortalException) {
78                      throw (com.liferay.portal.PortalException)e;
79                  }
80  
81                  if (e instanceof com.liferay.portal.SystemException) {
82                      throw (com.liferay.portal.SystemException)e;
83                  }
84  
85                  throw new com.liferay.portal.SystemException(e);
86              }
87          }
88          catch (com.liferay.portal.SystemException se) {
89              _log.error(se, se);
90  
91              throw se;
92          }
93      }
94  
95      public static void addOrganizationUsers(HttpPrincipal httpPrincipal,
96          long organizationId, long[] userIds)
97          throws com.liferay.portal.PortalException,
98              com.liferay.portal.SystemException {
99          try {
100             MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
101                     "addOrganizationUsers", _addOrganizationUsersParameterTypes1);
102 
103             MethodHandler methodHandler = new MethodHandler(methodKey,
104                     organizationId, userIds);
105 
106             try {
107                 TunnelUtil.invoke(httpPrincipal, methodHandler);
108             }
109             catch (Exception e) {
110                 if (e instanceof com.liferay.portal.PortalException) {
111                     throw (com.liferay.portal.PortalException)e;
112                 }
113 
114                 if (e instanceof com.liferay.portal.SystemException) {
115                     throw (com.liferay.portal.SystemException)e;
116                 }
117 
118                 throw new com.liferay.portal.SystemException(e);
119             }
120         }
121         catch (com.liferay.portal.SystemException se) {
122             _log.error(se, se);
123 
124             throw se;
125         }
126     }
127 
128     public static void addPasswordPolicyUsers(HttpPrincipal httpPrincipal,
129         long passwordPolicyId, long[] userIds)
130         throws com.liferay.portal.PortalException,
131             com.liferay.portal.SystemException {
132         try {
133             MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
134                     "addPasswordPolicyUsers",
135                     _addPasswordPolicyUsersParameterTypes2);
136 
137             MethodHandler methodHandler = new MethodHandler(methodKey,
138                     passwordPolicyId, userIds);
139 
140             try {
141                 TunnelUtil.invoke(httpPrincipal, methodHandler);
142             }
143             catch (Exception e) {
144                 if (e instanceof com.liferay.portal.PortalException) {
145                     throw (com.liferay.portal.PortalException)e;
146                 }
147 
148                 if (e instanceof com.liferay.portal.SystemException) {
149                     throw (com.liferay.portal.SystemException)e;
150                 }
151 
152                 throw new com.liferay.portal.SystemException(e);
153             }
154         }
155         catch (com.liferay.portal.SystemException se) {
156             _log.error(se, se);
157 
158             throw se;
159         }
160     }
161 
162     public static void addRoleUsers(HttpPrincipal httpPrincipal, long roleId,
163         long[] userIds)
164         throws com.liferay.portal.PortalException,
165             com.liferay.portal.SystemException {
166         try {
167             MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
168                     "addRoleUsers", _addRoleUsersParameterTypes3);
169 
170             MethodHandler methodHandler = new MethodHandler(methodKey, roleId,
171                     userIds);
172 
173             try {
174                 TunnelUtil.invoke(httpPrincipal, methodHandler);
175             }
176             catch (Exception e) {
177                 if (e instanceof com.liferay.portal.PortalException) {
178                     throw (com.liferay.portal.PortalException)e;
179                 }
180 
181                 if (e instanceof com.liferay.portal.SystemException) {
182                     throw (com.liferay.portal.SystemException)e;
183                 }
184 
185                 throw new com.liferay.portal.SystemException(e);
186             }
187         }
188         catch (com.liferay.portal.SystemException se) {
189             _log.error(se, se);
190 
191             throw se;
192         }
193     }
194 
195     public static void addUserGroupUsers(HttpPrincipal httpPrincipal,
196         long userGroupId, long[] userIds)
197         throws com.liferay.portal.PortalException,
198             com.liferay.portal.SystemException {
199         try {
200             MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
201                     "addUserGroupUsers", _addUserGroupUsersParameterTypes4);
202 
203             MethodHandler methodHandler = new MethodHandler(methodKey,
204                     userGroupId, userIds);
205 
206             try {
207                 TunnelUtil.invoke(httpPrincipal, methodHandler);
208             }
209             catch (Exception e) {
210                 if (e instanceof com.liferay.portal.PortalException) {
211                     throw (com.liferay.portal.PortalException)e;
212                 }
213 
214                 if (e instanceof com.liferay.portal.SystemException) {
215                     throw (com.liferay.portal.SystemException)e;
216                 }
217 
218                 throw new com.liferay.portal.SystemException(e);
219             }
220         }
221         catch (com.liferay.portal.SystemException se) {
222             _log.error(se, se);
223 
224             throw se;
225         }
226     }
227 
228     public static com.liferay.portal.model.User addUser(
229         HttpPrincipal httpPrincipal, long companyId, boolean autoPassword,
230         java.lang.String password1, java.lang.String password2,
231         boolean autoScreenName, java.lang.String screenName,
232         java.lang.String emailAddress, java.lang.String openId,
233         java.util.Locale locale, java.lang.String firstName,
234         java.lang.String middleName, java.lang.String lastName, int prefixId,
235         int suffixId, boolean male, int birthdayMonth, int birthdayDay,
236         int birthdayYear, java.lang.String jobTitle, long[] groupIds,
237         long[] organizationIds, long[] roleIds, long[] userGroupIds,
238         boolean sendEmail,
239         com.liferay.portal.service.ServiceContext serviceContext)
240         throws com.liferay.portal.PortalException,
241             com.liferay.portal.SystemException {
242         try {
243             MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
244                     "addUser", _addUserParameterTypes5);
245 
246             MethodHandler methodHandler = new MethodHandler(methodKey,
247                     companyId, autoPassword, password1, password2,
248                     autoScreenName, screenName, emailAddress, openId, locale,
249                     firstName, middleName, lastName, prefixId, suffixId, male,
250                     birthdayMonth, birthdayDay, birthdayYear, jobTitle,
251                     groupIds, organizationIds, roleIds, userGroupIds,
252                     sendEmail, serviceContext);
253 
254             Object returnObj = null;
255 
256             try {
257                 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
258             }
259             catch (Exception e) {
260                 if (e instanceof com.liferay.portal.PortalException) {
261                     throw (com.liferay.portal.PortalException)e;
262                 }
263 
264                 if (e instanceof com.liferay.portal.SystemException) {
265                     throw (com.liferay.portal.SystemException)e;
266                 }
267 
268                 throw new com.liferay.portal.SystemException(e);
269             }
270 
271             return (com.liferay.portal.model.User)returnObj;
272         }
273         catch (com.liferay.portal.SystemException se) {
274             _log.error(se, se);
275 
276             throw se;
277         }
278     }
279 
280     public static com.liferay.portal.model.User addUser(
281         HttpPrincipal httpPrincipal, long companyId, boolean autoPassword,
282         java.lang.String password1, java.lang.String password2,
283         boolean autoScreenName, java.lang.String screenName,
284         java.lang.String emailAddress, java.lang.String openId,
285         java.util.Locale locale, java.lang.String firstName,
286         java.lang.String middleName, java.lang.String lastName, int prefixId,
287         int suffixId, boolean male, int birthdayMonth, int birthdayDay,
288         int birthdayYear, java.lang.String jobTitle, long[] groupIds,
289         long[] organizationIds, long[] roleIds, long[] userGroupIds,
290         boolean sendEmail,
291         java.util.List<com.liferay.portal.model.Address> addresses,
292         java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
293         java.util.List<com.liferay.portal.model.Phone> phones,
294         java.util.List<com.liferay.portal.model.Website> websites,
295         java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> announcementsDelivers,
296         com.liferay.portal.service.ServiceContext serviceContext)
297         throws com.liferay.portal.PortalException,
298             com.liferay.portal.SystemException {
299         try {
300             MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
301                     "addUser", _addUserParameterTypes6);
302 
303             MethodHandler methodHandler = new MethodHandler(methodKey,
304                     companyId, autoPassword, password1, password2,
305                     autoScreenName, screenName, emailAddress, openId, locale,
306                     firstName, middleName, lastName, prefixId, suffixId, male,
307                     birthdayMonth, birthdayDay, birthdayYear, jobTitle,
308                     groupIds, organizationIds, roleIds, userGroupIds,
309                     sendEmail, addresses, emailAddresses, phones, websites,
310                     announcementsDelivers, serviceContext);
311 
312             Object returnObj = null;
313 
314             try {
315                 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
316             }
317             catch (Exception e) {
318                 if (e instanceof com.liferay.portal.PortalException) {
319                     throw (com.liferay.portal.PortalException)e;
320                 }
321 
322                 if (e instanceof com.liferay.portal.SystemException) {
323                     throw (com.liferay.portal.SystemException)e;
324                 }
325 
326                 throw new com.liferay.portal.SystemException(e);
327             }
328 
329             return (com.liferay.portal.model.User)returnObj;
330         }
331         catch (com.liferay.portal.SystemException se) {
332             _log.error(se, se);
333 
334             throw se;
335         }
336     }
337 
338     public static void deletePortrait(HttpPrincipal httpPrincipal, long userId)
339         throws com.liferay.portal.PortalException,
340             com.liferay.portal.SystemException {
341         try {
342             MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
343                     "deletePortrait", _deletePortraitParameterTypes7);
344 
345             MethodHandler methodHandler = new MethodHandler(methodKey, userId);
346 
347             try {
348                 TunnelUtil.invoke(httpPrincipal, methodHandler);
349             }
350             catch (Exception e) {
351                 if (e instanceof com.liferay.portal.PortalException) {
352                     throw (com.liferay.portal.PortalException)e;
353                 }
354 
355                 if (e instanceof com.liferay.portal.SystemException) {
356                     throw (com.liferay.portal.SystemException)e;
357                 }
358 
359                 throw new com.liferay.portal.SystemException(e);
360             }
361         }
362         catch (com.liferay.portal.SystemException se) {
363             _log.error(se, se);
364 
365             throw se;
366         }
367     }
368 
369     public static void deleteRoleUser(HttpPrincipal httpPrincipal, long roleId,
370         long userId)
371         throws com.liferay.portal.PortalException,
372             com.liferay.portal.SystemException {
373         try {
374             MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
375                     "deleteRoleUser", _deleteRoleUserParameterTypes8);
376 
377             MethodHandler methodHandler = new MethodHandler(methodKey, roleId,
378                     userId);
379 
380             try {
381                 TunnelUtil.invoke(httpPrincipal, methodHandler);
382             }
383             catch (Exception e) {
384                 if (e instanceof com.liferay.portal.PortalException) {
385                     throw (com.liferay.portal.PortalException)e;
386                 }
387 
388                 if (e instanceof com.liferay.portal.SystemException) {
389                     throw (com.liferay.portal.SystemException)e;
390                 }
391 
392                 throw new com.liferay.portal.SystemException(e);
393             }
394         }
395         catch (com.liferay.portal.SystemException se) {
396             _log.error(se, se);
397 
398             throw se;
399         }
400     }
401 
402     public static void deleteUser(HttpPrincipal httpPrincipal, long userId)
403         throws com.liferay.portal.PortalException,
404             com.liferay.portal.SystemException {
405         try {
406             MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
407                     "deleteUser", _deleteUserParameterTypes9);
408 
409             MethodHandler methodHandler = new MethodHandler(methodKey, userId);
410 
411             try {
412                 TunnelUtil.invoke(httpPrincipal, methodHandler);
413             }
414             catch (Exception e) {
415                 if (e instanceof com.liferay.portal.PortalException) {
416                     throw (com.liferay.portal.PortalException)e;
417                 }
418 
419                 if (e instanceof com.liferay.portal.SystemException) {
420                     throw (com.liferay.portal.SystemException)e;
421                 }
422 
423                 throw new com.liferay.portal.SystemException(e);
424             }
425         }
426         catch (com.liferay.portal.SystemException se) {
427             _log.error(se, se);
428 
429             throw se;
430         }
431     }
432 
433     public static long getDefaultUserId(HttpPrincipal httpPrincipal,
434         long companyId)
435         throws com.liferay.portal.PortalException,
436             com.liferay.portal.SystemException {
437         try {
438             MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
439                     "getDefaultUserId", _getDefaultUserIdParameterTypes10);
440 
441             MethodHandler methodHandler = new MethodHandler(methodKey, companyId);
442 
443             Object returnObj = null;
444 
445             try {
446                 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
447             }
448             catch (Exception e) {
449                 if (e instanceof com.liferay.portal.PortalException) {
450                     throw (com.liferay.portal.PortalException)e;
451                 }
452 
453                 if (e instanceof com.liferay.portal.SystemException) {
454                     throw (com.liferay.portal.SystemException)e;
455                 }
456 
457                 throw new com.liferay.portal.SystemException(e);
458             }
459 
460             return ((Long)returnObj).longValue();
461         }
462         catch (com.liferay.portal.SystemException se) {
463             _log.error(se, se);
464 
465             throw se;
466         }
467     }
468 
469     public static long[] getGroupUserIds(HttpPrincipal httpPrincipal,
470         long groupId) throws com.liferay.portal.SystemException {
471         try {
472             MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
473                     "getGroupUserIds", _getGroupUserIdsParameterTypes11);
474 
475             MethodHandler methodHandler = new MethodHandler(methodKey, groupId);
476 
477             Object returnObj = null;
478 
479             try {
480                 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
481             }
482             catch (Exception e) {
483                 if (e instanceof com.liferay.portal.SystemException) {
484                     throw (com.liferay.portal.SystemException)e;
485                 }
486 
487                 throw new com.liferay.portal.SystemException(e);
488             }
489 
490             return (long[])returnObj;
491         }
492         catch (com.liferay.portal.SystemException se) {
493             _log.error(se, se);
494 
495             throw se;
496         }
497     }
498 
499     public static long[] getOrganizationUserIds(HttpPrincipal httpPrincipal,
500         long organizationId) throws com.liferay.portal.SystemException {
501         try {
502             MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
503                     "getOrganizationUserIds",
504                     _getOrganizationUserIdsParameterTypes12);
505 
506             MethodHandler methodHandler = new MethodHandler(methodKey,
507                     organizationId);
508 
509             Object returnObj = null;
510 
511             try {
512                 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
513             }
514             catch (Exception e) {
515                 if (e instanceof com.liferay.portal.SystemException) {
516                     throw (com.liferay.portal.SystemException)e;
517                 }
518 
519                 throw new com.liferay.portal.SystemException(e);
520             }
521 
522             return (long[])returnObj;
523         }
524         catch (com.liferay.portal.SystemException se) {
525             _log.error(se, se);
526 
527             throw se;
528         }
529     }
530 
531     public static long[] getRoleUserIds(HttpPrincipal httpPrincipal, long roleId)
532         throws com.liferay.portal.SystemException {
533         try {
534             MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
535                     "getRoleUserIds", _getRoleUserIdsParameterTypes13);
536 
537             MethodHandler methodHandler = new MethodHandler(methodKey, roleId);
538 
539             Object returnObj = null;
540 
541             try {
542                 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
543             }
544             catch (Exception e) {
545                 if (e instanceof com.liferay.portal.SystemException) {
546                     throw (com.liferay.portal.SystemException)e;
547                 }
548 
549                 throw new com.liferay.portal.SystemException(e);
550             }
551 
552             return (long[])returnObj;
553         }
554         catch (com.liferay.portal.SystemException se) {
555             _log.error(se, se);
556 
557             throw se;
558         }
559     }
560 
561     public static com.liferay.portal.model.User getUserByEmailAddress(
562         HttpPrincipal httpPrincipal, long companyId,
563         java.lang.String emailAddress)
564         throws com.liferay.portal.PortalException,
565             com.liferay.portal.SystemException {
566         try {
567             MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
568                     "getUserByEmailAddress",
569                     _getUserByEmailAddressParameterTypes14);
570 
571             MethodHandler methodHandler = new MethodHandler(methodKey,
572                     companyId, emailAddress);
573 
574             Object returnObj = null;
575 
576             try {
577                 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
578             }
579             catch (Exception e) {
580                 if (e instanceof com.liferay.portal.PortalException) {
581                     throw (com.liferay.portal.PortalException)e;
582                 }
583 
584                 if (e instanceof com.liferay.portal.SystemException) {
585                     throw (com.liferay.portal.SystemException)e;
586                 }
587 
588                 throw new com.liferay.portal.SystemException(e);
589             }
590 
591             return (com.liferay.portal.model.User)returnObj;
592         }
593         catch (com.liferay.portal.SystemException se) {
594             _log.error(se, se);
595 
596             throw se;
597         }
598     }
599 
600     public static com.liferay.portal.model.User getUserById(
601         HttpPrincipal httpPrincipal, long userId)
602         throws com.liferay.portal.PortalException,
603             com.liferay.portal.SystemException {
604         try {
605             MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
606                     "getUserById", _getUserByIdParameterTypes15);
607 
608             MethodHandler methodHandler = new MethodHandler(methodKey, userId);
609 
610             Object returnObj = null;
611 
612             try {
613                 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
614             }
615             catch (Exception e) {
616                 if (e instanceof com.liferay.portal.PortalException) {
617                     throw (com.liferay.portal.PortalException)e;
618                 }
619 
620                 if (e instanceof com.liferay.portal.SystemException) {
621                     throw (com.liferay.portal.SystemException)e;
622                 }
623 
624                 throw new com.liferay.portal.SystemException(e);
625             }
626 
627             return (com.liferay.portal.model.User)returnObj;
628         }
629         catch (com.liferay.portal.SystemException se) {
630             _log.error(se, se);
631 
632             throw se;
633         }
634     }
635 
636     public static com.liferay.portal.model.User getUserByScreenName(
637         HttpPrincipal httpPrincipal, long companyId, java.lang.String screenName)
638         throws com.liferay.portal.PortalException,
639             com.liferay.portal.SystemException {
640         try {
641             MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
642                     "getUserByScreenName", _getUserByScreenNameParameterTypes16);
643 
644             MethodHandler methodHandler = new MethodHandler(methodKey,
645                     companyId, screenName);
646 
647             Object returnObj = null;
648 
649             try {
650                 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
651             }
652             catch (Exception e) {
653                 if (e instanceof com.liferay.portal.PortalException) {
654                     throw (com.liferay.portal.PortalException)e;
655                 }
656 
657                 if (e instanceof com.liferay.portal.SystemException) {
658                     throw (com.liferay.portal.SystemException)e;
659                 }
660 
661                 throw new com.liferay.portal.SystemException(e);
662             }
663 
664             return (com.liferay.portal.model.User)returnObj;
665         }
666         catch (com.liferay.portal.SystemException se) {
667             _log.error(se, se);
668 
669             throw se;
670         }
671     }
672 
673     public static long getUserIdByEmailAddress(HttpPrincipal httpPrincipal,
674         long companyId, java.lang.String emailAddress)
675         throws com.liferay.portal.PortalException,
676             com.liferay.portal.SystemException {
677         try {
678             MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
679                     "getUserIdByEmailAddress",
680                     _getUserIdByEmailAddressParameterTypes17);
681 
682             MethodHandler methodHandler = new MethodHandler(methodKey,
683                     companyId, emailAddress);
684 
685             Object returnObj = null;
686 
687             try {
688                 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
689             }
690             catch (Exception e) {
691                 if (e instanceof com.liferay.portal.PortalException) {
692                     throw (com.liferay.portal.PortalException)e;
693                 }
694 
695                 if (e instanceof com.liferay.portal.SystemException) {
696                     throw (com.liferay.portal.SystemException)e;
697                 }
698 
699                 throw new com.liferay.portal.SystemException(e);
700             }
701 
702             return ((Long)returnObj).longValue();
703         }
704         catch (com.liferay.portal.SystemException se) {
705             _log.error(se, se);
706 
707             throw se;
708         }
709     }
710 
711     public static long getUserIdByScreenName(HttpPrincipal httpPrincipal,
712         long companyId, java.lang.String screenName)
713         throws com.liferay.portal.PortalException,
714             com.liferay.portal.SystemException {
715         try {
716             MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
717                     "getUserIdByScreenName",
718                     _getUserIdByScreenNameParameterTypes18);
719 
720             MethodHandler methodHandler = new MethodHandler(methodKey,
721                     companyId, screenName);
722 
723             Object returnObj = null;
724 
725             try {
726                 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
727             }
728             catch (Exception e) {
729                 if (e instanceof com.liferay.portal.PortalException) {
730                     throw (com.liferay.portal.PortalException)e;
731                 }
732 
733                 if (e instanceof com.liferay.portal.SystemException) {
734                     throw (com.liferay.portal.SystemException)e;
735                 }
736 
737                 throw new com.liferay.portal.SystemException(e);
738             }
739 
740             return ((Long)returnObj).longValue();
741         }
742         catch (com.liferay.portal.SystemException se) {
743             _log.error(se, se);
744 
745             throw se;
746         }
747     }
748 
749     public static boolean hasGroupUser(HttpPrincipal httpPrincipal,
750         long groupId, long userId) throws com.liferay.portal.SystemException {
751         try {
752             MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
753                     "hasGroupUser", _hasGroupUserParameterTypes19);
754 
755             MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
756                     userId);
757 
758             Object returnObj = null;
759 
760             try {
761                 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
762             }
763             catch (Exception e) {
764                 if (e instanceof com.liferay.portal.SystemException) {
765                     throw (com.liferay.portal.SystemException)e;
766                 }
767 
768                 throw new com.liferay.portal.SystemException(e);
769             }
770 
771             return ((Boolean)returnObj).booleanValue();
772         }
773         catch (com.liferay.portal.SystemException se) {
774             _log.error(se, se);
775 
776             throw se;
777         }
778     }
779 
780     public static boolean hasRoleUser(HttpPrincipal httpPrincipal, long roleId,
781         long userId) throws com.liferay.portal.SystemException {
782         try {
783             MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
784                     "hasRoleUser", _hasRoleUserParameterTypes20);
785 
786             MethodHandler methodHandler = new MethodHandler(methodKey, roleId,
787                     userId);
788 
789             Object returnObj = null;
790 
791             try {
792                 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
793             }
794             catch (Exception e) {
795                 if (e instanceof com.liferay.portal.SystemException) {
796                     throw (com.liferay.portal.SystemException)e;
797                 }
798 
799                 throw new com.liferay.portal.SystemException(e);
800             }
801 
802             return ((Boolean)returnObj).booleanValue();
803         }
804         catch (com.liferay.portal.SystemException se) {
805             _log.error(se, se);
806 
807             throw se;
808         }
809     }
810 
811     public static boolean hasRoleUser(HttpPrincipal httpPrincipal,
812         long companyId, java.lang.String name, long userId, boolean inherited)
813         throws com.liferay.portal.PortalException,
814             com.liferay.portal.SystemException {
815         try {
816             MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
817                     "hasRoleUser", _hasRoleUserParameterTypes21);
818 
819             MethodHandler methodHandler = new MethodHandler(methodKey,
820                     companyId, name, userId, inherited);
821 
822             Object returnObj = null;
823 
824             try {
825                 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
826             }
827             catch (Exception e) {
828                 if (e instanceof com.liferay.portal.PortalException) {
829                     throw (com.liferay.portal.PortalException)e;
830                 }
831 
832                 if (e instanceof com.liferay.portal.SystemException) {
833                     throw (com.liferay.portal.SystemException)e;
834                 }
835 
836                 throw new com.liferay.portal.SystemException(e);
837             }
838 
839             return ((Boolean)returnObj).booleanValue();
840         }
841         catch (com.liferay.portal.SystemException se) {
842             _log.error(se, se);
843 
844             throw se;
845         }
846     }
847 
848     public static void setRoleUsers(HttpPrincipal httpPrincipal, long roleId,
849         long[] userIds)
850         throws com.liferay.portal.PortalException,
851             com.liferay.portal.SystemException {
852         try {
853             MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
854                     "setRoleUsers", _setRoleUsersParameterTypes22);
855 
856             MethodHandler methodHandler = new MethodHandler(methodKey, roleId,
857                     userIds);
858 
859             try {
860                 TunnelUtil.invoke(httpPrincipal, methodHandler);
861             }
862             catch (Exception e) {
863                 if (e instanceof com.liferay.portal.PortalException) {
864                     throw (com.liferay.portal.PortalException)e;
865                 }
866 
867                 if (e instanceof com.liferay.portal.SystemException) {
868                     throw (com.liferay.portal.SystemException)e;
869                 }
870 
871                 throw new com.liferay.portal.SystemException(e);
872             }
873         }
874         catch (com.liferay.portal.SystemException se) {
875             _log.error(se, se);
876 
877             throw se;
878         }
879     }
880 
881     public static void setUserGroupUsers(HttpPrincipal httpPrincipal,
882         long userGroupId, long[] userIds)
883         throws com.liferay.portal.PortalException,
884             com.liferay.portal.SystemException {
885         try {
886             MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
887                     "setUserGroupUsers", _setUserGroupUsersParameterTypes23);
888 
889             MethodHandler methodHandler = new MethodHandler(methodKey,
890                     userGroupId, userIds);
891 
892             try {
893                 TunnelUtil.invoke(httpPrincipal, methodHandler);
894             }
895             catch (Exception e) {
896                 if (e instanceof com.liferay.portal.PortalException) {
897                     throw (com.liferay.portal.PortalException)e;
898                 }
899 
900                 if (e instanceof com.liferay.portal.SystemException) {
901                     throw (com.liferay.portal.SystemException)e;
902                 }
903 
904                 throw new com.liferay.portal.SystemException(e);
905             }
906         }
907         catch (com.liferay.portal.SystemException se) {
908             _log.error(se, se);
909 
910             throw se;
911         }
912     }
913 
914     public static void unsetGroupUsers(HttpPrincipal httpPrincipal,
915         long groupId, long[] userIds)
916         throws com.liferay.portal.PortalException,
917             com.liferay.portal.SystemException {
918         try {
919             MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
920                     "unsetGroupUsers", _unsetGroupUsersParameterTypes24);
921 
922             MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
923                     userIds);
924 
925             try {
926                 TunnelUtil.invoke(httpPrincipal, methodHandler);
927             }
928             catch (Exception e) {
929                 if (e instanceof com.liferay.portal.PortalException) {
930                     throw (com.liferay.portal.PortalException)e;
931                 }
932 
933                 if (e instanceof com.liferay.portal.SystemException) {
934                     throw (com.liferay.portal.SystemException)e;
935                 }
936 
937                 throw new com.liferay.portal.SystemException(e);
938             }
939         }
940         catch (com.liferay.portal.SystemException se) {
941             _log.error(se, se);
942 
943             throw se;
944         }
945     }
946 
947     public static void unsetOrganizationUsers(HttpPrincipal httpPrincipal,
948         long organizationId, long[] userIds)
949         throws com.liferay.portal.PortalException,
950             com.liferay.portal.SystemException {
951         try {
952             MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
953                     "unsetOrganizationUsers",
954                     _unsetOrganizationUsersParameterTypes25);
955 
956             MethodHandler methodHandler = new MethodHandler(methodKey,
957                     organizationId, userIds);
958 
959             try {
960                 TunnelUtil.invoke(httpPrincipal, methodHandler);
961             }
962             catch (Exception e) {
963                 if (e instanceof com.liferay.portal.PortalException) {
964                     throw (com.liferay.portal.PortalException)e;
965                 }
966 
967                 if (e instanceof com.liferay.portal.SystemException) {
968                     throw (com.liferay.portal.SystemException)e;
969                 }
970 
971                 throw new com.liferay.portal.SystemException(e);
972             }
973         }
974         catch (com.liferay.portal.SystemException se) {
975             _log.error(se, se);
976 
977             throw se;
978         }
979     }
980 
981     public static void unsetPasswordPolicyUsers(HttpPrincipal httpPrincipal,
982         long passwordPolicyId, long[] userIds)
983         throws com.liferay.portal.PortalException,
984             com.liferay.portal.SystemException {
985         try {
986             MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
987                     "unsetPasswordPolicyUsers",
988                     _unsetPasswordPolicyUsersParameterTypes26);
989 
990             MethodHandler methodHandler = new MethodHandler(methodKey,
991                     passwordPolicyId, userIds);
992 
993             try {
994                 TunnelUtil.invoke(httpPrincipal, methodHandler);
995             }
996             catch (Exception e) {
997                 if (e instanceof com.liferay.portal.PortalException) {
998                     throw (com.liferay.portal.PortalException)e;
999                 }
1000
1001                if (e instanceof com.liferay.portal.SystemException) {
1002                    throw (com.liferay.portal.SystemException)e;
1003                }
1004
1005                throw new com.liferay.portal.SystemException(e);
1006            }
1007        }
1008        catch (com.liferay.portal.SystemException se) {
1009            _log.error(se, se);
1010
1011            throw se;
1012        }
1013    }
1014
1015    public static void unsetRoleUsers(HttpPrincipal httpPrincipal, long roleId,
1016        long[] userIds)
1017        throws com.liferay.portal.PortalException,
1018            com.liferay.portal.SystemException {
1019        try {
1020            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
1021                    "unsetRoleUsers", _unsetRoleUsersParameterTypes27);
1022
1023            MethodHandler methodHandler = new MethodHandler(methodKey, roleId,
1024                    userIds);
1025
1026            try {
1027                TunnelUtil.invoke(httpPrincipal, methodHandler);
1028            }
1029            catch (Exception e) {
1030                if (e instanceof com.liferay.portal.PortalException) {
1031                    throw (com.liferay.portal.PortalException)e;
1032                }
1033
1034                if (e instanceof com.liferay.portal.SystemException) {
1035                    throw (com.liferay.portal.SystemException)e;
1036                }
1037
1038                throw new com.liferay.portal.SystemException(e);
1039            }
1040        }
1041        catch (com.liferay.portal.SystemException se) {
1042            _log.error(se, se);
1043
1044            throw se;
1045        }
1046    }
1047
1048    public static void unsetUserGroupUsers(HttpPrincipal httpPrincipal,
1049        long userGroupId, long[] userIds)
1050        throws com.liferay.portal.PortalException,
1051            com.liferay.portal.SystemException {
1052        try {
1053            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
1054                    "unsetUserGroupUsers", _unsetUserGroupUsersParameterTypes28);
1055
1056            MethodHandler methodHandler = new MethodHandler(methodKey,
1057                    userGroupId, userIds);
1058
1059            try {
1060                TunnelUtil.invoke(httpPrincipal, methodHandler);
1061            }
1062            catch (Exception e) {
1063                if (e instanceof com.liferay.portal.PortalException) {
1064                    throw (com.liferay.portal.PortalException)e;
1065                }
1066
1067                if (e instanceof com.liferay.portal.SystemException) {
1068                    throw (com.liferay.portal.SystemException)e;
1069                }
1070
1071                throw new com.liferay.portal.SystemException(e);
1072            }
1073        }
1074        catch (com.liferay.portal.SystemException se) {
1075            _log.error(se, se);
1076
1077            throw se;
1078        }
1079    }
1080
1081    public static com.liferay.portal.model.User updateActive(
1082        HttpPrincipal httpPrincipal, long userId, boolean active)
1083        throws com.liferay.portal.PortalException,
1084            com.liferay.portal.SystemException {
1085        try {
1086            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
1087                    "updateActive", _updateActiveParameterTypes29);
1088
1089            MethodHandler methodHandler = new MethodHandler(methodKey, userId,
1090                    active);
1091
1092            Object returnObj = null;
1093
1094            try {
1095                returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1096            }
1097            catch (Exception e) {
1098                if (e instanceof com.liferay.portal.PortalException) {
1099                    throw (com.liferay.portal.PortalException)e;
1100                }
1101
1102                if (e instanceof com.liferay.portal.SystemException) {
1103                    throw (com.liferay.portal.SystemException)e;
1104                }
1105
1106                throw new com.liferay.portal.SystemException(e);
1107            }
1108
1109            return (com.liferay.portal.model.User)returnObj;
1110        }
1111        catch (com.liferay.portal.SystemException se) {
1112            _log.error(se, se);
1113
1114            throw se;
1115        }
1116    }
1117
1118    public static com.liferay.portal.model.User updateAgreedToTermsOfUse(
1119        HttpPrincipal httpPrincipal, long userId, boolean agreedToTermsOfUse)
1120        throws com.liferay.portal.PortalException,
1121            com.liferay.portal.SystemException {
1122        try {
1123            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
1124                    "updateAgreedToTermsOfUse",
1125                    _updateAgreedToTermsOfUseParameterTypes30);
1126
1127            MethodHandler methodHandler = new MethodHandler(methodKey, userId,
1128                    agreedToTermsOfUse);
1129
1130            Object returnObj = null;
1131
1132            try {
1133                returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1134            }
1135            catch (Exception e) {
1136                if (e instanceof com.liferay.portal.PortalException) {
1137                    throw (com.liferay.portal.PortalException)e;
1138                }
1139
1140                if (e instanceof com.liferay.portal.SystemException) {
1141                    throw (com.liferay.portal.SystemException)e;
1142                }
1143
1144                throw new com.liferay.portal.SystemException(e);
1145            }
1146
1147            return (com.liferay.portal.model.User)returnObj;
1148        }
1149        catch (com.liferay.portal.SystemException se) {
1150            _log.error(se, se);
1151
1152            throw se;
1153        }
1154    }
1155
1156    public static void updateEmailAddress(HttpPrincipal httpPrincipal,
1157        long userId, java.lang.String password, java.lang.String emailAddress1,
1158        java.lang.String emailAddress2)
1159        throws com.liferay.portal.PortalException,
1160            com.liferay.portal.SystemException {
1161        try {
1162            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
1163                    "updateEmailAddress", _updateEmailAddressParameterTypes31);
1164
1165            MethodHandler methodHandler = new MethodHandler(methodKey, userId,
1166                    password, emailAddress1, emailAddress2);
1167
1168            try {
1169                TunnelUtil.invoke(httpPrincipal, methodHandler);
1170            }
1171            catch (Exception e) {
1172                if (e instanceof com.liferay.portal.PortalException) {
1173                    throw (com.liferay.portal.PortalException)e;
1174                }
1175
1176                if (e instanceof com.liferay.portal.SystemException) {
1177                    throw (com.liferay.portal.SystemException)e;
1178                }
1179
1180                throw new com.liferay.portal.SystemException(e);
1181            }
1182        }
1183        catch (com.liferay.portal.SystemException se) {
1184            _log.error(se, se);
1185
1186            throw se;
1187        }
1188    }
1189
1190    public static com.liferay.portal.model.User updateLockout(
1191        HttpPrincipal httpPrincipal, long userId, boolean lockout)
1192        throws com.liferay.portal.PortalException,
1193            com.liferay.portal.SystemException {
1194        try {
1195            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
1196                    "updateLockout", _updateLockoutParameterTypes32);
1197
1198            MethodHandler methodHandler = new MethodHandler(methodKey, userId,
1199                    lockout);
1200
1201            Object returnObj = null;
1202
1203            try {
1204                returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1205            }
1206            catch (Exception e) {
1207                if (e instanceof com.liferay.portal.PortalException) {
1208                    throw (com.liferay.portal.PortalException)e;
1209                }
1210
1211                if (e instanceof com.liferay.portal.SystemException) {
1212                    throw (com.liferay.portal.SystemException)e;
1213                }
1214
1215                throw new com.liferay.portal.SystemException(e);
1216            }
1217
1218            return (com.liferay.portal.model.User)returnObj;
1219        }
1220        catch (com.liferay.portal.SystemException se) {
1221            _log.error(se, se);
1222
1223            throw se;
1224        }
1225    }
1226
1227    public static void updateOpenId(HttpPrincipal httpPrincipal, long userId,
1228        java.lang.String openId)
1229        throws com.liferay.portal.PortalException,
1230            com.liferay.portal.SystemException {
1231        try {
1232            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
1233                    "updateOpenId", _updateOpenIdParameterTypes33);
1234
1235            MethodHandler methodHandler = new MethodHandler(methodKey, userId,
1236                    openId);
1237
1238            try {
1239                TunnelUtil.invoke(httpPrincipal, methodHandler);
1240            }
1241            catch (Exception e) {
1242                if (e instanceof com.liferay.portal.PortalException) {
1243                    throw (com.liferay.portal.PortalException)e;
1244                }
1245
1246                if (e instanceof com.liferay.portal.SystemException) {
1247                    throw (com.liferay.portal.SystemException)e;
1248                }
1249
1250                throw new com.liferay.portal.SystemException(e);
1251            }
1252        }
1253        catch (com.liferay.portal.SystemException se) {
1254            _log.error(se, se);
1255
1256            throw se;
1257        }
1258    }
1259
1260    public static void updateOrganizations(HttpPrincipal httpPrincipal,
1261        long userId, long[] organizationIds)
1262        throws com.liferay.portal.PortalException,
1263            com.liferay.portal.SystemException {
1264        try {
1265            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
1266                    "updateOrganizations", _updateOrganizationsParameterTypes34);
1267
1268            MethodHandler methodHandler = new MethodHandler(methodKey, userId,
1269                    organizationIds);
1270
1271            try {
1272                TunnelUtil.invoke(httpPrincipal, methodHandler);
1273            }
1274            catch (Exception e) {
1275                if (e instanceof com.liferay.portal.PortalException) {
1276                    throw (com.liferay.portal.PortalException)e;
1277                }
1278
1279                if (e instanceof com.liferay.portal.SystemException) {
1280                    throw (com.liferay.portal.SystemException)e;
1281                }
1282
1283                throw new com.liferay.portal.SystemException(e);
1284            }
1285        }
1286        catch (com.liferay.portal.SystemException se) {
1287            _log.error(se, se);
1288
1289            throw se;
1290        }
1291    }
1292
1293    public static com.liferay.portal.model.User updatePassword(
1294        HttpPrincipal httpPrincipal, long userId, java.lang.String password1,
1295        java.lang.String password2, boolean passwordReset)
1296        throws com.liferay.portal.PortalException,
1297            com.liferay.portal.SystemException {
1298        try {
1299            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
1300                    "updatePassword", _updatePasswordParameterTypes35);
1301
1302            MethodHandler methodHandler = new MethodHandler(methodKey, userId,
1303                    password1, password2, passwordReset);
1304
1305            Object returnObj = null;
1306
1307            try {
1308                returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1309            }
1310            catch (Exception e) {
1311                if (e instanceof com.liferay.portal.PortalException) {
1312                    throw (com.liferay.portal.PortalException)e;
1313                }
1314
1315                if (e instanceof com.liferay.portal.SystemException) {
1316                    throw (com.liferay.portal.SystemException)e;
1317                }
1318
1319                throw new com.liferay.portal.SystemException(e);
1320            }
1321
1322            return (com.liferay.portal.model.User)returnObj;
1323        }
1324        catch (com.liferay.portal.SystemException se) {
1325            _log.error(se, se);
1326
1327            throw se;
1328        }
1329    }
1330
1331    public static void updatePortrait(HttpPrincipal httpPrincipal, long userId,
1332        byte[] bytes)
1333        throws com.liferay.portal.PortalException,
1334            com.liferay.portal.SystemException {
1335        try {
1336            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
1337                    "updatePortrait", _updatePortraitParameterTypes36);
1338
1339            MethodHandler methodHandler = new MethodHandler(methodKey, userId,
1340                    bytes);
1341
1342            try {
1343                TunnelUtil.invoke(httpPrincipal, methodHandler);
1344            }
1345            catch (Exception e) {
1346                if (e instanceof com.liferay.portal.PortalException) {
1347                    throw (com.liferay.portal.PortalException)e;
1348                }
1349
1350                if (e instanceof com.liferay.portal.SystemException) {
1351                    throw (com.liferay.portal.SystemException)e;
1352                }
1353
1354                throw new com.liferay.portal.SystemException(e);
1355            }
1356        }
1357        catch (com.liferay.portal.SystemException se) {
1358            _log.error(se, se);
1359
1360            throw se;
1361        }
1362    }
1363
1364    public static void updateReminderQuery(HttpPrincipal httpPrincipal,
1365        long userId, java.lang.String question, java.lang.String answer)
1366        throws com.liferay.portal.PortalException,
1367            com.liferay.portal.SystemException {
1368        try {
1369            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
1370                    "updateReminderQuery", _updateReminderQueryParameterTypes37);
1371
1372            MethodHandler methodHandler = new MethodHandler(methodKey, userId,
1373                    question, answer);
1374
1375            try {
1376                TunnelUtil.invoke(httpPrincipal, methodHandler);
1377            }
1378            catch (Exception e) {
1379                if (e instanceof com.liferay.portal.PortalException) {
1380                    throw (com.liferay.portal.PortalException)e;
1381                }
1382
1383                if (e instanceof com.liferay.portal.SystemException) {
1384                    throw (com.liferay.portal.SystemException)e;
1385                }
1386
1387                throw new com.liferay.portal.SystemException(e);
1388            }
1389        }
1390        catch (com.liferay.portal.SystemException se) {
1391            _log.error(se, se);
1392
1393            throw se;
1394        }
1395    }
1396
1397    public static void updateScreenName(HttpPrincipal httpPrincipal,
1398        long userId, java.lang.String screenName)
1399        throws com.liferay.portal.PortalException,
1400            com.liferay.portal.SystemException {
1401        try {
1402            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
1403                    "updateScreenName", _updateScreenNameParameterTypes38);
1404
1405            MethodHandler methodHandler = new MethodHandler(methodKey, userId,
1406                    screenName);
1407
1408            try {
1409                TunnelUtil.invoke(httpPrincipal, methodHandler);
1410            }
1411            catch (Exception e) {
1412                if (e instanceof com.liferay.portal.PortalException) {
1413                    throw (com.liferay.portal.PortalException)e;
1414                }
1415
1416                if (e instanceof com.liferay.portal.SystemException) {
1417                    throw (com.liferay.portal.SystemException)e;
1418                }
1419
1420                throw new com.liferay.portal.SystemException(e);
1421            }
1422        }
1423        catch (com.liferay.portal.SystemException se) {
1424            _log.error(se, se);
1425
1426            throw se;
1427        }
1428    }
1429
1430    public static com.liferay.portal.model.User updateUser(
1431        HttpPrincipal httpPrincipal, long userId, java.lang.String oldPassword,
1432        java.lang.String newPassword1, java.lang.String newPassword2,
1433        boolean passwordReset, java.lang.String reminderQueryQuestion,
1434        java.lang.String reminderQueryAnswer, java.lang.String screenName,
1435        java.lang.String emailAddress, java.lang.String openId,
1436        java.lang.String languageId, java.lang.String timeZoneId,
1437        java.lang.String greeting, java.lang.String comments,
1438        java.lang.String firstName, java.lang.String middleName,
1439        java.lang.String lastName, int prefixId, int suffixId, boolean male,
1440        int birthdayMonth, int birthdayDay, int birthdayYear,
1441        java.lang.String smsSn, java.lang.String aimSn,
1442        java.lang.String facebookSn, java.lang.String icqSn,
1443        java.lang.String jabberSn, java.lang.String msnSn,
1444        java.lang.String mySpaceSn, java.lang.String skypeSn,
1445        java.lang.String twitterSn, java.lang.String ymSn,
1446        java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
1447        long[] roleIds,
1448        java.util.List<com.liferay.portal.model.UserGroupRole> userGroupRoles,
1449        long[] userGroupIds,
1450        com.liferay.portal.service.ServiceContext serviceContext)
1451        throws com.liferay.portal.PortalException,
1452            com.liferay.portal.SystemException {
1453        try {
1454            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
1455                    "updateUser", _updateUserParameterTypes39);
1456
1457            MethodHandler methodHandler = new MethodHandler(methodKey, userId,
1458                    oldPassword, newPassword1, newPassword2, passwordReset,
1459                    reminderQueryQuestion, reminderQueryAnswer, screenName,
1460                    emailAddress, openId, languageId, timeZoneId, greeting,
1461                    comments, firstName, middleName, lastName, prefixId,
1462                    suffixId, male, birthdayMonth, birthdayDay, birthdayYear,
1463                    smsSn, aimSn, facebookSn, icqSn, jabberSn, msnSn,
1464                    mySpaceSn, skypeSn, twitterSn, ymSn, jobTitle, groupIds,
1465                    organizationIds, roleIds, userGroupRoles, userGroupIds,
1466                    serviceContext);
1467
1468            Object returnObj = null;
1469
1470            try {
1471                returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1472            }
1473            catch (Exception e) {
1474                if (e instanceof com.liferay.portal.PortalException) {
1475                    throw (com.liferay.portal.PortalException)e;
1476                }
1477
1478                if (e instanceof com.liferay.portal.SystemException) {
1479                    throw (com.liferay.portal.SystemException)e;
1480                }
1481
1482                throw new com.liferay.portal.SystemException(e);
1483            }
1484
1485            return (com.liferay.portal.model.User)returnObj;
1486        }
1487        catch (com.liferay.portal.SystemException se) {
1488            _log.error(se, se);
1489
1490            throw se;
1491        }
1492    }
1493
1494    public static com.liferay.portal.model.User updateUser(
1495        HttpPrincipal httpPrincipal, long userId, java.lang.String oldPassword,
1496        java.lang.String newPassword1, java.lang.String newPassword2,
1497        boolean passwordReset, java.lang.String reminderQueryQuestion,
1498        java.lang.String reminderQueryAnswer, java.lang.String screenName,
1499        java.lang.String emailAddress, java.lang.String openId,
1500        java.lang.String languageId, java.lang.String timeZoneId,
1501        java.lang.String greeting, java.lang.String comments,
1502        java.lang.String firstName, java.lang.String middleName,
1503        java.lang.String lastName, int prefixId, int suffixId, boolean male,
1504        int birthdayMonth, int birthdayDay, int birthdayYear,
1505        java.lang.String smsSn, java.lang.String aimSn,
1506        java.lang.String facebookSn, java.lang.String icqSn,
1507        java.lang.String jabberSn, java.lang.String msnSn,
1508        java.lang.String mySpaceSn, java.lang.String skypeSn,
1509        java.lang.String twitterSn, java.lang.String ymSn,
1510        java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
1511        long[] roleIds,
1512        java.util.List<com.liferay.portal.model.UserGroupRole> userGroupRoles,
1513        long[] userGroupIds,
1514        java.util.List<com.liferay.portal.model.Address> addresses,
1515        java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
1516        java.util.List<com.liferay.portal.model.Phone> phones,
1517        java.util.List<com.liferay.portal.model.Website> websites,
1518        java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> announcementsDelivers,
1519        com.liferay.portal.service.ServiceContext serviceContext)
1520        throws com.liferay.portal.PortalException,
1521            com.liferay.portal.SystemException {
1522        try {
1523            MethodKey methodKey = new MethodKey(UserServiceUtil.class.getName(),
1524                    "updateUser", _updateUserParameterTypes40);
1525
1526            MethodHandler methodHandler = new MethodHandler(methodKey, userId,
1527                    oldPassword, newPassword1, newPassword2, passwordReset,
1528                    reminderQueryQuestion, reminderQueryAnswer, screenName,
1529                    emailAddress, openId, languageId, timeZoneId, greeting,
1530                    comments, firstName, middleName, lastName, prefixId,
1531                    suffixId, male, birthdayMonth, birthdayDay, birthdayYear,
1532                    smsSn, aimSn, facebookSn, icqSn, jabberSn, msnSn,
1533                    mySpaceSn, skypeSn, twitterSn, ymSn, jobTitle, groupIds,
1534                    organizationIds, roleIds, userGroupRoles, userGroupIds,
1535                    addresses, emailAddresses, phones, websites,
1536                    announcementsDelivers, serviceContext);
1537
1538            Object returnObj = null;
1539
1540            try {
1541                returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1542            }
1543            catch (Exception e) {
1544                if (e instanceof com.liferay.portal.PortalException) {
1545                    throw (com.liferay.portal.PortalException)e;
1546                }
1547
1548                if (e instanceof com.liferay.portal.SystemException) {
1549                    throw (com.liferay.portal.SystemException)e;
1550                }
1551
1552                throw new com.liferay.portal.SystemException(e);
1553            }
1554
1555            return (com.liferay.portal.model.User)returnObj;
1556        }
1557        catch (com.liferay.portal.SystemException se) {
1558            _log.error(se, se);
1559
1560            throw se;
1561        }
1562    }
1563
1564    private static Log _log = LogFactoryUtil.getLog(UserServiceHttp.class);
1565    private static final Class<?>[] _addGroupUsersParameterTypes0 = new Class[] {
1566            long.class, long[].class
1567        };
1568    private static final Class<?>[] _addOrganizationUsersParameterTypes1 = new Class[] {
1569            long.class, long[].class
1570        };
1571    private static final Class<?>[] _addPasswordPolicyUsersParameterTypes2 = new Class[] {
1572            long.class, long[].class
1573        };
1574    private static final Class<?>[] _addRoleUsersParameterTypes3 = new Class[] {
1575            long.class, long[].class
1576        };
1577    private static final Class<?>[] _addUserGroupUsersParameterTypes4 = new Class[] {
1578            long.class, long[].class
1579        };
1580    private static final Class<?>[] _addUserParameterTypes5 = new Class[] {
1581            long.class, boolean.class, java.lang.String.class,
1582            java.lang.String.class, boolean.class, java.lang.String.class,
1583            java.lang.String.class, java.lang.String.class,
1584            java.util.Locale.class, java.lang.String.class,
1585            java.lang.String.class, java.lang.String.class, int.class, int.class,
1586            boolean.class, int.class, int.class, int.class,
1587            java.lang.String.class, long[].class, long[].class, long[].class,
1588            long[].class, boolean.class,
1589            com.liferay.portal.service.ServiceContext.class
1590        };
1591    private static final Class<?>[] _addUserParameterTypes6 = new Class[] {
1592            long.class, boolean.class, java.lang.String.class,
1593            java.lang.String.class, boolean.class, java.lang.String.class,
1594            java.lang.String.class, java.lang.String.class,
1595            java.util.Locale.class, java.lang.String.class,
1596            java.lang.String.class, java.lang.String.class, int.class, int.class,
1597            boolean.class, int.class, int.class, int.class,
1598            java.lang.String.class, long[].class, long[].class, long[].class,
1599            long[].class, boolean.class, java.util.List.class,
1600            java.util.List.class, java.util.List.class, java.util.List.class,
1601            java.util.List.class,
1602            com.liferay.portal.service.ServiceContext.class
1603        };
1604    private static final Class<?>[] _deletePortraitParameterTypes7 = new Class[] {
1605            long.class
1606        };
1607    private static final Class<?>[] _deleteRoleUserParameterTypes8 = new Class[] {
1608            long.class, long.class
1609        };
1610    private static final Class<?>[] _deleteUserParameterTypes9 = new Class[] {
1611            long.class
1612        };
1613    private static final Class<?>[] _getDefaultUserIdParameterTypes10 = new Class[] {
1614            long.class
1615        };
1616    private static final Class<?>[] _getGroupUserIdsParameterTypes11 = new Class[] {
1617            long.class
1618        };
1619    private static final Class<?>[] _getOrganizationUserIdsParameterTypes12 = new Class[] {
1620            long.class
1621        };
1622    private static final Class<?>[] _getRoleUserIdsParameterTypes13 = new Class[] {
1623            long.class
1624        };
1625    private static final Class<?>[] _getUserByEmailAddressParameterTypes14 = new Class[] {
1626            long.class, java.lang.String.class
1627        };
1628    private static final Class<?>[] _getUserByIdParameterTypes15 = new Class[] {
1629            long.class
1630        };
1631    private static final Class<?>[] _getUserByScreenNameParameterTypes16 = new Class[] {
1632            long.class, java.lang.String.class
1633        };
1634    private static final Class<?>[] _getUserIdByEmailAddressParameterTypes17 = new Class[] {
1635            long.class, java.lang.String.class
1636        };
1637    private static final Class<?>[] _getUserIdByScreenNameParameterTypes18 = new Class[] {
1638            long.class, java.lang.String.class
1639        };
1640    private static final Class<?>[] _hasGroupUserParameterTypes19 = new Class[] {
1641            long.class, long.class
1642        };
1643    private static final Class<?>[] _hasRoleUserParameterTypes20 = new Class[] {
1644            long.class, long.class
1645        };
1646    private static final Class<?>[] _hasRoleUserParameterTypes21 = new Class[] {
1647            long.class, java.lang.String.class, long.class, boolean.class
1648        };
1649    private static final Class<?>[] _setRoleUsersParameterTypes22 = new Class[] {
1650            long.class, long[].class
1651        };
1652    private static final Class<?>[] _setUserGroupUsersParameterTypes23 = new Class[] {
1653            long.class, long[].class
1654        };
1655    private static final Class<?>[] _unsetGroupUsersParameterTypes24 = new Class[] {
1656            long.class, long[].class
1657        };
1658    private static final Class<?>[] _unsetOrganizationUsersParameterTypes25 = new Class[] {
1659            long.class, long[].class
1660        };
1661    private static final Class<?>[] _unsetPasswordPolicyUsersParameterTypes26 = new Class[] {
1662            long.class, long[].class
1663        };
1664    private static final Class<?>[] _unsetRoleUsersParameterTypes27 = new Class[] {
1665            long.class, long[].class
1666        };
1667    private static final Class<?>[] _unsetUserGroupUsersParameterTypes28 = new Class[] {
1668            long.class, long[].class
1669        };
1670    private static final Class<?>[] _updateActiveParameterTypes29 = new Class[] {
1671            long.class, boolean.class
1672        };
1673    private static final Class<?>[] _updateAgreedToTermsOfUseParameterTypes30 = new Class[] {
1674            long.class, boolean.class
1675        };
1676    private static final Class<?>[] _updateEmailAddressParameterTypes31 = new Class[] {
1677            long.class, java.lang.String.class, java.lang.String.class,
1678            java.lang.String.class
1679        };
1680    private static final Class<?>[] _updateLockoutParameterTypes32 = new Class[] {
1681            long.class, boolean.class
1682        };
1683    private static final Class<?>[] _updateOpenIdParameterTypes33 = new Class[] {
1684            long.class, java.lang.String.class
1685        };
1686    private static final Class<?>[] _updateOrganizationsParameterTypes34 = new Class[] {
1687            long.class, long[].class
1688        };
1689    private static final Class<?>[] _updatePasswordParameterTypes35 = new Class[] {
1690            long.class, java.lang.String.class, java.lang.String.class,
1691            boolean.class
1692        };
1693    private static final Class<?>[] _updatePortraitParameterTypes36 = new Class[] {
1694            long.class, byte[].class
1695        };
1696    private static final Class<?>[] _updateReminderQueryParameterTypes37 = new Class[] {
1697            long.class, java.lang.String.class, java.lang.String.class
1698        };
1699    private static final Class<?>[] _updateScreenNameParameterTypes38 = new Class[] {
1700            long.class, java.lang.String.class
1701        };
1702    private static final Class<?>[] _updateUserParameterTypes39 = new Class[] {
1703            long.class, java.lang.String.class, java.lang.String.class,
1704            java.lang.String.class, boolean.class, java.lang.String.class,
1705            java.lang.String.class, java.lang.String.class,
1706            java.lang.String.class, java.lang.String.class,
1707            java.lang.String.class, java.lang.String.class,
1708            java.lang.String.class, java.lang.String.class,
1709            java.lang.String.class, java.lang.String.class,
1710            java.lang.String.class, int.class, int.class, boolean.class,
1711            int.class, int.class, int.class, java.lang.String.class,
1712            java.lang.String.class, java.lang.String.class,
1713            java.lang.String.class, java.lang.String.class,
1714            java.lang.String.class, java.lang.String.class,
1715            java.lang.String.class, java.lang.String.class,
1716            java.lang.String.class, java.lang.String.class, long[].class,
1717            long[].class, long[].class, java.util.List.class, long[].class,
1718            com.liferay.portal.service.ServiceContext.class
1719        };
1720    private static final Class<?>[] _updateUserParameterTypes40 = new Class[] {
1721            long.class, java.lang.String.class, java.lang.String.class,
1722            java.lang.String.class, boolean.class, java.lang.String.class,
1723            java.lang.String.class, java.lang.String.class,
1724            java.lang.String.class, java.lang.String.class,
1725            java.lang.String.class, java.lang.String.class,
1726            java.lang.String.class, java.lang.String.class,
1727            java.lang.String.class, java.lang.String.class,
1728            java.lang.String.class, int.class, int.class, boolean.class,
1729            int.class, int.class, int.class, java.lang.String.class,
1730            java.lang.String.class, java.lang.String.class,
1731            java.lang.String.class, java.lang.String.class,
1732            java.lang.String.class, java.lang.String.class,
1733            java.lang.String.class, java.lang.String.class,
1734            java.lang.String.class, java.lang.String.class, long[].class,
1735            long[].class, long[].class, java.util.List.class, long[].class,
1736            java.util.List.class, java.util.List.class, java.util.List.class,
1737            java.util.List.class, java.util.List.class,
1738            com.liferay.portal.service.ServiceContext.class
1739        };
1740}