1
22
23 package com.liferay.portal.service;
24
25
26
53 public class UserLocalServiceUtil {
54 public static com.liferay.portal.model.User addUser(
55 com.liferay.portal.model.User user)
56 throws com.liferay.portal.SystemException {
57 UserLocalService userLocalService = UserLocalServiceFactory.getService();
58
59 return userLocalService.addUser(user);
60 }
61
62 public static void deleteUser(long userId)
63 throws com.liferay.portal.PortalException,
64 com.liferay.portal.SystemException {
65 UserLocalService userLocalService = UserLocalServiceFactory.getService();
66
67 userLocalService.deleteUser(userId);
68 }
69
70 public static void deleteUser(com.liferay.portal.model.User user)
71 throws com.liferay.portal.PortalException,
72 com.liferay.portal.SystemException {
73 UserLocalService userLocalService = UserLocalServiceFactory.getService();
74
75 userLocalService.deleteUser(user);
76 }
77
78 public static java.util.List<com.liferay.portal.model.User> dynamicQuery(
79 com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
80 throws com.liferay.portal.SystemException {
81 UserLocalService userLocalService = UserLocalServiceFactory.getService();
82
83 return userLocalService.dynamicQuery(queryInitializer);
84 }
85
86 public static java.util.List<com.liferay.portal.model.User> dynamicQuery(
87 com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
88 int begin, int end) throws com.liferay.portal.SystemException {
89 UserLocalService userLocalService = UserLocalServiceFactory.getService();
90
91 return userLocalService.dynamicQuery(queryInitializer, begin, end);
92 }
93
94 public static com.liferay.portal.model.User updateUser(
95 com.liferay.portal.model.User user)
96 throws com.liferay.portal.SystemException {
97 UserLocalService userLocalService = UserLocalServiceFactory.getService();
98
99 return userLocalService.updateUser(user);
100 }
101
102 public static void addGroupUsers(long groupId, long[] userIds)
103 throws com.liferay.portal.PortalException,
104 com.liferay.portal.SystemException {
105 UserLocalService userLocalService = UserLocalServiceFactory.getService();
106
107 userLocalService.addGroupUsers(groupId, userIds);
108 }
109
110 public static void addOrganizationUsers(long organizationId, long[] userIds)
111 throws com.liferay.portal.PortalException,
112 com.liferay.portal.SystemException {
113 UserLocalService userLocalService = UserLocalServiceFactory.getService();
114
115 userLocalService.addOrganizationUsers(organizationId, userIds);
116 }
117
118 public static void addPasswordPolicyUsers(long passwordPolicyId,
119 long[] userIds)
120 throws com.liferay.portal.PortalException,
121 com.liferay.portal.SystemException {
122 UserLocalService userLocalService = UserLocalServiceFactory.getService();
123
124 userLocalService.addPasswordPolicyUsers(passwordPolicyId, userIds);
125 }
126
127 public static void addRoleUsers(long roleId, long[] userIds)
128 throws com.liferay.portal.PortalException,
129 com.liferay.portal.SystemException {
130 UserLocalService userLocalService = UserLocalServiceFactory.getService();
131
132 userLocalService.addRoleUsers(roleId, userIds);
133 }
134
135 public static void addUserGroupUsers(long userGroupId, long[] userIds)
136 throws com.liferay.portal.PortalException,
137 com.liferay.portal.SystemException {
138 UserLocalService userLocalService = UserLocalServiceFactory.getService();
139
140 userLocalService.addUserGroupUsers(userGroupId, userIds);
141 }
142
143 public static com.liferay.portal.model.User addUser(long creatorUserId,
144 long companyId, boolean autoPassword, java.lang.String password1,
145 java.lang.String password2, boolean autoScreenName,
146 java.lang.String screenName, java.lang.String emailAddress,
147 java.util.Locale locale, java.lang.String firstName,
148 java.lang.String middleName, java.lang.String lastName, int prefixId,
149 int suffixId, boolean male, int birthdayMonth, int birthdayDay,
150 int birthdayYear, java.lang.String jobTitle, long[] organizationIds,
151 boolean sendEmail)
152 throws com.liferay.portal.PortalException,
153 com.liferay.portal.SystemException {
154 UserLocalService userLocalService = UserLocalServiceFactory.getService();
155
156 return userLocalService.addUser(creatorUserId, companyId, autoPassword,
157 password1, password2, autoScreenName, screenName, emailAddress,
158 locale, firstName, middleName, lastName, prefixId, suffixId, male,
159 birthdayMonth, birthdayDay, birthdayYear, jobTitle,
160 organizationIds, sendEmail);
161 }
162
163 public static int authenticateByEmailAddress(long companyId,
164 java.lang.String emailAddress, java.lang.String password,
165 java.util.Map<String, String[]> headerMap,
166 java.util.Map<String, String[]> parameterMap)
167 throws com.liferay.portal.PortalException,
168 com.liferay.portal.SystemException {
169 UserLocalService userLocalService = UserLocalServiceFactory.getService();
170
171 return userLocalService.authenticateByEmailAddress(companyId,
172 emailAddress, password, headerMap, parameterMap);
173 }
174
175 public static int authenticateByScreenName(long companyId,
176 java.lang.String screenName, java.lang.String password,
177 java.util.Map<String, String[]> headerMap,
178 java.util.Map<String, String[]> parameterMap)
179 throws com.liferay.portal.PortalException,
180 com.liferay.portal.SystemException {
181 UserLocalService userLocalService = UserLocalServiceFactory.getService();
182
183 return userLocalService.authenticateByScreenName(companyId, screenName,
184 password, headerMap, parameterMap);
185 }
186
187 public static int authenticateByUserId(long companyId, long userId,
188 java.lang.String password, java.util.Map<String, String[]> headerMap,
189 java.util.Map<String, String[]> parameterMap)
190 throws com.liferay.portal.PortalException,
191 com.liferay.portal.SystemException {
192 UserLocalService userLocalService = UserLocalServiceFactory.getService();
193
194 return userLocalService.authenticateByUserId(companyId, userId,
195 password, headerMap, parameterMap);
196 }
197
198 public static long authenticateForBasic(long companyId,
199 java.lang.String authType, java.lang.String login,
200 java.lang.String password)
201 throws com.liferay.portal.PortalException,
202 com.liferay.portal.SystemException {
203 UserLocalService userLocalService = UserLocalServiceFactory.getService();
204
205 return userLocalService.authenticateForBasic(companyId, authType,
206 login, password);
207 }
208
209 public static boolean authenticateForJAAS(long userId,
210 java.lang.String encPassword)
211 throws com.liferay.portal.PortalException,
212 com.liferay.portal.SystemException {
213 UserLocalService userLocalService = UserLocalServiceFactory.getService();
214
215 return userLocalService.authenticateForJAAS(userId, encPassword);
216 }
217
218 public static void checkLockout(com.liferay.portal.model.User user)
219 throws com.liferay.portal.PortalException,
220 com.liferay.portal.SystemException {
221 UserLocalService userLocalService = UserLocalServiceFactory.getService();
222
223 userLocalService.checkLockout(user);
224 }
225
226 public static void checkLoginFailure(com.liferay.portal.model.User user)
227 throws com.liferay.portal.PortalException,
228 com.liferay.portal.SystemException {
229 UserLocalService userLocalService = UserLocalServiceFactory.getService();
230
231 userLocalService.checkLoginFailure(user);
232 }
233
234 public static void checkLoginFailureByEmailAddress(long companyId,
235 java.lang.String emailAddress)
236 throws com.liferay.portal.PortalException,
237 com.liferay.portal.SystemException {
238 UserLocalService userLocalService = UserLocalServiceFactory.getService();
239
240 userLocalService.checkLoginFailureByEmailAddress(companyId, emailAddress);
241 }
242
243 public static void checkLoginFailureById(long userId)
244 throws com.liferay.portal.PortalException,
245 com.liferay.portal.SystemException {
246 UserLocalService userLocalService = UserLocalServiceFactory.getService();
247
248 userLocalService.checkLoginFailureById(userId);
249 }
250
251 public static void checkLoginFailureByScreenName(long companyId,
252 java.lang.String screenName)
253 throws com.liferay.portal.PortalException,
254 com.liferay.portal.SystemException {
255 UserLocalService userLocalService = UserLocalServiceFactory.getService();
256
257 userLocalService.checkLoginFailureByScreenName(companyId, screenName);
258 }
259
260 public static void checkPasswordExpired(com.liferay.portal.model.User user)
261 throws com.liferay.portal.PortalException,
262 com.liferay.portal.SystemException {
263 UserLocalService userLocalService = UserLocalServiceFactory.getService();
264
265 userLocalService.checkPasswordExpired(user);
266 }
267
268 public static void clearOrganizationUsers(long organizationId)
269 throws com.liferay.portal.PortalException,
270 com.liferay.portal.SystemException {
271 UserLocalService userLocalService = UserLocalServiceFactory.getService();
272
273 userLocalService.clearOrganizationUsers(organizationId);
274 }
275
276 public static void clearUserGroupUsers(long userGroupId)
277 throws com.liferay.portal.PortalException,
278 com.liferay.portal.SystemException {
279 UserLocalService userLocalService = UserLocalServiceFactory.getService();
280
281 userLocalService.clearUserGroupUsers(userGroupId);
282 }
283
284 public static com.liferay.portal.kernel.util.KeyValuePair decryptUserId(
285 long companyId, java.lang.String name, java.lang.String password)
286 throws com.liferay.portal.PortalException,
287 com.liferay.portal.SystemException {
288 UserLocalService userLocalService = UserLocalServiceFactory.getService();
289
290 return userLocalService.decryptUserId(companyId, name, password);
291 }
292
293 public static void deletePasswordPolicyUser(long passwordPolicyId,
294 long userId)
295 throws com.liferay.portal.PortalException,
296 com.liferay.portal.SystemException {
297 UserLocalService userLocalService = UserLocalServiceFactory.getService();
298
299 userLocalService.deletePasswordPolicyUser(passwordPolicyId, userId);
300 }
301
302 public static void deleteRoleUser(long roleId, long userId)
303 throws com.liferay.portal.PortalException,
304 com.liferay.portal.SystemException {
305 UserLocalService userLocalService = UserLocalServiceFactory.getService();
306
307 userLocalService.deleteRoleUser(roleId, userId);
308 }
309
310 public static java.lang.String encryptUserId(java.lang.String name)
311 throws com.liferay.portal.PortalException,
312 com.liferay.portal.SystemException {
313 UserLocalService userLocalService = UserLocalServiceFactory.getService();
314
315 return userLocalService.encryptUserId(name);
316 }
317
318 public static com.liferay.portal.model.User getDefaultUser(long companyId)
319 throws com.liferay.portal.PortalException,
320 com.liferay.portal.SystemException {
321 UserLocalService userLocalService = UserLocalServiceFactory.getService();
322
323 return userLocalService.getDefaultUser(companyId);
324 }
325
326 public static long getDefaultUserId(long companyId)
327 throws com.liferay.portal.PortalException,
328 com.liferay.portal.SystemException {
329 UserLocalService userLocalService = UserLocalServiceFactory.getService();
330
331 return userLocalService.getDefaultUserId(companyId);
332 }
333
334 public static java.util.List<com.liferay.portal.model.User> getGroupUsers(
335 long groupId)
336 throws com.liferay.portal.PortalException,
337 com.liferay.portal.SystemException {
338 UserLocalService userLocalService = UserLocalServiceFactory.getService();
339
340 return userLocalService.getGroupUsers(groupId);
341 }
342
343 public static int getGroupUsersCount(long groupId)
344 throws com.liferay.portal.SystemException {
345 UserLocalService userLocalService = UserLocalServiceFactory.getService();
346
347 return userLocalService.getGroupUsersCount(groupId);
348 }
349
350 public static int getGroupUsersCount(long groupId, boolean active)
351 throws com.liferay.portal.PortalException,
352 com.liferay.portal.SystemException {
353 UserLocalService userLocalService = UserLocalServiceFactory.getService();
354
355 return userLocalService.getGroupUsersCount(groupId, active);
356 }
357
358 public static java.util.List<com.liferay.portal.model.User> getNoAnnouncementsDeliveries(
359 java.lang.String type) throws com.liferay.portal.SystemException {
360 UserLocalService userLocalService = UserLocalServiceFactory.getService();
361
362 return userLocalService.getNoAnnouncementsDeliveries(type);
363 }
364
365 public static java.util.List<com.liferay.portal.model.User> getOrganizationUsers(
366 long organizationId)
367 throws com.liferay.portal.PortalException,
368 com.liferay.portal.SystemException {
369 UserLocalService userLocalService = UserLocalServiceFactory.getService();
370
371 return userLocalService.getOrganizationUsers(organizationId);
372 }
373
374 public static int getOrganizationUsersCount(long organizationId)
375 throws com.liferay.portal.SystemException {
376 UserLocalService userLocalService = UserLocalServiceFactory.getService();
377
378 return userLocalService.getOrganizationUsersCount(organizationId);
379 }
380
381 public static int getOrganizationUsersCount(long organizationId,
382 boolean active)
383 throws com.liferay.portal.PortalException,
384 com.liferay.portal.SystemException {
385 UserLocalService userLocalService = UserLocalServiceFactory.getService();
386
387 return userLocalService.getOrganizationUsersCount(organizationId, active);
388 }
389
390 public static java.util.List<com.liferay.portal.model.User> getPermissionUsers(
391 long companyId, long groupId, java.lang.String name,
392 java.lang.String primKey, java.lang.String actionId,
393 java.lang.String firstName, java.lang.String middleName,
394 java.lang.String lastName, java.lang.String emailAddress,
395 boolean andOperator, int begin, int end)
396 throws com.liferay.portal.PortalException,
397 com.liferay.portal.SystemException {
398 UserLocalService userLocalService = UserLocalServiceFactory.getService();
399
400 return userLocalService.getPermissionUsers(companyId, groupId, name,
401 primKey, actionId, firstName, middleName, lastName, emailAddress,
402 andOperator, begin, end);
403 }
404
405 public static int getPermissionUsersCount(long companyId, long groupId,
406 java.lang.String name, java.lang.String primKey,
407 java.lang.String actionId, java.lang.String firstName,
408 java.lang.String middleName, java.lang.String lastName,
409 java.lang.String emailAddress, boolean andOperator)
410 throws com.liferay.portal.PortalException,
411 com.liferay.portal.SystemException {
412 UserLocalService userLocalService = UserLocalServiceFactory.getService();
413
414 return userLocalService.getPermissionUsersCount(companyId, groupId,
415 name, primKey, actionId, firstName, middleName, lastName,
416 emailAddress, andOperator);
417 }
418
419 public static java.util.List<com.liferay.portal.model.User> getRoleUsers(
420 long roleId)
421 throws com.liferay.portal.PortalException,
422 com.liferay.portal.SystemException {
423 UserLocalService userLocalService = UserLocalServiceFactory.getService();
424
425 return userLocalService.getRoleUsers(roleId);
426 }
427
428 public static int getRoleUsersCount(long roleId)
429 throws com.liferay.portal.SystemException {
430 UserLocalService userLocalService = UserLocalServiceFactory.getService();
431
432 return userLocalService.getRoleUsersCount(roleId);
433 }
434
435 public static int getRoleUsersCount(long roleId, boolean active)
436 throws com.liferay.portal.PortalException,
437 com.liferay.portal.SystemException {
438 UserLocalService userLocalService = UserLocalServiceFactory.getService();
439
440 return userLocalService.getRoleUsersCount(roleId, active);
441 }
442
443 public static java.util.List<com.liferay.portal.model.User> getSocialUsers(
444 long userId, int type, int begin, int end)
445 throws com.liferay.portal.PortalException,
446 com.liferay.portal.SystemException {
447 UserLocalService userLocalService = UserLocalServiceFactory.getService();
448
449 return userLocalService.getSocialUsers(userId, type, begin, end);
450 }
451
452 public static int getSocialUsersCount(long userId, int type)
453 throws com.liferay.portal.PortalException,
454 com.liferay.portal.SystemException {
455 UserLocalService userLocalService = UserLocalServiceFactory.getService();
456
457 return userLocalService.getSocialUsersCount(userId, type);
458 }
459
460 public static java.util.List<com.liferay.portal.model.User> getUserGroupUsers(
461 long userGroupId)
462 throws com.liferay.portal.PortalException,
463 com.liferay.portal.SystemException {
464 UserLocalService userLocalService = UserLocalServiceFactory.getService();
465
466 return userLocalService.getUserGroupUsers(userGroupId);
467 }
468
469 public static int getUserGroupUsersCount(long userGroupId)
470 throws com.liferay.portal.SystemException {
471 UserLocalService userLocalService = UserLocalServiceFactory.getService();
472
473 return userLocalService.getUserGroupUsersCount(userGroupId);
474 }
475
476 public static int getUserGroupUsersCount(long userGroupId, boolean active)
477 throws com.liferay.portal.PortalException,
478 com.liferay.portal.SystemException {
479 UserLocalService userLocalService = UserLocalServiceFactory.getService();
480
481 return userLocalService.getUserGroupUsersCount(userGroupId, active);
482 }
483
484 public static com.liferay.portal.model.User getUserByContactId(
485 long contactId)
486 throws com.liferay.portal.PortalException,
487 com.liferay.portal.SystemException {
488 UserLocalService userLocalService = UserLocalServiceFactory.getService();
489
490 return userLocalService.getUserByContactId(contactId);
491 }
492
493 public static com.liferay.portal.model.User getUserByEmailAddress(
494 long companyId, java.lang.String emailAddress)
495 throws com.liferay.portal.PortalException,
496 com.liferay.portal.SystemException {
497 UserLocalService userLocalService = UserLocalServiceFactory.getService();
498
499 return userLocalService.getUserByEmailAddress(companyId, emailAddress);
500 }
501
502 public static com.liferay.portal.model.User getUserById(long userId)
503 throws com.liferay.portal.PortalException,
504 com.liferay.portal.SystemException {
505 UserLocalService userLocalService = UserLocalServiceFactory.getService();
506
507 return userLocalService.getUserById(userId);
508 }
509
510 public static com.liferay.portal.model.User getUserById(long companyId,
511 long userId)
512 throws com.liferay.portal.PortalException,
513 com.liferay.portal.SystemException {
514 UserLocalService userLocalService = UserLocalServiceFactory.getService();
515
516 return userLocalService.getUserById(companyId, userId);
517 }
518
519 public static com.liferay.portal.model.User getUserByPortraitId(
520 long portraitId)
521 throws com.liferay.portal.PortalException,
522 com.liferay.portal.SystemException {
523 UserLocalService userLocalService = UserLocalServiceFactory.getService();
524
525 return userLocalService.getUserByPortraitId(portraitId);
526 }
527
528 public static com.liferay.portal.model.User getUserByScreenName(
529 long companyId, java.lang.String screenName)
530 throws com.liferay.portal.PortalException,
531 com.liferay.portal.SystemException {
532 UserLocalService userLocalService = UserLocalServiceFactory.getService();
533
534 return userLocalService.getUserByScreenName(companyId, screenName);
535 }
536
537 public static long getUserIdByEmailAddress(long companyId,
538 java.lang.String emailAddress)
539 throws com.liferay.portal.PortalException,
540 com.liferay.portal.SystemException {
541 UserLocalService userLocalService = UserLocalServiceFactory.getService();
542
543 return userLocalService.getUserIdByEmailAddress(companyId, emailAddress);
544 }
545
546 public static long getUserIdByScreenName(long companyId,
547 java.lang.String screenName)
548 throws com.liferay.portal.PortalException,
549 com.liferay.portal.SystemException {
550 UserLocalService userLocalService = UserLocalServiceFactory.getService();
551
552 return userLocalService.getUserIdByScreenName(companyId, screenName);
553 }
554
555 public static boolean hasGroupUser(long groupId, long userId)
556 throws com.liferay.portal.PortalException,
557 com.liferay.portal.SystemException {
558 UserLocalService userLocalService = UserLocalServiceFactory.getService();
559
560 return userLocalService.hasGroupUser(groupId, userId);
561 }
562
563 public static boolean hasOrganizationUser(long organizationId, long userId)
564 throws com.liferay.portal.PortalException,
565 com.liferay.portal.SystemException {
566 UserLocalService userLocalService = UserLocalServiceFactory.getService();
567
568 return userLocalService.hasOrganizationUser(organizationId, userId);
569 }
570
571 public static boolean hasPasswordPolicyUser(long passwordPolicyId,
572 long userId)
573 throws com.liferay.portal.PortalException,
574 com.liferay.portal.SystemException {
575 UserLocalService userLocalService = UserLocalServiceFactory.getService();
576
577 return userLocalService.hasPasswordPolicyUser(passwordPolicyId, userId);
578 }
579
580 public static boolean hasRoleUser(long roleId, long userId)
581 throws com.liferay.portal.PortalException,
582 com.liferay.portal.SystemException {
583 UserLocalService userLocalService = UserLocalServiceFactory.getService();
584
585 return userLocalService.hasRoleUser(roleId, userId);
586 }
587
588 public static boolean hasUserGroupUser(long userGroupId, long userId)
589 throws com.liferay.portal.PortalException,
590 com.liferay.portal.SystemException {
591 UserLocalService userLocalService = UserLocalServiceFactory.getService();
592
593 return userLocalService.hasUserGroupUser(userGroupId, userId);
594 }
595
596 public static boolean isPasswordExpired(com.liferay.portal.model.User user)
597 throws com.liferay.portal.PortalException,
598 com.liferay.portal.SystemException {
599 UserLocalService userLocalService = UserLocalServiceFactory.getService();
600
601 return userLocalService.isPasswordExpired(user);
602 }
603
604 public static boolean isPasswordExpiringSoon(
605 com.liferay.portal.model.User user)
606 throws com.liferay.portal.PortalException,
607 com.liferay.portal.SystemException {
608 UserLocalService userLocalService = UserLocalServiceFactory.getService();
609
610 return userLocalService.isPasswordExpiringSoon(user);
611 }
612
613 public static java.util.List<com.liferay.portal.model.User> search(
614 long companyId, java.lang.String keywords, java.lang.Boolean active,
615 java.util.LinkedHashMap<String, Object> params, int begin, int end,
616 com.liferay.portal.kernel.util.OrderByComparator obc)
617 throws com.liferay.portal.SystemException {
618 UserLocalService userLocalService = UserLocalServiceFactory.getService();
619
620 return userLocalService.search(companyId, keywords, active, params,
621 begin, end, obc);
622 }
623
624 public static java.util.List<com.liferay.portal.model.User> search(
625 long companyId, java.lang.String firstName,
626 java.lang.String middleName, java.lang.String lastName,
627 java.lang.String screenName, java.lang.String emailAddress,
628 java.lang.Boolean active,
629 java.util.LinkedHashMap<String, Object> params, boolean andSearch,
630 int begin, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
631 throws com.liferay.portal.SystemException {
632 UserLocalService userLocalService = UserLocalServiceFactory.getService();
633
634 return userLocalService.search(companyId, firstName, middleName,
635 lastName, screenName, emailAddress, active, params, andSearch,
636 begin, end, obc);
637 }
638
639 public static int searchCount(long companyId, java.lang.String keywords,
640 java.lang.Boolean active, java.util.LinkedHashMap<String, Object> params)
641 throws com.liferay.portal.SystemException {
642 UserLocalService userLocalService = UserLocalServiceFactory.getService();
643
644 return userLocalService.searchCount(companyId, keywords, active, params);
645 }
646
647 public static int searchCount(long companyId, java.lang.String firstName,
648 java.lang.String middleName, java.lang.String lastName,
649 java.lang.String screenName, java.lang.String emailAddress,
650 java.lang.Boolean active,
651 java.util.LinkedHashMap<String, Object> params, boolean andSearch)
652 throws com.liferay.portal.SystemException {
653 UserLocalService userLocalService = UserLocalServiceFactory.getService();
654
655 return userLocalService.searchCount(companyId, firstName, middleName,
656 lastName, screenName, emailAddress, active, params, andSearch);
657 }
658
659 public static void sendPassword(long companyId,
660 java.lang.String emailAddress, java.lang.String remoteAddr,
661 java.lang.String remoteHost, java.lang.String userAgent)
662 throws com.liferay.portal.PortalException,
663 com.liferay.portal.SystemException {
664 UserLocalService userLocalService = UserLocalServiceFactory.getService();
665
666 userLocalService.sendPassword(companyId, emailAddress, remoteAddr,
667 remoteHost, userAgent);
668 }
669
670 public static void setRoleUsers(long roleId, long[] userIds)
671 throws com.liferay.portal.PortalException,
672 com.liferay.portal.SystemException {
673 UserLocalService userLocalService = UserLocalServiceFactory.getService();
674
675 userLocalService.setRoleUsers(roleId, userIds);
676 }
677
678 public static void setUserGroupUsers(long userGroupId, long[] userIds)
679 throws com.liferay.portal.PortalException,
680 com.liferay.portal.SystemException {
681 UserLocalService userLocalService = UserLocalServiceFactory.getService();
682
683 userLocalService.setUserGroupUsers(userGroupId, userIds);
684 }
685
686 public static void unsetGroupUsers(long groupId, long[] userIds)
687 throws com.liferay.portal.PortalException,
688 com.liferay.portal.SystemException {
689 UserLocalService userLocalService = UserLocalServiceFactory.getService();
690
691 userLocalService.unsetGroupUsers(groupId, userIds);
692 }
693
694 public static void unsetOrganizationUsers(long organizationId,
695 long[] userIds)
696 throws com.liferay.portal.PortalException,
697 com.liferay.portal.SystemException {
698 UserLocalService userLocalService = UserLocalServiceFactory.getService();
699
700 userLocalService.unsetOrganizationUsers(organizationId, userIds);
701 }
702
703 public static void unsetPasswordPolicyUsers(long passwordPolicyId,
704 long[] userIds)
705 throws com.liferay.portal.PortalException,
706 com.liferay.portal.SystemException {
707 UserLocalService userLocalService = UserLocalServiceFactory.getService();
708
709 userLocalService.unsetPasswordPolicyUsers(passwordPolicyId, userIds);
710 }
711
712 public static void unsetRoleUsers(long roleId, long[] userIds)
713 throws com.liferay.portal.PortalException,
714 com.liferay.portal.SystemException {
715 UserLocalService userLocalService = UserLocalServiceFactory.getService();
716
717 userLocalService.unsetRoleUsers(roleId, userIds);
718 }
719
720 public static void unsetUserGroupUsers(long userGroupId, long[] userIds)
721 throws com.liferay.portal.PortalException,
722 com.liferay.portal.SystemException {
723 UserLocalService userLocalService = UserLocalServiceFactory.getService();
724
725 userLocalService.unsetUserGroupUsers(userGroupId, userIds);
726 }
727
728 public static com.liferay.portal.model.User updateActive(long userId,
729 boolean active)
730 throws com.liferay.portal.PortalException,
731 com.liferay.portal.SystemException {
732 UserLocalService userLocalService = UserLocalServiceFactory.getService();
733
734 return userLocalService.updateActive(userId, active);
735 }
736
737 public static com.liferay.portal.model.User updateAgreedToTermsOfUse(
738 long userId, boolean agreedToTermsOfUse)
739 throws com.liferay.portal.PortalException,
740 com.liferay.portal.SystemException {
741 UserLocalService userLocalService = UserLocalServiceFactory.getService();
742
743 return userLocalService.updateAgreedToTermsOfUse(userId,
744 agreedToTermsOfUse);
745 }
746
747 public static com.liferay.portal.model.User updateCreateDate(long userId,
748 java.util.Date createDate)
749 throws com.liferay.portal.PortalException,
750 com.liferay.portal.SystemException {
751 UserLocalService userLocalService = UserLocalServiceFactory.getService();
752
753 return userLocalService.updateCreateDate(userId, createDate);
754 }
755
756 public static com.liferay.portal.model.User updateLastLogin(long userId,
757 java.lang.String loginIP)
758 throws com.liferay.portal.PortalException,
759 com.liferay.portal.SystemException {
760 UserLocalService userLocalService = UserLocalServiceFactory.getService();
761
762 return userLocalService.updateLastLogin(userId, loginIP);
763 }
764
765 public static com.liferay.portal.model.User updateLockout(
766 com.liferay.portal.model.User user, boolean lockout)
767 throws com.liferay.portal.PortalException,
768 com.liferay.portal.SystemException {
769 UserLocalService userLocalService = UserLocalServiceFactory.getService();
770
771 return userLocalService.updateLockout(user, lockout);
772 }
773
774 public static com.liferay.portal.model.User updateLockoutByEmailAddress(
775 long companyId, java.lang.String emailAddress, boolean lockout)
776 throws com.liferay.portal.PortalException,
777 com.liferay.portal.SystemException {
778 UserLocalService userLocalService = UserLocalServiceFactory.getService();
779
780 return userLocalService.updateLockoutByEmailAddress(companyId,
781 emailAddress, lockout);
782 }
783
784 public static com.liferay.portal.model.User updateLockoutById(long userId,
785 boolean lockout)
786 throws com.liferay.portal.PortalException,
787 com.liferay.portal.SystemException {
788 UserLocalService userLocalService = UserLocalServiceFactory.getService();
789
790 return userLocalService.updateLockoutById(userId, lockout);
791 }
792
793 public static com.liferay.portal.model.User updateLockoutByScreenName(
794 long companyId, java.lang.String screenName, boolean lockout)
795 throws com.liferay.portal.PortalException,
796 com.liferay.portal.SystemException {
797 UserLocalService userLocalService = UserLocalServiceFactory.getService();
798
799 return userLocalService.updateLockoutByScreenName(companyId,
800 screenName, lockout);
801 }
802
803 public static com.liferay.portal.model.User updateModifiedDate(
804 long userId, java.util.Date modifiedDate)
805 throws com.liferay.portal.PortalException,
806 com.liferay.portal.SystemException {
807 UserLocalService userLocalService = UserLocalServiceFactory.getService();
808
809 return userLocalService.updateModifiedDate(userId, modifiedDate);
810 }
811
812 public static void updateOrganizations(long userId,
813 long[] newOrganizationIds)
814 throws com.liferay.portal.PortalException,
815 com.liferay.portal.SystemException {
816 UserLocalService userLocalService = UserLocalServiceFactory.getService();
817
818 userLocalService.updateOrganizations(userId, newOrganizationIds);
819 }
820
821 public static com.liferay.portal.model.User updatePassword(long userId,
822 java.lang.String password1, java.lang.String password2,
823 boolean passwordReset)
824 throws com.liferay.portal.PortalException,
825 com.liferay.portal.SystemException {
826 UserLocalService userLocalService = UserLocalServiceFactory.getService();
827
828 return userLocalService.updatePassword(userId, password1, password2,
829 passwordReset);
830 }
831
832 public static com.liferay.portal.model.User updatePassword(long userId,
833 java.lang.String password1, java.lang.String password2,
834 boolean passwordReset, boolean silentUpdate)
835 throws com.liferay.portal.PortalException,
836 com.liferay.portal.SystemException {
837 UserLocalService userLocalService = UserLocalServiceFactory.getService();
838
839 return userLocalService.updatePassword(userId, password1, password2,
840 passwordReset, silentUpdate);
841 }
842
843 public static com.liferay.portal.model.User updatePasswordManually(
844 long userId, java.lang.String password, boolean passwordEncrypted,
845 boolean passwordReset, java.util.Date passwordModifiedDate)
846 throws com.liferay.portal.PortalException,
847 com.liferay.portal.SystemException {
848 UserLocalService userLocalService = UserLocalServiceFactory.getService();
849
850 return userLocalService.updatePasswordManually(userId, password,
851 passwordEncrypted, passwordReset, passwordModifiedDate);
852 }
853
854 public static void updatePasswordReset(long userId, boolean passwordReset)
855 throws com.liferay.portal.PortalException,
856 com.liferay.portal.SystemException {
857 UserLocalService userLocalService = UserLocalServiceFactory.getService();
858
859 userLocalService.updatePasswordReset(userId, passwordReset);
860 }
861
862 public static void updatePortrait(long userId, byte[] bytes)
863 throws com.liferay.portal.PortalException,
864 com.liferay.portal.SystemException {
865 UserLocalService userLocalService = UserLocalServiceFactory.getService();
866
867 userLocalService.updatePortrait(userId, bytes);
868 }
869
870 public static void updateScreenName(long userId, java.lang.String screenName)
871 throws com.liferay.portal.PortalException,
872 com.liferay.portal.SystemException {
873 UserLocalService userLocalService = UserLocalServiceFactory.getService();
874
875 userLocalService.updateScreenName(userId, screenName);
876 }
877
878 public static com.liferay.portal.model.User updateUser(long userId,
879 java.lang.String oldPassword, boolean passwordReset,
880 java.lang.String screenName, java.lang.String emailAddress,
881 java.lang.String languageId, java.lang.String timeZoneId,
882 java.lang.String greeting, java.lang.String comments,
883 java.lang.String firstName, java.lang.String middleName,
884 java.lang.String lastName, int prefixId, int suffixId, boolean male,
885 int birthdayMonth, int birthdayDay, int birthdayYear,
886 java.lang.String smsSn, java.lang.String aimSn, java.lang.String icqSn,
887 java.lang.String jabberSn, java.lang.String msnSn,
888 java.lang.String skypeSn, java.lang.String ymSn,
889 java.lang.String jobTitle, long[] organizationIds)
890 throws com.liferay.portal.PortalException,
891 com.liferay.portal.SystemException {
892 UserLocalService userLocalService = UserLocalServiceFactory.getService();
893
894 return userLocalService.updateUser(userId, oldPassword, passwordReset,
895 screenName, emailAddress, languageId, timeZoneId, greeting,
896 comments, firstName, middleName, lastName, prefixId, suffixId,
897 male, birthdayMonth, birthdayDay, birthdayYear, smsSn, aimSn,
898 icqSn, jabberSn, msnSn, skypeSn, ymSn, jobTitle, organizationIds);
899 }
900
901 public static com.liferay.portal.model.User updateUser(long userId,
902 java.lang.String oldPassword, java.lang.String newPassword1,
903 java.lang.String newPassword2, boolean passwordReset,
904 java.lang.String screenName, java.lang.String emailAddress,
905 java.lang.String languageId, java.lang.String timeZoneId,
906 java.lang.String greeting, java.lang.String comments,
907 java.lang.String firstName, java.lang.String middleName,
908 java.lang.String lastName, int prefixId, int suffixId, boolean male,
909 int birthdayMonth, int birthdayDay, int birthdayYear,
910 java.lang.String smsSn, java.lang.String aimSn, java.lang.String icqSn,
911 java.lang.String jabberSn, java.lang.String msnSn,
912 java.lang.String skypeSn, java.lang.String ymSn,
913 java.lang.String jobTitle, long[] organizationIds)
914 throws com.liferay.portal.PortalException,
915 com.liferay.portal.SystemException {
916 UserLocalService userLocalService = UserLocalServiceFactory.getService();
917
918 return userLocalService.updateUser(userId, oldPassword, newPassword1,
919 newPassword2, passwordReset, screenName, emailAddress, languageId,
920 timeZoneId, greeting, comments, firstName, middleName, lastName,
921 prefixId, suffixId, male, birthdayMonth, birthdayDay, birthdayYear,
922 smsSn, aimSn, icqSn, jabberSn, msnSn, skypeSn, ymSn, jobTitle,
923 organizationIds);
924 }
925 }