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