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