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