1
14
15 package com.liferay.portal.service.http;
16
17 import com.liferay.portal.kernel.log.Log;
18 import com.liferay.portal.kernel.log.LogFactoryUtil;
19 import com.liferay.portal.service.UserServiceUtil;
20
21 import java.rmi.RemoteException;
22
23
73 public class UserServiceSoap {
74 public static void addGroupUsers(long groupId, long[] userIds)
75 throws RemoteException {
76 try {
77 UserServiceUtil.addGroupUsers(groupId, userIds);
78 }
79 catch (Exception e) {
80 _log.error(e, e);
81
82 throw new RemoteException(e.getMessage());
83 }
84 }
85
86 public static void addOrganizationUsers(long organizationId, long[] userIds)
87 throws RemoteException {
88 try {
89 UserServiceUtil.addOrganizationUsers(organizationId, userIds);
90 }
91 catch (Exception e) {
92 _log.error(e, e);
93
94 throw new RemoteException(e.getMessage());
95 }
96 }
97
98 public static void addPasswordPolicyUsers(long passwordPolicyId,
99 long[] userIds) throws RemoteException {
100 try {
101 UserServiceUtil.addPasswordPolicyUsers(passwordPolicyId, userIds);
102 }
103 catch (Exception e) {
104 _log.error(e, e);
105
106 throw new RemoteException(e.getMessage());
107 }
108 }
109
110 public static void addRoleUsers(long roleId, long[] userIds)
111 throws RemoteException {
112 try {
113 UserServiceUtil.addRoleUsers(roleId, userIds);
114 }
115 catch (Exception e) {
116 _log.error(e, e);
117
118 throw new RemoteException(e.getMessage());
119 }
120 }
121
122 public static void addUserGroupUsers(long userGroupId, long[] userIds)
123 throws RemoteException {
124 try {
125 UserServiceUtil.addUserGroupUsers(userGroupId, userIds);
126 }
127 catch (Exception e) {
128 _log.error(e, e);
129
130 throw new RemoteException(e.getMessage());
131 }
132 }
133
134 public static com.liferay.portal.model.UserSoap addUser(long companyId,
135 boolean autoPassword, java.lang.String password1,
136 java.lang.String password2, boolean autoScreenName,
137 java.lang.String screenName, java.lang.String emailAddress,
138 String locale, java.lang.String firstName, java.lang.String middleName,
139 java.lang.String lastName, int prefixId, int suffixId, boolean male,
140 int birthdayMonth, int birthdayDay, int birthdayYear,
141 java.lang.String jobTitle, long[] organizationIds, boolean sendEmail)
142 throws RemoteException {
143 try {
144 com.liferay.portal.model.User returnValue = UserServiceUtil.addUser(companyId,
145 autoPassword, password1, password2, autoScreenName,
146 screenName, emailAddress, new java.util.Locale(locale),
147 firstName, middleName, lastName, prefixId, suffixId, male,
148 birthdayMonth, birthdayDay, birthdayYear, jobTitle,
149 organizationIds, sendEmail);
150
151 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
152 }
153 catch (Exception e) {
154 _log.error(e, e);
155
156 throw new RemoteException(e.getMessage());
157 }
158 }
159
160 public static void deleteRoleUser(long roleId, long userId)
161 throws RemoteException {
162 try {
163 UserServiceUtil.deleteRoleUser(roleId, userId);
164 }
165 catch (Exception e) {
166 _log.error(e, e);
167
168 throw new RemoteException(e.getMessage());
169 }
170 }
171
172 public static void deleteUser(long userId) throws RemoteException {
173 try {
174 UserServiceUtil.deleteUser(userId);
175 }
176 catch (Exception e) {
177 _log.error(e, e);
178
179 throw new RemoteException(e.getMessage());
180 }
181 }
182
183 public static long getDefaultUserId(long companyId)
184 throws RemoteException {
185 try {
186 long returnValue = UserServiceUtil.getDefaultUserId(companyId);
187
188 return returnValue;
189 }
190 catch (Exception e) {
191 _log.error(e, e);
192
193 throw new RemoteException(e.getMessage());
194 }
195 }
196
197 public static long[] getGroupUserIds(long groupId)
198 throws RemoteException {
199 try {
200 long[] returnValue = UserServiceUtil.getGroupUserIds(groupId);
201
202 return returnValue;
203 }
204 catch (Exception e) {
205 _log.error(e, e);
206
207 throw new RemoteException(e.getMessage());
208 }
209 }
210
211 public static long[] getOrganizationUserIds(long organizationId)
212 throws RemoteException {
213 try {
214 long[] returnValue = UserServiceUtil.getOrganizationUserIds(organizationId);
215
216 return returnValue;
217 }
218 catch (Exception e) {
219 _log.error(e, e);
220
221 throw new RemoteException(e.getMessage());
222 }
223 }
224
225 public static long[] getRoleUserIds(long roleId) throws RemoteException {
226 try {
227 long[] returnValue = UserServiceUtil.getRoleUserIds(roleId);
228
229 return returnValue;
230 }
231 catch (Exception e) {
232 _log.error(e, e);
233
234 throw new RemoteException(e.getMessage());
235 }
236 }
237
238 public static com.liferay.portal.model.UserSoap getUserByEmailAddress(
239 long companyId, java.lang.String emailAddress)
240 throws RemoteException {
241 try {
242 com.liferay.portal.model.User returnValue = UserServiceUtil.getUserByEmailAddress(companyId,
243 emailAddress);
244
245 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
246 }
247 catch (Exception e) {
248 _log.error(e, e);
249
250 throw new RemoteException(e.getMessage());
251 }
252 }
253
254 public static com.liferay.portal.model.UserSoap getUserById(long userId)
255 throws RemoteException {
256 try {
257 com.liferay.portal.model.User returnValue = UserServiceUtil.getUserById(userId);
258
259 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
260 }
261 catch (Exception e) {
262 _log.error(e, e);
263
264 throw new RemoteException(e.getMessage());
265 }
266 }
267
268 public static com.liferay.portal.model.UserSoap getUserByScreenName(
269 long companyId, java.lang.String screenName) throws RemoteException {
270 try {
271 com.liferay.portal.model.User returnValue = UserServiceUtil.getUserByScreenName(companyId,
272 screenName);
273
274 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
275 }
276 catch (Exception e) {
277 _log.error(e, e);
278
279 throw new RemoteException(e.getMessage());
280 }
281 }
282
283 public static long getUserIdByEmailAddress(long companyId,
284 java.lang.String emailAddress) throws RemoteException {
285 try {
286 long returnValue = UserServiceUtil.getUserIdByEmailAddress(companyId,
287 emailAddress);
288
289 return returnValue;
290 }
291 catch (Exception e) {
292 _log.error(e, e);
293
294 throw new RemoteException(e.getMessage());
295 }
296 }
297
298 public static long getUserIdByScreenName(long companyId,
299 java.lang.String screenName) throws RemoteException {
300 try {
301 long returnValue = UserServiceUtil.getUserIdByScreenName(companyId,
302 screenName);
303
304 return returnValue;
305 }
306 catch (Exception e) {
307 _log.error(e, e);
308
309 throw new RemoteException(e.getMessage());
310 }
311 }
312
313 public static boolean hasGroupUser(long groupId, long userId)
314 throws RemoteException {
315 try {
316 boolean returnValue = UserServiceUtil.hasGroupUser(groupId, userId);
317
318 return returnValue;
319 }
320 catch (Exception e) {
321 _log.error(e, e);
322
323 throw new RemoteException(e.getMessage());
324 }
325 }
326
327 public static boolean hasRoleUser(long roleId, long userId)
328 throws RemoteException {
329 try {
330 boolean returnValue = UserServiceUtil.hasRoleUser(roleId, userId);
331
332 return returnValue;
333 }
334 catch (Exception e) {
335 _log.error(e, e);
336
337 throw new RemoteException(e.getMessage());
338 }
339 }
340
341 public static boolean hasRoleUser(long companyId, java.lang.String name,
342 long userId, boolean inherited) throws RemoteException {
343 try {
344 boolean returnValue = UserServiceUtil.hasRoleUser(companyId, name,
345 userId, inherited);
346
347 return returnValue;
348 }
349 catch (Exception e) {
350 _log.error(e, e);
351
352 throw new RemoteException(e.getMessage());
353 }
354 }
355
356 public static void setRoleUsers(long roleId, long[] userIds)
357 throws RemoteException {
358 try {
359 UserServiceUtil.setRoleUsers(roleId, userIds);
360 }
361 catch (Exception e) {
362 _log.error(e, e);
363
364 throw new RemoteException(e.getMessage());
365 }
366 }
367
368 public static void setUserGroupUsers(long userGroupId, long[] userIds)
369 throws RemoteException {
370 try {
371 UserServiceUtil.setUserGroupUsers(userGroupId, userIds);
372 }
373 catch (Exception e) {
374 _log.error(e, e);
375
376 throw new RemoteException(e.getMessage());
377 }
378 }
379
380 public static void unsetGroupUsers(long groupId, long[] userIds)
381 throws RemoteException {
382 try {
383 UserServiceUtil.unsetGroupUsers(groupId, userIds);
384 }
385 catch (Exception e) {
386 _log.error(e, e);
387
388 throw new RemoteException(e.getMessage());
389 }
390 }
391
392 public static void unsetOrganizationUsers(long organizationId,
393 long[] userIds) throws RemoteException {
394 try {
395 UserServiceUtil.unsetOrganizationUsers(organizationId, userIds);
396 }
397 catch (Exception e) {
398 _log.error(e, e);
399
400 throw new RemoteException(e.getMessage());
401 }
402 }
403
404 public static void unsetPasswordPolicyUsers(long passwordPolicyId,
405 long[] userIds) throws RemoteException {
406 try {
407 UserServiceUtil.unsetPasswordPolicyUsers(passwordPolicyId, userIds);
408 }
409 catch (Exception e) {
410 _log.error(e, e);
411
412 throw new RemoteException(e.getMessage());
413 }
414 }
415
416 public static void unsetRoleUsers(long roleId, long[] userIds)
417 throws RemoteException {
418 try {
419 UserServiceUtil.unsetRoleUsers(roleId, userIds);
420 }
421 catch (Exception e) {
422 _log.error(e, e);
423
424 throw new RemoteException(e.getMessage());
425 }
426 }
427
428 public static void unsetUserGroupUsers(long userGroupId, long[] userIds)
429 throws RemoteException {
430 try {
431 UserServiceUtil.unsetUserGroupUsers(userGroupId, userIds);
432 }
433 catch (Exception e) {
434 _log.error(e, e);
435
436 throw new RemoteException(e.getMessage());
437 }
438 }
439
440 public static com.liferay.portal.model.UserSoap updateActive(long userId,
441 boolean active) throws RemoteException {
442 try {
443 com.liferay.portal.model.User returnValue = UserServiceUtil.updateActive(userId,
444 active);
445
446 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
447 }
448 catch (Exception e) {
449 _log.error(e, e);
450
451 throw new RemoteException(e.getMessage());
452 }
453 }
454
455 public static com.liferay.portal.model.UserSoap updateAgreedToTermsOfUse(
456 long userId, boolean agreedToTermsOfUse) throws RemoteException {
457 try {
458 com.liferay.portal.model.User returnValue = UserServiceUtil.updateAgreedToTermsOfUse(userId,
459 agreedToTermsOfUse);
460
461 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
462 }
463 catch (Exception e) {
464 _log.error(e, e);
465
466 throw new RemoteException(e.getMessage());
467 }
468 }
469
470 public static com.liferay.portal.model.UserSoap updateLockout(long userId,
471 boolean lockout) throws RemoteException {
472 try {
473 com.liferay.portal.model.User returnValue = UserServiceUtil.updateLockout(userId,
474 lockout);
475
476 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
477 }
478 catch (Exception e) {
479 _log.error(e, e);
480
481 throw new RemoteException(e.getMessage());
482 }
483 }
484
485 public static void updateOpenId(long userId, java.lang.String openId)
486 throws RemoteException {
487 try {
488 UserServiceUtil.updateOpenId(userId, openId);
489 }
490 catch (Exception e) {
491 _log.error(e, e);
492
493 throw new RemoteException(e.getMessage());
494 }
495 }
496
497 public static void updateOrganizations(long userId, long[] organizationIds)
498 throws RemoteException {
499 try {
500 UserServiceUtil.updateOrganizations(userId, organizationIds);
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 updatePassword(
510 long userId, java.lang.String password1, java.lang.String password2,
511 boolean passwordReset) throws RemoteException {
512 try {
513 com.liferay.portal.model.User returnValue = UserServiceUtil.updatePassword(userId,
514 password1, password2, passwordReset);
515
516 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
517 }
518 catch (Exception e) {
519 _log.error(e, e);
520
521 throw new RemoteException(e.getMessage());
522 }
523 }
524
525 public static void updatePortrait(long userId, byte[] bytes)
526 throws RemoteException {
527 try {
528 UserServiceUtil.updatePortrait(userId, bytes);
529 }
530 catch (Exception e) {
531 _log.error(e, e);
532
533 throw new RemoteException(e.getMessage());
534 }
535 }
536
537 public static void updateScreenName(long userId, java.lang.String screenName)
538 throws RemoteException {
539 try {
540 UserServiceUtil.updateScreenName(userId, screenName);
541 }
542 catch (Exception e) {
543 _log.error(e, e);
544
545 throw new RemoteException(e.getMessage());
546 }
547 }
548
549 public static com.liferay.portal.model.UserSoap updateUser(long userId,
550 java.lang.String oldPassword, boolean passwordReset,
551 java.lang.String screenName, java.lang.String emailAddress,
552 java.lang.String languageId, java.lang.String timeZoneId,
553 java.lang.String greeting, java.lang.String comments,
554 java.lang.String firstName, java.lang.String middleName,
555 java.lang.String lastName, int prefixId, int suffixId, boolean male,
556 int birthdayMonth, int birthdayDay, int birthdayYear,
557 java.lang.String smsSn, java.lang.String aimSn,
558 java.lang.String facebookSn, java.lang.String icqSn,
559 java.lang.String jabberSn, java.lang.String msnSn,
560 java.lang.String mySpaceSn, java.lang.String skypeSn,
561 java.lang.String twitterSn, java.lang.String ymSn,
562 java.lang.String jobTitle, long[] organizationIds)
563 throws RemoteException {
564 try {
565 com.liferay.portal.model.User returnValue = UserServiceUtil.updateUser(userId,
566 oldPassword, passwordReset, screenName, emailAddress,
567 languageId, timeZoneId, greeting, comments, firstName,
568 middleName, lastName, prefixId, suffixId, male,
569 birthdayMonth, birthdayDay, birthdayYear, smsSn, aimSn,
570 facebookSn, icqSn, jabberSn, msnSn, mySpaceSn, skypeSn,
571 twitterSn, ymSn, jobTitle, organizationIds);
572
573 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
574 }
575 catch (Exception e) {
576 _log.error(e, e);
577
578 throw new RemoteException(e.getMessage());
579 }
580 }
581
582 public static com.liferay.portal.model.UserSoap updateUser(long userId,
583 java.lang.String oldPassword, java.lang.String newPassword1,
584 java.lang.String newPassword2, boolean passwordReset,
585 java.lang.String screenName, java.lang.String emailAddress,
586 java.lang.String languageId, java.lang.String timeZoneId,
587 java.lang.String greeting, java.lang.String comments,
588 java.lang.String firstName, java.lang.String middleName,
589 java.lang.String lastName, int prefixId, int suffixId, boolean male,
590 int birthdayMonth, int birthdayDay, int birthdayYear,
591 java.lang.String smsSn, java.lang.String aimSn,
592 java.lang.String facebookSn, java.lang.String icqSn,
593 java.lang.String jabberSn, java.lang.String msnSn,
594 java.lang.String mySpaceSn, java.lang.String skypeSn,
595 java.lang.String twitterSn, java.lang.String ymSn,
596 java.lang.String jobTitle, long[] organizationIds)
597 throws RemoteException {
598 try {
599 com.liferay.portal.model.User returnValue = UserServiceUtil.updateUser(userId,
600 oldPassword, newPassword1, newPassword2, passwordReset,
601 screenName, emailAddress, languageId, timeZoneId, greeting,
602 comments, firstName, middleName, lastName, prefixId,
603 suffixId, male, birthdayMonth, birthdayDay, birthdayYear,
604 smsSn, aimSn, facebookSn, icqSn, jabberSn, msnSn,
605 mySpaceSn, skypeSn, twitterSn, ymSn, jobTitle,
606 organizationIds);
607
608 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
609 }
610 catch (Exception e) {
611 _log.error(e, e);
612
613 throw new RemoteException(e.getMessage());
614 }
615 }
616
617 private static Log _log = LogFactoryUtil.getLog(UserServiceSoap.class);
618 }