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