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 com.liferay.portal.model.UserSoap[] getGroupUsers(
207 long groupId) throws RemoteException {
208 try {
209 java.util.List<com.liferay.portal.model.User> returnValue = UserServiceUtil.getGroupUsers(groupId);
210
211 return com.liferay.portal.model.UserSoap.toSoapModels(returnValue);
212 }
213 catch (Exception e) {
214 _log.error(e, e);
215
216 throw new RemoteException(e.getMessage());
217 }
218 }
219
220 public static com.liferay.portal.model.UserSoap[] getRoleUsers(long roleId)
221 throws RemoteException {
222 try {
223 java.util.List<com.liferay.portal.model.User> returnValue = UserServiceUtil.getRoleUsers(roleId);
224
225 return com.liferay.portal.model.UserSoap.toSoapModels(returnValue);
226 }
227 catch (Exception e) {
228 _log.error(e, e);
229
230 throw new RemoteException(e.getMessage());
231 }
232 }
233
234 public static com.liferay.portal.model.UserSoap getUserByEmailAddress(
235 long companyId, java.lang.String emailAddress)
236 throws RemoteException {
237 try {
238 com.liferay.portal.model.User returnValue = UserServiceUtil.getUserByEmailAddress(companyId,
239 emailAddress);
240
241 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
242 }
243 catch (Exception e) {
244 _log.error(e, e);
245
246 throw new RemoteException(e.getMessage());
247 }
248 }
249
250 public static com.liferay.portal.model.UserSoap getUserById(long userId)
251 throws RemoteException {
252 try {
253 com.liferay.portal.model.User returnValue = UserServiceUtil.getUserById(userId);
254
255 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
256 }
257 catch (Exception e) {
258 _log.error(e, e);
259
260 throw new RemoteException(e.getMessage());
261 }
262 }
263
264 public static com.liferay.portal.model.UserSoap getUserByScreenName(
265 long companyId, java.lang.String screenName) throws RemoteException {
266 try {
267 com.liferay.portal.model.User returnValue = UserServiceUtil.getUserByScreenName(companyId,
268 screenName);
269
270 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
271 }
272 catch (Exception e) {
273 _log.error(e, e);
274
275 throw new RemoteException(e.getMessage());
276 }
277 }
278
279 public static long getUserIdByEmailAddress(long companyId,
280 java.lang.String emailAddress) throws RemoteException {
281 try {
282 long returnValue = UserServiceUtil.getUserIdByEmailAddress(companyId,
283 emailAddress);
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 getUserIdByScreenName(long companyId,
295 java.lang.String screenName) throws RemoteException {
296 try {
297 long returnValue = UserServiceUtil.getUserIdByScreenName(companyId,
298 screenName);
299
300 return returnValue;
301 }
302 catch (Exception e) {
303 _log.error(e, e);
304
305 throw new RemoteException(e.getMessage());
306 }
307 }
308
309 public static boolean hasGroupUser(long groupId, long userId)
310 throws RemoteException {
311 try {
312 boolean returnValue = UserServiceUtil.hasGroupUser(groupId, userId);
313
314 return returnValue;
315 }
316 catch (Exception e) {
317 _log.error(e, e);
318
319 throw new RemoteException(e.getMessage());
320 }
321 }
322
323 public static boolean hasRoleUser(long roleId, long userId)
324 throws RemoteException {
325 try {
326 boolean returnValue = UserServiceUtil.hasRoleUser(roleId, userId);
327
328 return returnValue;
329 }
330 catch (Exception e) {
331 _log.error(e, e);
332
333 throw new RemoteException(e.getMessage());
334 }
335 }
336
337 public static void setRoleUsers(long roleId, long[] userIds)
338 throws RemoteException {
339 try {
340 UserServiceUtil.setRoleUsers(roleId, userIds);
341 }
342 catch (Exception e) {
343 _log.error(e, e);
344
345 throw new RemoteException(e.getMessage());
346 }
347 }
348
349 public static void setUserGroupUsers(long userGroupId, long[] userIds)
350 throws RemoteException {
351 try {
352 UserServiceUtil.setUserGroupUsers(userGroupId, userIds);
353 }
354 catch (Exception e) {
355 _log.error(e, e);
356
357 throw new RemoteException(e.getMessage());
358 }
359 }
360
361 public static void unsetGroupUsers(long groupId, long[] userIds)
362 throws RemoteException {
363 try {
364 UserServiceUtil.unsetGroupUsers(groupId, userIds);
365 }
366 catch (Exception e) {
367 _log.error(e, e);
368
369 throw new RemoteException(e.getMessage());
370 }
371 }
372
373 public static void unsetOrganizationUsers(long organizationId,
374 long[] userIds) throws RemoteException {
375 try {
376 UserServiceUtil.unsetOrganizationUsers(organizationId, userIds);
377 }
378 catch (Exception e) {
379 _log.error(e, e);
380
381 throw new RemoteException(e.getMessage());
382 }
383 }
384
385 public static void unsetPasswordPolicyUsers(long passwordPolicyId,
386 long[] userIds) throws RemoteException {
387 try {
388 UserServiceUtil.unsetPasswordPolicyUsers(passwordPolicyId, userIds);
389 }
390 catch (Exception e) {
391 _log.error(e, e);
392
393 throw new RemoteException(e.getMessage());
394 }
395 }
396
397 public static void unsetRoleUsers(long roleId, long[] userIds)
398 throws RemoteException {
399 try {
400 UserServiceUtil.unsetRoleUsers(roleId, userIds);
401 }
402 catch (Exception e) {
403 _log.error(e, e);
404
405 throw new RemoteException(e.getMessage());
406 }
407 }
408
409 public static void unsetUserGroupUsers(long userGroupId, long[] userIds)
410 throws RemoteException {
411 try {
412 UserServiceUtil.unsetUserGroupUsers(userGroupId, userIds);
413 }
414 catch (Exception e) {
415 _log.error(e, e);
416
417 throw new RemoteException(e.getMessage());
418 }
419 }
420
421 public static com.liferay.portal.model.UserSoap updateActive(long userId,
422 boolean active) throws RemoteException {
423 try {
424 com.liferay.portal.model.User returnValue = UserServiceUtil.updateActive(userId,
425 active);
426
427 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
428 }
429 catch (Exception e) {
430 _log.error(e, e);
431
432 throw new RemoteException(e.getMessage());
433 }
434 }
435
436 public static com.liferay.portal.model.UserSoap updateAgreedToTermsOfUse(
437 long userId, boolean agreedToTermsOfUse) throws RemoteException {
438 try {
439 com.liferay.portal.model.User returnValue = UserServiceUtil.updateAgreedToTermsOfUse(userId,
440 agreedToTermsOfUse);
441
442 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
443 }
444 catch (Exception e) {
445 _log.error(e, e);
446
447 throw new RemoteException(e.getMessage());
448 }
449 }
450
451 public static com.liferay.portal.model.UserSoap updateLockout(long userId,
452 boolean lockout) throws RemoteException {
453 try {
454 com.liferay.portal.model.User returnValue = UserServiceUtil.updateLockout(userId,
455 lockout);
456
457 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
458 }
459 catch (Exception e) {
460 _log.error(e, e);
461
462 throw new RemoteException(e.getMessage());
463 }
464 }
465
466 public static void updateOrganizations(long userId, long[] organizationIds)
467 throws RemoteException {
468 try {
469 UserServiceUtil.updateOrganizations(userId, organizationIds);
470 }
471 catch (Exception e) {
472 _log.error(e, e);
473
474 throw new RemoteException(e.getMessage());
475 }
476 }
477
478 public static com.liferay.portal.model.UserSoap updatePassword(
479 long userId, java.lang.String password1, java.lang.String password2,
480 boolean passwordReset) throws RemoteException {
481 try {
482 com.liferay.portal.model.User returnValue = UserServiceUtil.updatePassword(userId,
483 password1, password2, passwordReset);
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 updatePortrait(long userId, byte[] bytes)
495 throws RemoteException {
496 try {
497 UserServiceUtil.updatePortrait(userId, bytes);
498 }
499 catch (Exception e) {
500 _log.error(e, e);
501
502 throw new RemoteException(e.getMessage());
503 }
504 }
505
506 public static void updateScreenName(long userId, java.lang.String screenName)
507 throws RemoteException {
508 try {
509 UserServiceUtil.updateScreenName(userId, screenName);
510 }
511 catch (Exception e) {
512 _log.error(e, e);
513
514 throw new RemoteException(e.getMessage());
515 }
516 }
517
518 public static void updateOpenId(long userId, java.lang.String openId)
519 throws RemoteException {
520 try {
521 UserServiceUtil.updateOpenId(userId, openId);
522 }
523 catch (Exception e) {
524 _log.error(e, e);
525
526 throw new RemoteException(e.getMessage());
527 }
528 }
529
530 public static com.liferay.portal.model.UserSoap updateUser(long userId,
531 java.lang.String oldPassword, boolean passwordReset,
532 java.lang.String screenName, java.lang.String emailAddress,
533 java.lang.String languageId, java.lang.String timeZoneId,
534 java.lang.String greeting, java.lang.String comments,
535 java.lang.String firstName, java.lang.String middleName,
536 java.lang.String lastName, int prefixId, int suffixId, boolean male,
537 int birthdayMonth, int birthdayDay, int birthdayYear,
538 java.lang.String smsSn, java.lang.String aimSn,
539 java.lang.String facebookSn, java.lang.String icqSn,
540 java.lang.String jabberSn, java.lang.String msnSn,
541 java.lang.String mySpaceSn, java.lang.String skypeSn,
542 java.lang.String twitterSn, java.lang.String ymSn,
543 java.lang.String jobTitle, long[] organizationIds)
544 throws RemoteException {
545 try {
546 com.liferay.portal.model.User returnValue = UserServiceUtil.updateUser(userId,
547 oldPassword, passwordReset, screenName, emailAddress,
548 languageId, timeZoneId, greeting, comments, firstName,
549 middleName, lastName, prefixId, suffixId, male,
550 birthdayMonth, birthdayDay, birthdayYear, smsSn, aimSn,
551 facebookSn, icqSn, jabberSn, msnSn, mySpaceSn, skypeSn,
552 twitterSn, ymSn, jobTitle, organizationIds);
553
554 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
555 }
556 catch (Exception e) {
557 _log.error(e, e);
558
559 throw new RemoteException(e.getMessage());
560 }
561 }
562
563 public static com.liferay.portal.model.UserSoap updateUser(long userId,
564 java.lang.String oldPassword, java.lang.String newPassword1,
565 java.lang.String newPassword2, boolean passwordReset,
566 java.lang.String screenName, java.lang.String emailAddress,
567 java.lang.String languageId, java.lang.String timeZoneId,
568 java.lang.String greeting, java.lang.String comments,
569 java.lang.String firstName, java.lang.String middleName,
570 java.lang.String lastName, int prefixId, int suffixId, boolean male,
571 int birthdayMonth, int birthdayDay, int birthdayYear,
572 java.lang.String smsSn, java.lang.String aimSn,
573 java.lang.String facebookSn, java.lang.String icqSn,
574 java.lang.String jabberSn, java.lang.String msnSn,
575 java.lang.String mySpaceSn, java.lang.String skypeSn,
576 java.lang.String twitterSn, java.lang.String ymSn,
577 java.lang.String jobTitle, long[] organizationIds)
578 throws RemoteException {
579 try {
580 com.liferay.portal.model.User returnValue = UserServiceUtil.updateUser(userId,
581 oldPassword, newPassword1, newPassword2, passwordReset,
582 screenName, emailAddress, languageId, timeZoneId, greeting,
583 comments, firstName, middleName, lastName, prefixId,
584 suffixId, male, birthdayMonth, birthdayDay, birthdayYear,
585 smsSn, aimSn, facebookSn, icqSn, jabberSn, msnSn,
586 mySpaceSn, skypeSn, twitterSn, ymSn, jobTitle,
587 organizationIds);
588
589 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
590 }
591 catch (Exception e) {
592 _log.error(e, e);
593
594 throw new RemoteException(e.getMessage());
595 }
596 }
597
598 private static Log _log = LogFactoryUtil.getLog(UserServiceSoap.class);
599 }