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