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 String locale, java.lang.String firstName, java.lang.String middleName,
145 java.lang.String lastName, int prefixId, int suffixId, boolean male,
146 int birthdayMonth, int birthdayDay, int birthdayYear,
147 java.lang.String jobTitle, long[] organizationIds, boolean sendEmail)
148 throws RemoteException {
149 try {
150 com.liferay.portal.model.User returnValue = UserServiceUtil.addUser(companyId,
151 autoPassword, password1, password2, autoScreenName,
152 screenName, emailAddress, new java.util.Locale(locale),
153 firstName, middleName, lastName, prefixId, suffixId, male,
154 birthdayMonth, birthdayDay, birthdayYear, jobTitle,
155 organizationIds, sendEmail);
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 void deleteRoleUser(long roleId, long userId)
167 throws RemoteException {
168 try {
169 UserServiceUtil.deleteRoleUser(roleId, userId);
170 }
171 catch (Exception e) {
172 _log.error(e, e);
173
174 throw new RemoteException(e.getMessage());
175 }
176 }
177
178 public static void deleteUser(long userId) throws RemoteException {
179 try {
180 UserServiceUtil.deleteUser(userId);
181 }
182 catch (Exception e) {
183 _log.error(e, e);
184
185 throw new RemoteException(e.getMessage());
186 }
187 }
188
189 public static long getDefaultUserId(long companyId)
190 throws RemoteException {
191 try {
192 long returnValue = UserServiceUtil.getDefaultUserId(companyId);
193
194 return returnValue;
195 }
196 catch (Exception e) {
197 _log.error(e, e);
198
199 throw new RemoteException(e.getMessage());
200 }
201 }
202
203 public static long[] getGroupUserIds(long groupId)
204 throws RemoteException {
205 try {
206 long[] returnValue = UserServiceUtil.getGroupUserIds(groupId);
207
208 return returnValue;
209 }
210 catch (Exception e) {
211 _log.error(e, e);
212
213 throw new RemoteException(e.getMessage());
214 }
215 }
216
217 public static long[] getOrganizationUserIds(long organizationId)
218 throws RemoteException {
219 try {
220 long[] returnValue = UserServiceUtil.getOrganizationUserIds(organizationId);
221
222 return returnValue;
223 }
224 catch (Exception e) {
225 _log.error(e, e);
226
227 throw new RemoteException(e.getMessage());
228 }
229 }
230
231 public static long[] getRoleUserIds(long roleId) throws RemoteException {
232 try {
233 long[] returnValue = UserServiceUtil.getRoleUserIds(roleId);
234
235 return returnValue;
236 }
237 catch (Exception e) {
238 _log.error(e, e);
239
240 throw new RemoteException(e.getMessage());
241 }
242 }
243
244 public static com.liferay.portal.model.UserSoap getUserByEmailAddress(
245 long companyId, java.lang.String emailAddress)
246 throws RemoteException {
247 try {
248 com.liferay.portal.model.User returnValue = UserServiceUtil.getUserByEmailAddress(companyId,
249 emailAddress);
250
251 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
252 }
253 catch (Exception e) {
254 _log.error(e, e);
255
256 throw new RemoteException(e.getMessage());
257 }
258 }
259
260 public static com.liferay.portal.model.UserSoap getUserById(long userId)
261 throws RemoteException {
262 try {
263 com.liferay.portal.model.User returnValue = UserServiceUtil.getUserById(userId);
264
265 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
266 }
267 catch (Exception e) {
268 _log.error(e, e);
269
270 throw new RemoteException(e.getMessage());
271 }
272 }
273
274 public static com.liferay.portal.model.UserSoap getUserByScreenName(
275 long companyId, java.lang.String screenName) throws RemoteException {
276 try {
277 com.liferay.portal.model.User returnValue = UserServiceUtil.getUserByScreenName(companyId,
278 screenName);
279
280 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
281 }
282 catch (Exception e) {
283 _log.error(e, e);
284
285 throw new RemoteException(e.getMessage());
286 }
287 }
288
289 public static long getUserIdByEmailAddress(long companyId,
290 java.lang.String emailAddress) throws RemoteException {
291 try {
292 long returnValue = UserServiceUtil.getUserIdByEmailAddress(companyId,
293 emailAddress);
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 long getUserIdByScreenName(long companyId,
305 java.lang.String screenName) throws RemoteException {
306 try {
307 long returnValue = UserServiceUtil.getUserIdByScreenName(companyId,
308 screenName);
309
310 return returnValue;
311 }
312 catch (Exception e) {
313 _log.error(e, e);
314
315 throw new RemoteException(e.getMessage());
316 }
317 }
318
319 public static boolean hasGroupUser(long groupId, long userId)
320 throws RemoteException {
321 try {
322 boolean returnValue = UserServiceUtil.hasGroupUser(groupId, userId);
323
324 return returnValue;
325 }
326 catch (Exception e) {
327 _log.error(e, e);
328
329 throw new RemoteException(e.getMessage());
330 }
331 }
332
333 public static boolean hasRoleUser(long roleId, long userId)
334 throws RemoteException {
335 try {
336 boolean returnValue = UserServiceUtil.hasRoleUser(roleId, userId);
337
338 return returnValue;
339 }
340 catch (Exception e) {
341 _log.error(e, e);
342
343 throw new RemoteException(e.getMessage());
344 }
345 }
346
347 public static boolean hasRoleUser(long companyId, java.lang.String name,
348 long userId, boolean inherited) throws RemoteException {
349 try {
350 boolean returnValue = UserServiceUtil.hasRoleUser(companyId, name,
351 userId, inherited);
352
353 return returnValue;
354 }
355 catch (Exception e) {
356 _log.error(e, e);
357
358 throw new RemoteException(e.getMessage());
359 }
360 }
361
362 public static void setRoleUsers(long roleId, long[] userIds)
363 throws RemoteException {
364 try {
365 UserServiceUtil.setRoleUsers(roleId, userIds);
366 }
367 catch (Exception e) {
368 _log.error(e, e);
369
370 throw new RemoteException(e.getMessage());
371 }
372 }
373
374 public static void setUserGroupUsers(long userGroupId, long[] userIds)
375 throws RemoteException {
376 try {
377 UserServiceUtil.setUserGroupUsers(userGroupId, userIds);
378 }
379 catch (Exception e) {
380 _log.error(e, e);
381
382 throw new RemoteException(e.getMessage());
383 }
384 }
385
386 public static void unsetGroupUsers(long groupId, long[] userIds)
387 throws RemoteException {
388 try {
389 UserServiceUtil.unsetGroupUsers(groupId, userIds);
390 }
391 catch (Exception e) {
392 _log.error(e, e);
393
394 throw new RemoteException(e.getMessage());
395 }
396 }
397
398 public static void unsetOrganizationUsers(long organizationId,
399 long[] userIds) throws RemoteException {
400 try {
401 UserServiceUtil.unsetOrganizationUsers(organizationId, userIds);
402 }
403 catch (Exception e) {
404 _log.error(e, e);
405
406 throw new RemoteException(e.getMessage());
407 }
408 }
409
410 public static void unsetPasswordPolicyUsers(long passwordPolicyId,
411 long[] userIds) throws RemoteException {
412 try {
413 UserServiceUtil.unsetPasswordPolicyUsers(passwordPolicyId, 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 unsetRoleUsers(long roleId, long[] userIds)
423 throws RemoteException {
424 try {
425 UserServiceUtil.unsetRoleUsers(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 unsetUserGroupUsers(long userGroupId, long[] userIds)
435 throws RemoteException {
436 try {
437 UserServiceUtil.unsetUserGroupUsers(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 com.liferay.portal.model.UserSoap updateActive(long userId,
447 boolean active) throws RemoteException {
448 try {
449 com.liferay.portal.model.User returnValue = UserServiceUtil.updateActive(userId,
450 active);
451
452 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
453 }
454 catch (Exception e) {
455 _log.error(e, e);
456
457 throw new RemoteException(e.getMessage());
458 }
459 }
460
461 public static com.liferay.portal.model.UserSoap updateAgreedToTermsOfUse(
462 long userId, boolean agreedToTermsOfUse) throws RemoteException {
463 try {
464 com.liferay.portal.model.User returnValue = UserServiceUtil.updateAgreedToTermsOfUse(userId,
465 agreedToTermsOfUse);
466
467 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
468 }
469 catch (Exception e) {
470 _log.error(e, e);
471
472 throw new RemoteException(e.getMessage());
473 }
474 }
475
476 public static com.liferay.portal.model.UserSoap updateLockout(long userId,
477 boolean lockout) throws RemoteException {
478 try {
479 com.liferay.portal.model.User returnValue = UserServiceUtil.updateLockout(userId,
480 lockout);
481
482 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
483 }
484 catch (Exception e) {
485 _log.error(e, e);
486
487 throw new RemoteException(e.getMessage());
488 }
489 }
490
491 public static void updateOpenId(long userId, java.lang.String openId)
492 throws RemoteException {
493 try {
494 UserServiceUtil.updateOpenId(userId, openId);
495 }
496 catch (Exception e) {
497 _log.error(e, e);
498
499 throw new RemoteException(e.getMessage());
500 }
501 }
502
503 public static void updateOrganizations(long userId, long[] organizationIds)
504 throws RemoteException {
505 try {
506 UserServiceUtil.updateOrganizations(userId, organizationIds);
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 updatePassword(
516 long userId, java.lang.String password1, java.lang.String password2,
517 boolean passwordReset) throws RemoteException {
518 try {
519 com.liferay.portal.model.User returnValue = UserServiceUtil.updatePassword(userId,
520 password1, password2, passwordReset);
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 updatePortrait(long userId, byte[] bytes)
532 throws RemoteException {
533 try {
534 UserServiceUtil.updatePortrait(userId, bytes);
535 }
536 catch (Exception e) {
537 _log.error(e, e);
538
539 throw new RemoteException(e.getMessage());
540 }
541 }
542
543 public static void updateScreenName(long userId, java.lang.String screenName)
544 throws RemoteException {
545 try {
546 UserServiceUtil.updateScreenName(userId, screenName);
547 }
548 catch (Exception e) {
549 _log.error(e, e);
550
551 throw new RemoteException(e.getMessage());
552 }
553 }
554
555 public static com.liferay.portal.model.UserSoap updateUser(long userId,
556 java.lang.String oldPassword, boolean passwordReset,
557 java.lang.String screenName, java.lang.String emailAddress,
558 java.lang.String languageId, java.lang.String timeZoneId,
559 java.lang.String greeting, java.lang.String comments,
560 java.lang.String firstName, java.lang.String middleName,
561 java.lang.String lastName, int prefixId, int suffixId, boolean male,
562 int birthdayMonth, int birthdayDay, int birthdayYear,
563 java.lang.String smsSn, java.lang.String aimSn,
564 java.lang.String facebookSn, java.lang.String icqSn,
565 java.lang.String jabberSn, java.lang.String msnSn,
566 java.lang.String mySpaceSn, java.lang.String skypeSn,
567 java.lang.String twitterSn, java.lang.String ymSn,
568 java.lang.String jobTitle, long[] organizationIds)
569 throws RemoteException {
570 try {
571 com.liferay.portal.model.User returnValue = UserServiceUtil.updateUser(userId,
572 oldPassword, passwordReset, screenName, emailAddress,
573 languageId, timeZoneId, greeting, comments, firstName,
574 middleName, lastName, prefixId, suffixId, male,
575 birthdayMonth, birthdayDay, birthdayYear, smsSn, aimSn,
576 facebookSn, icqSn, jabberSn, msnSn, mySpaceSn, skypeSn,
577 twitterSn, ymSn, jobTitle, organizationIds);
578
579 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
580 }
581 catch (Exception e) {
582 _log.error(e, e);
583
584 throw new RemoteException(e.getMessage());
585 }
586 }
587
588 public static com.liferay.portal.model.UserSoap updateUser(long userId,
589 java.lang.String oldPassword, java.lang.String newPassword1,
590 java.lang.String newPassword2, boolean passwordReset,
591 java.lang.String screenName, java.lang.String emailAddress,
592 java.lang.String languageId, java.lang.String timeZoneId,
593 java.lang.String greeting, java.lang.String comments,
594 java.lang.String firstName, java.lang.String middleName,
595 java.lang.String lastName, int prefixId, int suffixId, boolean male,
596 int birthdayMonth, int birthdayDay, int birthdayYear,
597 java.lang.String smsSn, java.lang.String aimSn,
598 java.lang.String facebookSn, java.lang.String icqSn,
599 java.lang.String jabberSn, java.lang.String msnSn,
600 java.lang.String mySpaceSn, java.lang.String skypeSn,
601 java.lang.String twitterSn, java.lang.String ymSn,
602 java.lang.String jobTitle, long[] organizationIds)
603 throws RemoteException {
604 try {
605 com.liferay.portal.model.User returnValue = UserServiceUtil.updateUser(userId,
606 oldPassword, newPassword1, newPassword2, passwordReset,
607 screenName, emailAddress, languageId, timeZoneId, greeting,
608 comments, firstName, middleName, lastName, prefixId,
609 suffixId, male, birthdayMonth, birthdayDay, birthdayYear,
610 smsSn, aimSn, facebookSn, icqSn, jabberSn, msnSn,
611 mySpaceSn, skypeSn, twitterSn, ymSn, jobTitle,
612 organizationIds);
613
614 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
615 }
616 catch (Exception e) {
617 _log.error(e, e);
618
619 throw new RemoteException(e.getMessage());
620 }
621 }
622
623 private static Log _log = LogFactoryUtil.getLog(UserServiceSoap.class);
624 }