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 void setRoleUsers(long roleId, long[] userIds)
348 throws RemoteException {
349 try {
350 UserServiceUtil.setRoleUsers(roleId, userIds);
351 }
352 catch (Exception e) {
353 _log.error(e, e);
354
355 throw new RemoteException(e.getMessage());
356 }
357 }
358
359 public static void setUserGroupUsers(long userGroupId, long[] userIds)
360 throws RemoteException {
361 try {
362 UserServiceUtil.setUserGroupUsers(userGroupId, userIds);
363 }
364 catch (Exception e) {
365 _log.error(e, e);
366
367 throw new RemoteException(e.getMessage());
368 }
369 }
370
371 public static void unsetGroupUsers(long groupId, long[] userIds)
372 throws RemoteException {
373 try {
374 UserServiceUtil.unsetGroupUsers(groupId, userIds);
375 }
376 catch (Exception e) {
377 _log.error(e, e);
378
379 throw new RemoteException(e.getMessage());
380 }
381 }
382
383 public static void unsetOrganizationUsers(long organizationId,
384 long[] userIds) throws RemoteException {
385 try {
386 UserServiceUtil.unsetOrganizationUsers(organizationId, userIds);
387 }
388 catch (Exception e) {
389 _log.error(e, e);
390
391 throw new RemoteException(e.getMessage());
392 }
393 }
394
395 public static void unsetPasswordPolicyUsers(long passwordPolicyId,
396 long[] userIds) throws RemoteException {
397 try {
398 UserServiceUtil.unsetPasswordPolicyUsers(passwordPolicyId, userIds);
399 }
400 catch (Exception e) {
401 _log.error(e, e);
402
403 throw new RemoteException(e.getMessage());
404 }
405 }
406
407 public static void unsetRoleUsers(long roleId, long[] userIds)
408 throws RemoteException {
409 try {
410 UserServiceUtil.unsetRoleUsers(roleId, userIds);
411 }
412 catch (Exception e) {
413 _log.error(e, e);
414
415 throw new RemoteException(e.getMessage());
416 }
417 }
418
419 public static void unsetUserGroupUsers(long userGroupId, long[] userIds)
420 throws RemoteException {
421 try {
422 UserServiceUtil.unsetUserGroupUsers(userGroupId, userIds);
423 }
424 catch (Exception e) {
425 _log.error(e, e);
426
427 throw new RemoteException(e.getMessage());
428 }
429 }
430
431 public static com.liferay.portal.model.UserSoap updateActive(long userId,
432 boolean active) throws RemoteException {
433 try {
434 com.liferay.portal.model.User returnValue = UserServiceUtil.updateActive(userId,
435 active);
436
437 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
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 updateAgreedToTermsOfUse(
447 long userId, boolean agreedToTermsOfUse) throws RemoteException {
448 try {
449 com.liferay.portal.model.User returnValue = UserServiceUtil.updateAgreedToTermsOfUse(userId,
450 agreedToTermsOfUse);
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 updateLockout(long userId,
462 boolean lockout) throws RemoteException {
463 try {
464 com.liferay.portal.model.User returnValue = UserServiceUtil.updateLockout(userId,
465 lockout);
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 void updateOpenId(long userId, java.lang.String openId)
477 throws RemoteException {
478 try {
479 UserServiceUtil.updateOpenId(userId, openId);
480 }
481 catch (Exception e) {
482 _log.error(e, e);
483
484 throw new RemoteException(e.getMessage());
485 }
486 }
487
488 public static void updateOrganizations(long userId, long[] organizationIds)
489 throws RemoteException {
490 try {
491 UserServiceUtil.updateOrganizations(userId, organizationIds);
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 updatePassword(
501 long userId, java.lang.String password1, java.lang.String password2,
502 boolean passwordReset) throws RemoteException {
503 try {
504 com.liferay.portal.model.User returnValue = UserServiceUtil.updatePassword(userId,
505 password1, password2, passwordReset);
506
507 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
508 }
509 catch (Exception e) {
510 _log.error(e, e);
511
512 throw new RemoteException(e.getMessage());
513 }
514 }
515
516 public static void updatePortrait(long userId, byte[] bytes)
517 throws RemoteException {
518 try {
519 UserServiceUtil.updatePortrait(userId, bytes);
520 }
521 catch (Exception e) {
522 _log.error(e, e);
523
524 throw new RemoteException(e.getMessage());
525 }
526 }
527
528 public static void updateScreenName(long userId, java.lang.String screenName)
529 throws RemoteException {
530 try {
531 UserServiceUtil.updateScreenName(userId, screenName);
532 }
533 catch (Exception e) {
534 _log.error(e, e);
535
536 throw new RemoteException(e.getMessage());
537 }
538 }
539
540 public static com.liferay.portal.model.UserSoap updateUser(long userId,
541 java.lang.String oldPassword, boolean passwordReset,
542 java.lang.String screenName, java.lang.String emailAddress,
543 java.lang.String languageId, java.lang.String timeZoneId,
544 java.lang.String greeting, java.lang.String comments,
545 java.lang.String firstName, java.lang.String middleName,
546 java.lang.String lastName, int prefixId, int suffixId, boolean male,
547 int birthdayMonth, int birthdayDay, int birthdayYear,
548 java.lang.String smsSn, java.lang.String aimSn,
549 java.lang.String facebookSn, java.lang.String icqSn,
550 java.lang.String jabberSn, java.lang.String msnSn,
551 java.lang.String mySpaceSn, java.lang.String skypeSn,
552 java.lang.String twitterSn, java.lang.String ymSn,
553 java.lang.String jobTitle, long[] organizationIds)
554 throws RemoteException {
555 try {
556 com.liferay.portal.model.User returnValue = UserServiceUtil.updateUser(userId,
557 oldPassword, passwordReset, screenName, emailAddress,
558 languageId, timeZoneId, greeting, comments, firstName,
559 middleName, lastName, prefixId, suffixId, male,
560 birthdayMonth, birthdayDay, birthdayYear, smsSn, aimSn,
561 facebookSn, icqSn, jabberSn, msnSn, mySpaceSn, skypeSn,
562 twitterSn, ymSn, jobTitle, organizationIds);
563
564 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
565 }
566 catch (Exception e) {
567 _log.error(e, e);
568
569 throw new RemoteException(e.getMessage());
570 }
571 }
572
573 public static com.liferay.portal.model.UserSoap updateUser(long userId,
574 java.lang.String oldPassword, java.lang.String newPassword1,
575 java.lang.String newPassword2, boolean passwordReset,
576 java.lang.String screenName, java.lang.String emailAddress,
577 java.lang.String languageId, java.lang.String timeZoneId,
578 java.lang.String greeting, java.lang.String comments,
579 java.lang.String firstName, java.lang.String middleName,
580 java.lang.String lastName, int prefixId, int suffixId, boolean male,
581 int birthdayMonth, int birthdayDay, int birthdayYear,
582 java.lang.String smsSn, java.lang.String aimSn,
583 java.lang.String facebookSn, java.lang.String icqSn,
584 java.lang.String jabberSn, java.lang.String msnSn,
585 java.lang.String mySpaceSn, java.lang.String skypeSn,
586 java.lang.String twitterSn, java.lang.String ymSn,
587 java.lang.String jobTitle, long[] organizationIds)
588 throws RemoteException {
589 try {
590 com.liferay.portal.model.User returnValue = UserServiceUtil.updateUser(userId,
591 oldPassword, newPassword1, newPassword2, passwordReset,
592 screenName, emailAddress, languageId, timeZoneId, greeting,
593 comments, firstName, middleName, lastName, prefixId,
594 suffixId, male, birthdayMonth, birthdayDay, birthdayYear,
595 smsSn, aimSn, facebookSn, icqSn, jabberSn, msnSn,
596 mySpaceSn, skypeSn, twitterSn, ymSn, jobTitle,
597 organizationIds);
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 private static Log _log = LogFactoryUtil.getLog(UserServiceSoap.class);
609 }