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