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