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 void setRoleUsers(long roleId, long[] userIds)
411 throws RemoteException {
412 try {
413 UserServiceUtil.setRoleUsers(roleId, userIds);
414 }
415 catch (Exception e) {
416 _log.error(e, e);
417
418 throw new RemoteException(e.getMessage());
419 }
420 }
421
422 public static void setUserGroupUsers(long userGroupId, long[] userIds)
423 throws RemoteException {
424 try {
425 UserServiceUtil.setUserGroupUsers(userGroupId, 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 unsetGroupUsers(long groupId, long[] userIds)
435 throws RemoteException {
436 try {
437 UserServiceUtil.unsetGroupUsers(groupId, 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 unsetOrganizationUsers(long organizationId,
447 long[] userIds) throws RemoteException {
448 try {
449 UserServiceUtil.unsetOrganizationUsers(organizationId, 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 unsetPasswordPolicyUsers(long passwordPolicyId,
459 long[] userIds) throws RemoteException {
460 try {
461 UserServiceUtil.unsetPasswordPolicyUsers(passwordPolicyId, 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 unsetRoleUsers(long roleId, long[] userIds)
471 throws RemoteException {
472 try {
473 UserServiceUtil.unsetRoleUsers(roleId, 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 unsetUserGroupUsers(long userGroupId, long[] userIds)
483 throws RemoteException {
484 try {
485 UserServiceUtil.unsetUserGroupUsers(userGroupId, userIds);
486 }
487 catch (Exception e) {
488 _log.error(e, e);
489
490 throw new RemoteException(e.getMessage());
491 }
492 }
493
494 public static com.liferay.portal.model.UserSoap updateActive(long userId,
495 boolean active) throws RemoteException {
496 try {
497 com.liferay.portal.model.User returnValue = UserServiceUtil.updateActive(userId,
498 active);
499
500 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
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 updateAgreedToTermsOfUse(
510 long userId, boolean agreedToTermsOfUse) throws RemoteException {
511 try {
512 com.liferay.portal.model.User returnValue = UserServiceUtil.updateAgreedToTermsOfUse(userId,
513 agreedToTermsOfUse);
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 void updateEmailAddress(long userId,
525 java.lang.String password, java.lang.String emailAddress1,
526 java.lang.String emailAddress2) throws RemoteException {
527 try {
528 UserServiceUtil.updateEmailAddress(userId, password, emailAddress1,
529 emailAddress2);
530 }
531 catch (Exception e) {
532 _log.error(e, e);
533
534 throw new RemoteException(e.getMessage());
535 }
536 }
537
538 public static com.liferay.portal.model.UserSoap updateLockout(long userId,
539 boolean lockout) throws RemoteException {
540 try {
541 com.liferay.portal.model.User returnValue = UserServiceUtil.updateLockout(userId,
542 lockout);
543
544 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
545 }
546 catch (Exception e) {
547 _log.error(e, e);
548
549 throw new RemoteException(e.getMessage());
550 }
551 }
552
553 public static void updateOpenId(long userId, java.lang.String openId)
554 throws RemoteException {
555 try {
556 UserServiceUtil.updateOpenId(userId, openId);
557 }
558 catch (Exception e) {
559 _log.error(e, e);
560
561 throw new RemoteException(e.getMessage());
562 }
563 }
564
565 public static void updateOrganizations(long userId, long[] organizationIds)
566 throws RemoteException {
567 try {
568 UserServiceUtil.updateOrganizations(userId, organizationIds);
569 }
570 catch (Exception e) {
571 _log.error(e, e);
572
573 throw new RemoteException(e.getMessage());
574 }
575 }
576
577 public static com.liferay.portal.model.UserSoap updatePassword(
578 long userId, java.lang.String password1, java.lang.String password2,
579 boolean passwordReset) throws RemoteException {
580 try {
581 com.liferay.portal.model.User returnValue = UserServiceUtil.updatePassword(userId,
582 password1, password2, passwordReset);
583
584 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
585 }
586 catch (Exception e) {
587 _log.error(e, e);
588
589 throw new RemoteException(e.getMessage());
590 }
591 }
592
593 public static void updatePortrait(long userId, byte[] bytes)
594 throws RemoteException {
595 try {
596 UserServiceUtil.updatePortrait(userId, bytes);
597 }
598 catch (Exception e) {
599 _log.error(e, e);
600
601 throw new RemoteException(e.getMessage());
602 }
603 }
604
605 public static void updateReminderQuery(long userId,
606 java.lang.String question, java.lang.String answer)
607 throws RemoteException {
608 try {
609 UserServiceUtil.updateReminderQuery(userId, question, answer);
610 }
611 catch (Exception e) {
612 _log.error(e, e);
613
614 throw new RemoteException(e.getMessage());
615 }
616 }
617
618 public static void updateScreenName(long userId, java.lang.String screenName)
619 throws RemoteException {
620 try {
621 UserServiceUtil.updateScreenName(userId, screenName);
622 }
623 catch (Exception e) {
624 _log.error(e, e);
625
626 throw new RemoteException(e.getMessage());
627 }
628 }
629
630 public static com.liferay.portal.model.UserSoap updateUser(long userId,
631 java.lang.String oldPassword, java.lang.String newPassword1,
632 java.lang.String newPassword2, boolean passwordReset,
633 java.lang.String reminderQueryQuestion,
634 java.lang.String reminderQueryAnswer, java.lang.String screenName,
635 java.lang.String emailAddress, java.lang.String openId,
636 java.lang.String languageId, java.lang.String timeZoneId,
637 java.lang.String greeting, java.lang.String comments,
638 java.lang.String firstName, java.lang.String middleName,
639 java.lang.String lastName, int prefixId, int suffixId, boolean male,
640 int birthdayMonth, int birthdayDay, int birthdayYear,
641 java.lang.String smsSn, java.lang.String aimSn,
642 java.lang.String facebookSn, java.lang.String icqSn,
643 java.lang.String jabberSn, java.lang.String msnSn,
644 java.lang.String mySpaceSn, java.lang.String skypeSn,
645 java.lang.String twitterSn, java.lang.String ymSn,
646 java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
647 long[] roleIds,
648 com.liferay.portal.model.UserGroupRoleSoap[] userGroupRoles,
649 long[] userGroupIds,
650 com.liferay.portal.service.ServiceContext serviceContext)
651 throws RemoteException {
652 try {
653 com.liferay.portal.model.User returnValue = UserServiceUtil.updateUser(userId,
654 oldPassword, newPassword1, newPassword2, passwordReset,
655 reminderQueryQuestion, reminderQueryAnswer, screenName,
656 emailAddress, openId, languageId, timeZoneId, greeting,
657 comments, firstName, middleName, lastName, prefixId,
658 suffixId, male, birthdayMonth, birthdayDay, birthdayYear,
659 smsSn, aimSn, facebookSn, icqSn, jabberSn, msnSn,
660 mySpaceSn, skypeSn, twitterSn, ymSn, jobTitle, groupIds,
661 organizationIds, roleIds,
662 com.liferay.portal.model.impl.UserGroupRoleModelImpl.toModels(
663 userGroupRoles), userGroupIds, serviceContext);
664
665 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
666 }
667 catch (Exception e) {
668 _log.error(e, e);
669
670 throw new RemoteException(e.getMessage());
671 }
672 }
673
674 public static com.liferay.portal.model.UserSoap updateUser(long userId,
675 java.lang.String oldPassword, java.lang.String newPassword1,
676 java.lang.String newPassword2, boolean passwordReset,
677 java.lang.String reminderQueryQuestion,
678 java.lang.String reminderQueryAnswer, java.lang.String screenName,
679 java.lang.String emailAddress, java.lang.String openId,
680 java.lang.String languageId, java.lang.String timeZoneId,
681 java.lang.String greeting, java.lang.String comments,
682 java.lang.String firstName, java.lang.String middleName,
683 java.lang.String lastName, int prefixId, int suffixId, boolean male,
684 int birthdayMonth, int birthdayDay, int birthdayYear,
685 java.lang.String smsSn, java.lang.String aimSn,
686 java.lang.String facebookSn, java.lang.String icqSn,
687 java.lang.String jabberSn, java.lang.String msnSn,
688 java.lang.String mySpaceSn, java.lang.String skypeSn,
689 java.lang.String twitterSn, java.lang.String ymSn,
690 java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
691 long[] roleIds,
692 com.liferay.portal.model.UserGroupRoleSoap[] userGroupRoles,
693 long[] userGroupIds, com.liferay.portal.model.AddressSoap[] addresses,
694 com.liferay.portal.model.EmailAddressSoap[] emailAddresses,
695 com.liferay.portal.model.PhoneSoap[] phones,
696 com.liferay.portal.model.WebsiteSoap[] websites,
697 com.liferay.portlet.announcements.model.AnnouncementsDeliverySoap[] announcementsDelivers,
698 com.liferay.portal.service.ServiceContext serviceContext)
699 throws RemoteException {
700 try {
701 com.liferay.portal.model.User returnValue = UserServiceUtil.updateUser(userId,
702 oldPassword, newPassword1, newPassword2, passwordReset,
703 reminderQueryQuestion, reminderQueryAnswer, screenName,
704 emailAddress, openId, languageId, timeZoneId, greeting,
705 comments, firstName, middleName, lastName, prefixId,
706 suffixId, male, birthdayMonth, birthdayDay, birthdayYear,
707 smsSn, aimSn, facebookSn, icqSn, jabberSn, msnSn,
708 mySpaceSn, skypeSn, twitterSn, ymSn, jobTitle, groupIds,
709 organizationIds, roleIds,
710 com.liferay.portal.model.impl.UserGroupRoleModelImpl.toModels(
711 userGroupRoles), userGroupIds,
712 com.liferay.portal.model.impl.AddressModelImpl.toModels(
713 addresses),
714 com.liferay.portal.model.impl.EmailAddressModelImpl.toModels(
715 emailAddresses),
716 com.liferay.portal.model.impl.PhoneModelImpl.toModels(
717 phones),
718 com.liferay.portal.model.impl.WebsiteModelImpl.toModels(
719 websites),
720 com.liferay.portlet.announcements.model.impl.AnnouncementsDeliveryModelImpl.toModels(
721 announcementsDelivers), serviceContext);
722
723 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
724 }
725 catch (Exception e) {
726 _log.error(e, e);
727
728 throw new RemoteException(e.getMessage());
729 }
730 }
731
732 private static Log _log = LogFactoryUtil.getLog(UserServiceSoap.class);
733 }