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