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