1
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.service.UserServiceUtil;
28
29 import java.rmi.RemoteException;
30
31
81 public class UserServiceSoap {
82 public static void addGroupUsers(long groupId, long[] userIds)
83 throws RemoteException {
84 try {
85 UserServiceUtil.addGroupUsers(groupId, userIds);
86 }
87 catch (Exception e) {
88 _log.error(e, e);
89
90 throw new RemoteException(e.getMessage());
91 }
92 }
93
94 public static void addOrganizationUsers(long organizationId, long[] userIds)
95 throws RemoteException {
96 try {
97 UserServiceUtil.addOrganizationUsers(organizationId, userIds);
98 }
99 catch (Exception e) {
100 _log.error(e, e);
101
102 throw new RemoteException(e.getMessage());
103 }
104 }
105
106 public static void addPasswordPolicyUsers(long passwordPolicyId,
107 long[] userIds) throws RemoteException {
108 try {
109 UserServiceUtil.addPasswordPolicyUsers(passwordPolicyId, userIds);
110 }
111 catch (Exception e) {
112 _log.error(e, e);
113
114 throw new RemoteException(e.getMessage());
115 }
116 }
117
118 public static void addRoleUsers(long roleId, long[] userIds)
119 throws RemoteException {
120 try {
121 UserServiceUtil.addRoleUsers(roleId, userIds);
122 }
123 catch (Exception e) {
124 _log.error(e, e);
125
126 throw new RemoteException(e.getMessage());
127 }
128 }
129
130 public static void addUserGroupUsers(long userGroupId, long[] userIds)
131 throws RemoteException {
132 try {
133 UserServiceUtil.addUserGroupUsers(userGroupId, userIds);
134 }
135 catch (Exception e) {
136 _log.error(e, e);
137
138 throw new RemoteException(e.getMessage());
139 }
140 }
141
142 public static com.liferay.portal.model.UserSoap addUser(long companyId,
143 boolean autoPassword, java.lang.String password1,
144 java.lang.String password2, boolean autoScreenName,
145 java.lang.String screenName, java.lang.String emailAddress,
146 java.lang.String openId, String locale, java.lang.String firstName,
147 java.lang.String middleName, java.lang.String lastName, int prefixId,
148 int suffixId, boolean male, int birthdayMonth, int birthdayDay,
149 int birthdayYear, java.lang.String jobTitle, long[] groupIds,
150 long[] organizationIds, long[] roleIds, long[] userGroupIds,
151 boolean sendEmail,
152 com.liferay.portal.service.ServiceContext serviceContext)
153 throws RemoteException {
154 try {
155 com.liferay.portal.model.User returnValue = UserServiceUtil.addUser(companyId,
156 autoPassword, password1, password2, autoScreenName,
157 screenName, emailAddress, openId,
158 new java.util.Locale(locale), firstName, middleName,
159 lastName, prefixId, suffixId, male, birthdayMonth,
160 birthdayDay, birthdayYear, jobTitle, groupIds,
161 organizationIds, roleIds, userGroupIds, sendEmail,
162 serviceContext);
163
164 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
165 }
166 catch (Exception e) {
167 _log.error(e, e);
168
169 throw new RemoteException(e.getMessage());
170 }
171 }
172
173 public static com.liferay.portal.model.UserSoap addUser(long companyId,
174 boolean autoPassword, java.lang.String password1,
175 java.lang.String password2, boolean autoScreenName,
176 java.lang.String screenName, java.lang.String emailAddress,
177 java.lang.String openId, String locale, java.lang.String firstName,
178 java.lang.String middleName, java.lang.String lastName, int prefixId,
179 int suffixId, boolean male, int birthdayMonth, int birthdayDay,
180 int birthdayYear, java.lang.String jobTitle, long[] groupIds,
181 long[] organizationIds, long[] roleIds, long[] userGroupIds,
182 boolean sendEmail, com.liferay.portal.model.AddressSoap[] addresses,
183 com.liferay.portal.model.EmailAddressSoap[] emailAddresses,
184 com.liferay.portal.model.PhoneSoap[] phones,
185 com.liferay.portal.model.WebsiteSoap[] websites,
186 com.liferay.portlet.announcements.model.AnnouncementsDeliverySoap[] announcementsDelivers,
187 com.liferay.portal.service.ServiceContext serviceContext)
188 throws RemoteException {
189 try {
190 com.liferay.portal.model.User returnValue = UserServiceUtil.addUser(companyId,
191 autoPassword, password1, password2, autoScreenName,
192 screenName, emailAddress, openId,
193 new java.util.Locale(locale), firstName, middleName,
194 lastName, prefixId, suffixId, male, birthdayMonth,
195 birthdayDay, birthdayYear, jobTitle, groupIds,
196 organizationIds, roleIds, userGroupIds, sendEmail,
197 com.liferay.portal.model.impl.AddressModelImpl.toModels(
198 addresses),
199 com.liferay.portal.model.impl.EmailAddressModelImpl.toModels(
200 emailAddresses),
201 com.liferay.portal.model.impl.PhoneModelImpl.toModels(
202 phones),
203 com.liferay.portal.model.impl.WebsiteModelImpl.toModels(
204 websites),
205 com.liferay.portlet.announcements.model.impl.AnnouncementsDeliveryModelImpl.toModels(
206 announcementsDelivers), serviceContext);
207
208 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
209 }
210 catch (Exception e) {
211 _log.error(e, e);
212
213 throw new RemoteException(e.getMessage());
214 }
215 }
216
217 public static void deletePortrait(long userId) throws RemoteException {
218 try {
219 UserServiceUtil.deletePortrait(userId);
220 }
221 catch (Exception e) {
222 _log.error(e, e);
223
224 throw new RemoteException(e.getMessage());
225 }
226 }
227
228 public static void deleteRoleUser(long roleId, long userId)
229 throws RemoteException {
230 try {
231 UserServiceUtil.deleteRoleUser(roleId, userId);
232 }
233 catch (Exception e) {
234 _log.error(e, e);
235
236 throw new RemoteException(e.getMessage());
237 }
238 }
239
240 public static void deleteUser(long userId) throws RemoteException {
241 try {
242 UserServiceUtil.deleteUser(userId);
243 }
244 catch (Exception e) {
245 _log.error(e, e);
246
247 throw new RemoteException(e.getMessage());
248 }
249 }
250
251 public static long getDefaultUserId(long companyId)
252 throws RemoteException {
253 try {
254 long returnValue = UserServiceUtil.getDefaultUserId(companyId);
255
256 return returnValue;
257 }
258 catch (Exception e) {
259 _log.error(e, e);
260
261 throw new RemoteException(e.getMessage());
262 }
263 }
264
265 public static long[] getGroupUserIds(long groupId)
266 throws RemoteException {
267 try {
268 long[] returnValue = UserServiceUtil.getGroupUserIds(groupId);
269
270 return returnValue;
271 }
272 catch (Exception e) {
273 _log.error(e, e);
274
275 throw new RemoteException(e.getMessage());
276 }
277 }
278
279 public static long[] getOrganizationUserIds(long organizationId)
280 throws RemoteException {
281 try {
282 long[] returnValue = UserServiceUtil.getOrganizationUserIds(organizationId);
283
284 return returnValue;
285 }
286 catch (Exception e) {
287 _log.error(e, e);
288
289 throw new RemoteException(e.getMessage());
290 }
291 }
292
293 public static long[] getRoleUserIds(long roleId) throws RemoteException {
294 try {
295 long[] returnValue = UserServiceUtil.getRoleUserIds(roleId);
296
297 return returnValue;
298 }
299 catch (Exception e) {
300 _log.error(e, e);
301
302 throw new RemoteException(e.getMessage());
303 }
304 }
305
306 public static com.liferay.portal.model.UserSoap getUserByEmailAddress(
307 long companyId, java.lang.String emailAddress)
308 throws RemoteException {
309 try {
310 com.liferay.portal.model.User returnValue = UserServiceUtil.getUserByEmailAddress(companyId,
311 emailAddress);
312
313 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
314 }
315 catch (Exception e) {
316 _log.error(e, e);
317
318 throw new RemoteException(e.getMessage());
319 }
320 }
321
322 public static com.liferay.portal.model.UserSoap getUserById(long userId)
323 throws RemoteException {
324 try {
325 com.liferay.portal.model.User returnValue = UserServiceUtil.getUserById(userId);
326
327 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
328 }
329 catch (Exception e) {
330 _log.error(e, e);
331
332 throw new RemoteException(e.getMessage());
333 }
334 }
335
336 public static com.liferay.portal.model.UserSoap getUserByScreenName(
337 long companyId, java.lang.String screenName) throws RemoteException {
338 try {
339 com.liferay.portal.model.User returnValue = UserServiceUtil.getUserByScreenName(companyId,
340 screenName);
341
342 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
343 }
344 catch (Exception e) {
345 _log.error(e, e);
346
347 throw new RemoteException(e.getMessage());
348 }
349 }
350
351 public static long getUserIdByEmailAddress(long companyId,
352 java.lang.String emailAddress) throws RemoteException {
353 try {
354 long returnValue = UserServiceUtil.getUserIdByEmailAddress(companyId,
355 emailAddress);
356
357 return returnValue;
358 }
359 catch (Exception e) {
360 _log.error(e, e);
361
362 throw new RemoteException(e.getMessage());
363 }
364 }
365
366 public static long getUserIdByScreenName(long companyId,
367 java.lang.String screenName) throws RemoteException {
368 try {
369 long returnValue = UserServiceUtil.getUserIdByScreenName(companyId,
370 screenName);
371
372 return returnValue;
373 }
374 catch (Exception e) {
375 _log.error(e, e);
376
377 throw new RemoteException(e.getMessage());
378 }
379 }
380
381 public static boolean hasGroupUser(long groupId, long userId)
382 throws RemoteException {
383 try {
384 boolean returnValue = UserServiceUtil.hasGroupUser(groupId, userId);
385
386 return returnValue;
387 }
388 catch (Exception e) {
389 _log.error(e, e);
390
391 throw new RemoteException(e.getMessage());
392 }
393 }
394
395 public static boolean hasRoleUser(long roleId, long userId)
396 throws RemoteException {
397 try {
398 boolean returnValue = UserServiceUtil.hasRoleUser(roleId, userId);
399
400 return returnValue;
401 }
402 catch (Exception e) {
403 _log.error(e, e);
404
405 throw new RemoteException(e.getMessage());
406 }
407 }
408
409 public static boolean hasRoleUser(long companyId, java.lang.String name,
410 long userId, boolean inherited) throws RemoteException {
411 try {
412 boolean returnValue = UserServiceUtil.hasRoleUser(companyId, name,
413 userId, inherited);
414
415 return returnValue;
416 }
417 catch (Exception e) {
418 _log.error(e, e);
419
420 throw new RemoteException(e.getMessage());
421 }
422 }
423
424 public static void setRoleUsers(long roleId, long[] userIds)
425 throws RemoteException {
426 try {
427 UserServiceUtil.setRoleUsers(roleId, userIds);
428 }
429 catch (Exception e) {
430 _log.error(e, e);
431
432 throw new RemoteException(e.getMessage());
433 }
434 }
435
436 public static void setUserGroupUsers(long userGroupId, long[] userIds)
437 throws RemoteException {
438 try {
439 UserServiceUtil.setUserGroupUsers(userGroupId, userIds);
440 }
441 catch (Exception e) {
442 _log.error(e, e);
443
444 throw new RemoteException(e.getMessage());
445 }
446 }
447
448 public static void unsetGroupUsers(long groupId, long[] userIds)
449 throws RemoteException {
450 try {
451 UserServiceUtil.unsetGroupUsers(groupId, userIds);
452 }
453 catch (Exception e) {
454 _log.error(e, e);
455
456 throw new RemoteException(e.getMessage());
457 }
458 }
459
460 public static void unsetOrganizationUsers(long organizationId,
461 long[] userIds) throws RemoteException {
462 try {
463 UserServiceUtil.unsetOrganizationUsers(organizationId, userIds);
464 }
465 catch (Exception e) {
466 _log.error(e, e);
467
468 throw new RemoteException(e.getMessage());
469 }
470 }
471
472 public static void unsetPasswordPolicyUsers(long passwordPolicyId,
473 long[] userIds) throws RemoteException {
474 try {
475 UserServiceUtil.unsetPasswordPolicyUsers(passwordPolicyId, userIds);
476 }
477 catch (Exception e) {
478 _log.error(e, e);
479
480 throw new RemoteException(e.getMessage());
481 }
482 }
483
484 public static void unsetRoleUsers(long roleId, long[] userIds)
485 throws RemoteException {
486 try {
487 UserServiceUtil.unsetRoleUsers(roleId, userIds);
488 }
489 catch (Exception e) {
490 _log.error(e, e);
491
492 throw new RemoteException(e.getMessage());
493 }
494 }
495
496 public static void unsetUserGroupUsers(long userGroupId, long[] userIds)
497 throws RemoteException {
498 try {
499 UserServiceUtil.unsetUserGroupUsers(userGroupId, userIds);
500 }
501 catch (Exception e) {
502 _log.error(e, e);
503
504 throw new RemoteException(e.getMessage());
505 }
506 }
507
508 public static com.liferay.portal.model.UserSoap updateActive(long userId,
509 boolean active) throws RemoteException {
510 try {
511 com.liferay.portal.model.User returnValue = UserServiceUtil.updateActive(userId,
512 active);
513
514 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
515 }
516 catch (Exception e) {
517 _log.error(e, e);
518
519 throw new RemoteException(e.getMessage());
520 }
521 }
522
523 public static com.liferay.portal.model.UserSoap updateAgreedToTermsOfUse(
524 long userId, boolean agreedToTermsOfUse) throws RemoteException {
525 try {
526 com.liferay.portal.model.User returnValue = UserServiceUtil.updateAgreedToTermsOfUse(userId,
527 agreedToTermsOfUse);
528
529 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
530 }
531 catch (Exception e) {
532 _log.error(e, e);
533
534 throw new RemoteException(e.getMessage());
535 }
536 }
537
538 public static void updateEmailAddress(long userId,
539 java.lang.String password, java.lang.String emailAddress1,
540 java.lang.String emailAddress2) throws RemoteException {
541 try {
542 UserServiceUtil.updateEmailAddress(userId, password, emailAddress1,
543 emailAddress2);
544 }
545 catch (Exception e) {
546 _log.error(e, e);
547
548 throw new RemoteException(e.getMessage());
549 }
550 }
551
552 public static com.liferay.portal.model.UserSoap updateLockout(long userId,
553 boolean lockout) throws RemoteException {
554 try {
555 com.liferay.portal.model.User returnValue = UserServiceUtil.updateLockout(userId,
556 lockout);
557
558 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
559 }
560 catch (Exception e) {
561 _log.error(e, e);
562
563 throw new RemoteException(e.getMessage());
564 }
565 }
566
567 public static void updateOpenId(long userId, java.lang.String openId)
568 throws RemoteException {
569 try {
570 UserServiceUtil.updateOpenId(userId, openId);
571 }
572 catch (Exception e) {
573 _log.error(e, e);
574
575 throw new RemoteException(e.getMessage());
576 }
577 }
578
579 public static void updateOrganizations(long userId, long[] organizationIds)
580 throws RemoteException {
581 try {
582 UserServiceUtil.updateOrganizations(userId, organizationIds);
583 }
584 catch (Exception e) {
585 _log.error(e, e);
586
587 throw new RemoteException(e.getMessage());
588 }
589 }
590
591 public static com.liferay.portal.model.UserSoap updatePassword(
592 long userId, java.lang.String password1, java.lang.String password2,
593 boolean passwordReset) throws RemoteException {
594 try {
595 com.liferay.portal.model.User returnValue = UserServiceUtil.updatePassword(userId,
596 password1, password2, passwordReset);
597
598 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
599 }
600 catch (Exception e) {
601 _log.error(e, e);
602
603 throw new RemoteException(e.getMessage());
604 }
605 }
606
607 public static void updatePortrait(long userId, byte[] bytes)
608 throws RemoteException {
609 try {
610 UserServiceUtil.updatePortrait(userId, bytes);
611 }
612 catch (Exception e) {
613 _log.error(e, e);
614
615 throw new RemoteException(e.getMessage());
616 }
617 }
618
619 public static void updateReminderQuery(long userId,
620 java.lang.String question, java.lang.String answer)
621 throws RemoteException {
622 try {
623 UserServiceUtil.updateReminderQuery(userId, question, answer);
624 }
625 catch (Exception e) {
626 _log.error(e, e);
627
628 throw new RemoteException(e.getMessage());
629 }
630 }
631
632 public static void updateScreenName(long userId, java.lang.String screenName)
633 throws RemoteException {
634 try {
635 UserServiceUtil.updateScreenName(userId, screenName);
636 }
637 catch (Exception e) {
638 _log.error(e, e);
639
640 throw new RemoteException(e.getMessage());
641 }
642 }
643
644 public static com.liferay.portal.model.UserSoap updateUser(long userId,
645 java.lang.String oldPassword, java.lang.String newPassword1,
646 java.lang.String newPassword2, boolean passwordReset,
647 java.lang.String reminderQueryQuestion,
648 java.lang.String reminderQueryAnswer, java.lang.String screenName,
649 java.lang.String emailAddress, java.lang.String openId,
650 java.lang.String languageId, java.lang.String timeZoneId,
651 java.lang.String greeting, java.lang.String comments,
652 java.lang.String firstName, java.lang.String middleName,
653 java.lang.String lastName, int prefixId, int suffixId, boolean male,
654 int birthdayMonth, int birthdayDay, int birthdayYear,
655 java.lang.String smsSn, java.lang.String aimSn,
656 java.lang.String facebookSn, java.lang.String icqSn,
657 java.lang.String jabberSn, java.lang.String msnSn,
658 java.lang.String mySpaceSn, java.lang.String skypeSn,
659 java.lang.String twitterSn, java.lang.String ymSn,
660 java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
661 long[] roleIds,
662 com.liferay.portal.model.UserGroupRoleSoap[] userGroupRoles,
663 long[] userGroupIds,
664 com.liferay.portal.service.ServiceContext serviceContext)
665 throws RemoteException {
666 try {
667 com.liferay.portal.model.User returnValue = UserServiceUtil.updateUser(userId,
668 oldPassword, newPassword1, newPassword2, passwordReset,
669 reminderQueryQuestion, reminderQueryAnswer, screenName,
670 emailAddress, openId, languageId, timeZoneId, greeting,
671 comments, firstName, middleName, lastName, prefixId,
672 suffixId, male, birthdayMonth, birthdayDay, birthdayYear,
673 smsSn, aimSn, facebookSn, icqSn, jabberSn, msnSn,
674 mySpaceSn, skypeSn, twitterSn, ymSn, jobTitle, groupIds,
675 organizationIds, roleIds,
676 com.liferay.portal.model.impl.UserGroupRoleModelImpl.toModels(
677 userGroupRoles), userGroupIds, serviceContext);
678
679 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
680 }
681 catch (Exception e) {
682 _log.error(e, e);
683
684 throw new RemoteException(e.getMessage());
685 }
686 }
687
688 public static com.liferay.portal.model.UserSoap updateUser(long userId,
689 java.lang.String oldPassword, java.lang.String newPassword1,
690 java.lang.String newPassword2, boolean passwordReset,
691 java.lang.String reminderQueryQuestion,
692 java.lang.String reminderQueryAnswer, java.lang.String screenName,
693 java.lang.String emailAddress, java.lang.String openId,
694 java.lang.String languageId, java.lang.String timeZoneId,
695 java.lang.String greeting, java.lang.String comments,
696 java.lang.String firstName, java.lang.String middleName,
697 java.lang.String lastName, int prefixId, int suffixId, boolean male,
698 int birthdayMonth, int birthdayDay, int birthdayYear,
699 java.lang.String smsSn, java.lang.String aimSn,
700 java.lang.String facebookSn, java.lang.String icqSn,
701 java.lang.String jabberSn, java.lang.String msnSn,
702 java.lang.String mySpaceSn, java.lang.String skypeSn,
703 java.lang.String twitterSn, java.lang.String ymSn,
704 java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
705 long[] roleIds,
706 com.liferay.portal.model.UserGroupRoleSoap[] userGroupRoles,
707 long[] userGroupIds, com.liferay.portal.model.AddressSoap[] addresses,
708 com.liferay.portal.model.EmailAddressSoap[] emailAddresses,
709 com.liferay.portal.model.PhoneSoap[] phones,
710 com.liferay.portal.model.WebsiteSoap[] websites,
711 com.liferay.portlet.announcements.model.AnnouncementsDeliverySoap[] announcementsDelivers,
712 com.liferay.portal.service.ServiceContext serviceContext)
713 throws RemoteException {
714 try {
715 com.liferay.portal.model.User returnValue = UserServiceUtil.updateUser(userId,
716 oldPassword, newPassword1, newPassword2, passwordReset,
717 reminderQueryQuestion, reminderQueryAnswer, screenName,
718 emailAddress, openId, languageId, timeZoneId, greeting,
719 comments, firstName, middleName, lastName, prefixId,
720 suffixId, male, birthdayMonth, birthdayDay, birthdayYear,
721 smsSn, aimSn, facebookSn, icqSn, jabberSn, msnSn,
722 mySpaceSn, skypeSn, twitterSn, ymSn, jobTitle, groupIds,
723 organizationIds, roleIds,
724 com.liferay.portal.model.impl.UserGroupRoleModelImpl.toModels(
725 userGroupRoles), userGroupIds,
726 com.liferay.portal.model.impl.AddressModelImpl.toModels(
727 addresses),
728 com.liferay.portal.model.impl.EmailAddressModelImpl.toModels(
729 emailAddresses),
730 com.liferay.portal.model.impl.PhoneModelImpl.toModels(
731 phones),
732 com.liferay.portal.model.impl.WebsiteModelImpl.toModels(
733 websites),
734 com.liferay.portlet.announcements.model.impl.AnnouncementsDeliveryModelImpl.toModels(
735 announcementsDelivers), serviceContext);
736
737 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
738 }
739 catch (Exception e) {
740 _log.error(e, e);
741
742 throw new RemoteException(e.getMessage());
743 }
744 }
745
746 private static Log _log = LogFactoryUtil.getLog(UserServiceSoap.class);
747 }