001 /** 002 * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portal.service; 016 017 /** 018 * <p> 019 * This class is a wrapper for {@link UserLocalService}. 020 * </p> 021 * 022 * @author Brian Wing Shun Chan 023 * @see UserLocalService 024 * @generated 025 */ 026 public class UserLocalServiceWrapper implements UserLocalService, 027 ServiceWrapper<UserLocalService> { 028 public UserLocalServiceWrapper(UserLocalService userLocalService) { 029 _userLocalService = userLocalService; 030 } 031 032 /** 033 * Adds the user to the database. Also notifies the appropriate model listeners. 034 * 035 * @param user the user 036 * @return the user that was added 037 * @throws SystemException if a system exception occurred 038 */ 039 public com.liferay.portal.model.User addUser( 040 com.liferay.portal.model.User user) 041 throws com.liferay.portal.kernel.exception.SystemException { 042 return _userLocalService.addUser(user); 043 } 044 045 /** 046 * Creates a new user with the primary key. Does not add the user to the database. 047 * 048 * @param userId the primary key for the new user 049 * @return the new user 050 */ 051 public com.liferay.portal.model.User createUser(long userId) { 052 return _userLocalService.createUser(userId); 053 } 054 055 /** 056 * Deletes the user with the primary key from the database. Also notifies the appropriate model listeners. 057 * 058 * @param userId the primary key of the user 059 * @return the user that was removed 060 * @throws PortalException if a user with the primary key could not be found 061 * @throws SystemException if a system exception occurred 062 */ 063 public com.liferay.portal.model.User deleteUser(long userId) 064 throws com.liferay.portal.kernel.exception.PortalException, 065 com.liferay.portal.kernel.exception.SystemException { 066 return _userLocalService.deleteUser(userId); 067 } 068 069 /** 070 * Deletes the user from the database. Also notifies the appropriate model listeners. 071 * 072 * @param user the user 073 * @return the user that was removed 074 * @throws PortalException 075 * @throws SystemException if a system exception occurred 076 */ 077 public com.liferay.portal.model.User deleteUser( 078 com.liferay.portal.model.User user) 079 throws com.liferay.portal.kernel.exception.PortalException, 080 com.liferay.portal.kernel.exception.SystemException { 081 return _userLocalService.deleteUser(user); 082 } 083 084 public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { 085 return _userLocalService.dynamicQuery(); 086 } 087 088 /** 089 * Performs a dynamic query on the database and returns the matching rows. 090 * 091 * @param dynamicQuery the dynamic query 092 * @return the matching rows 093 * @throws SystemException if a system exception occurred 094 */ 095 @SuppressWarnings("rawtypes") 096 public java.util.List dynamicQuery( 097 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) 098 throws com.liferay.portal.kernel.exception.SystemException { 099 return _userLocalService.dynamicQuery(dynamicQuery); 100 } 101 102 /** 103 * Performs a dynamic query on the database and returns a range of the matching rows. 104 * 105 * <p> 106 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 107 * </p> 108 * 109 * @param dynamicQuery the dynamic query 110 * @param start the lower bound of the range of model instances 111 * @param end the upper bound of the range of model instances (not inclusive) 112 * @return the range of matching rows 113 * @throws SystemException if a system exception occurred 114 */ 115 @SuppressWarnings("rawtypes") 116 public java.util.List dynamicQuery( 117 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 118 int end) throws com.liferay.portal.kernel.exception.SystemException { 119 return _userLocalService.dynamicQuery(dynamicQuery, start, end); 120 } 121 122 /** 123 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 124 * 125 * <p> 126 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 127 * </p> 128 * 129 * @param dynamicQuery the dynamic query 130 * @param start the lower bound of the range of model instances 131 * @param end the upper bound of the range of model instances (not inclusive) 132 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 133 * @return the ordered range of matching rows 134 * @throws SystemException if a system exception occurred 135 */ 136 @SuppressWarnings("rawtypes") 137 public java.util.List dynamicQuery( 138 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 139 int end, 140 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 141 throws com.liferay.portal.kernel.exception.SystemException { 142 return _userLocalService.dynamicQuery(dynamicQuery, start, end, 143 orderByComparator); 144 } 145 146 /** 147 * Returns the number of rows that match the dynamic query. 148 * 149 * @param dynamicQuery the dynamic query 150 * @return the number of rows that match the dynamic query 151 * @throws SystemException if a system exception occurred 152 */ 153 public long dynamicQueryCount( 154 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) 155 throws com.liferay.portal.kernel.exception.SystemException { 156 return _userLocalService.dynamicQueryCount(dynamicQuery); 157 } 158 159 public com.liferay.portal.model.User fetchUser(long userId) 160 throws com.liferay.portal.kernel.exception.SystemException { 161 return _userLocalService.fetchUser(userId); 162 } 163 164 /** 165 * Returns the user with the primary key. 166 * 167 * @param userId the primary key of the user 168 * @return the user 169 * @throws PortalException if a user with the primary key could not be found 170 * @throws SystemException if a system exception occurred 171 */ 172 public com.liferay.portal.model.User getUser(long userId) 173 throws com.liferay.portal.kernel.exception.PortalException, 174 com.liferay.portal.kernel.exception.SystemException { 175 return _userLocalService.getUser(userId); 176 } 177 178 public com.liferay.portal.model.PersistedModel getPersistedModel( 179 java.io.Serializable primaryKeyObj) 180 throws com.liferay.portal.kernel.exception.PortalException, 181 com.liferay.portal.kernel.exception.SystemException { 182 return _userLocalService.getPersistedModel(primaryKeyObj); 183 } 184 185 /** 186 * Returns a range of all the users. 187 * 188 * <p> 189 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 190 * </p> 191 * 192 * @param start the lower bound of the range of users 193 * @param end the upper bound of the range of users (not inclusive) 194 * @return the range of users 195 * @throws SystemException if a system exception occurred 196 */ 197 public java.util.List<com.liferay.portal.model.User> getUsers(int start, 198 int end) throws com.liferay.portal.kernel.exception.SystemException { 199 return _userLocalService.getUsers(start, end); 200 } 201 202 /** 203 * Returns the number of users. 204 * 205 * @return the number of users 206 * @throws SystemException if a system exception occurred 207 */ 208 public int getUsersCount() 209 throws com.liferay.portal.kernel.exception.SystemException { 210 return _userLocalService.getUsersCount(); 211 } 212 213 /** 214 * Updates the user in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 215 * 216 * @param user the user 217 * @return the user that was updated 218 * @throws SystemException if a system exception occurred 219 */ 220 public com.liferay.portal.model.User updateUser( 221 com.liferay.portal.model.User user) 222 throws com.liferay.portal.kernel.exception.SystemException { 223 return _userLocalService.updateUser(user); 224 } 225 226 /** 227 * Updates the user in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 228 * 229 * @param user the user 230 * @param merge whether to merge the user with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation. 231 * @return the user that was updated 232 * @throws SystemException if a system exception occurred 233 */ 234 public com.liferay.portal.model.User updateUser( 235 com.liferay.portal.model.User user, boolean merge) 236 throws com.liferay.portal.kernel.exception.SystemException { 237 return _userLocalService.updateUser(user, merge); 238 } 239 240 /** 241 * @throws SystemException if a system exception occurred 242 */ 243 public void addGroupUser(long groupId, long userId) 244 throws com.liferay.portal.kernel.exception.SystemException { 245 _userLocalService.addGroupUser(groupId, userId); 246 } 247 248 /** 249 * @throws SystemException if a system exception occurred 250 */ 251 public void addGroupUser(long groupId, com.liferay.portal.model.User user) 252 throws com.liferay.portal.kernel.exception.SystemException { 253 _userLocalService.addGroupUser(groupId, user); 254 } 255 256 /** 257 * @throws PortalException 258 * @throws SystemException if a system exception occurred 259 */ 260 public void addGroupUsers(long groupId, long[] userIds) 261 throws com.liferay.portal.kernel.exception.PortalException, 262 com.liferay.portal.kernel.exception.SystemException { 263 _userLocalService.addGroupUsers(groupId, userIds); 264 } 265 266 /** 267 * @throws PortalException 268 * @throws SystemException if a system exception occurred 269 */ 270 public void addGroupUsers(long groupId, 271 java.util.List<com.liferay.portal.model.User> Users) 272 throws com.liferay.portal.kernel.exception.PortalException, 273 com.liferay.portal.kernel.exception.SystemException { 274 _userLocalService.addGroupUsers(groupId, Users); 275 } 276 277 /** 278 * @throws SystemException if a system exception occurred 279 */ 280 public void clearGroupUsers(long groupId) 281 throws com.liferay.portal.kernel.exception.SystemException { 282 _userLocalService.clearGroupUsers(groupId); 283 } 284 285 /** 286 * @throws SystemException if a system exception occurred 287 */ 288 public void deleteGroupUser(long groupId, long userId) 289 throws com.liferay.portal.kernel.exception.SystemException { 290 _userLocalService.deleteGroupUser(groupId, userId); 291 } 292 293 /** 294 * @throws SystemException if a system exception occurred 295 */ 296 public void deleteGroupUser(long groupId, com.liferay.portal.model.User user) 297 throws com.liferay.portal.kernel.exception.SystemException { 298 _userLocalService.deleteGroupUser(groupId, user); 299 } 300 301 /** 302 * @throws SystemException if a system exception occurred 303 */ 304 public void deleteGroupUsers(long groupId, long[] userIds) 305 throws com.liferay.portal.kernel.exception.SystemException { 306 _userLocalService.deleteGroupUsers(groupId, userIds); 307 } 308 309 /** 310 * @throws SystemException if a system exception occurred 311 */ 312 public void deleteGroupUsers(long groupId, 313 java.util.List<com.liferay.portal.model.User> Users) 314 throws com.liferay.portal.kernel.exception.SystemException { 315 _userLocalService.deleteGroupUsers(groupId, Users); 316 } 317 318 /** 319 * @throws SystemException if a system exception occurred 320 */ 321 public java.util.List<com.liferay.portal.model.User> getGroupUsers( 322 long groupId) 323 throws com.liferay.portal.kernel.exception.SystemException { 324 return _userLocalService.getGroupUsers(groupId); 325 } 326 327 /** 328 * @throws SystemException if a system exception occurred 329 */ 330 public java.util.List<com.liferay.portal.model.User> getGroupUsers( 331 long groupId, int start, int end) 332 throws com.liferay.portal.kernel.exception.SystemException { 333 return _userLocalService.getGroupUsers(groupId, start, end); 334 } 335 336 /** 337 * @throws SystemException if a system exception occurred 338 */ 339 public java.util.List<com.liferay.portal.model.User> getGroupUsers( 340 long groupId, int start, int end, 341 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 342 throws com.liferay.portal.kernel.exception.SystemException { 343 return _userLocalService.getGroupUsers(groupId, start, end, 344 orderByComparator); 345 } 346 347 /** 348 * @throws SystemException if a system exception occurred 349 */ 350 public int getGroupUsersCount(long groupId) 351 throws com.liferay.portal.kernel.exception.SystemException { 352 return _userLocalService.getGroupUsersCount(groupId); 353 } 354 355 /** 356 * @throws SystemException if a system exception occurred 357 */ 358 public boolean hasGroupUser(long groupId, long userId) 359 throws com.liferay.portal.kernel.exception.SystemException { 360 return _userLocalService.hasGroupUser(groupId, userId); 361 } 362 363 /** 364 * @throws SystemException if a system exception occurred 365 */ 366 public boolean hasGroupUsers(long groupId) 367 throws com.liferay.portal.kernel.exception.SystemException { 368 return _userLocalService.hasGroupUsers(groupId); 369 } 370 371 /** 372 * @throws SystemException if a system exception occurred 373 */ 374 public void setGroupUsers(long groupId, long[] userIds) 375 throws com.liferay.portal.kernel.exception.SystemException { 376 _userLocalService.setGroupUsers(groupId, userIds); 377 } 378 379 /** 380 * @throws SystemException if a system exception occurred 381 */ 382 public void addOrganizationUser(long organizationId, long userId) 383 throws com.liferay.portal.kernel.exception.SystemException { 384 _userLocalService.addOrganizationUser(organizationId, userId); 385 } 386 387 /** 388 * @throws SystemException if a system exception occurred 389 */ 390 public void addOrganizationUser(long organizationId, 391 com.liferay.portal.model.User user) 392 throws com.liferay.portal.kernel.exception.SystemException { 393 _userLocalService.addOrganizationUser(organizationId, user); 394 } 395 396 /** 397 * @throws PortalException 398 * @throws SystemException if a system exception occurred 399 */ 400 public void addOrganizationUsers(long organizationId, long[] userIds) 401 throws com.liferay.portal.kernel.exception.PortalException, 402 com.liferay.portal.kernel.exception.SystemException { 403 _userLocalService.addOrganizationUsers(organizationId, userIds); 404 } 405 406 /** 407 * @throws PortalException 408 * @throws SystemException if a system exception occurred 409 */ 410 public void addOrganizationUsers(long organizationId, 411 java.util.List<com.liferay.portal.model.User> Users) 412 throws com.liferay.portal.kernel.exception.PortalException, 413 com.liferay.portal.kernel.exception.SystemException { 414 _userLocalService.addOrganizationUsers(organizationId, Users); 415 } 416 417 /** 418 * @throws SystemException if a system exception occurred 419 */ 420 public void clearOrganizationUsers(long organizationId) 421 throws com.liferay.portal.kernel.exception.SystemException { 422 _userLocalService.clearOrganizationUsers(organizationId); 423 } 424 425 /** 426 * @throws SystemException if a system exception occurred 427 */ 428 public void deleteOrganizationUser(long organizationId, long userId) 429 throws com.liferay.portal.kernel.exception.SystemException { 430 _userLocalService.deleteOrganizationUser(organizationId, userId); 431 } 432 433 /** 434 * @throws SystemException if a system exception occurred 435 */ 436 public void deleteOrganizationUser(long organizationId, 437 com.liferay.portal.model.User user) 438 throws com.liferay.portal.kernel.exception.SystemException { 439 _userLocalService.deleteOrganizationUser(organizationId, user); 440 } 441 442 /** 443 * @throws SystemException if a system exception occurred 444 */ 445 public void deleteOrganizationUsers(long organizationId, long[] userIds) 446 throws com.liferay.portal.kernel.exception.SystemException { 447 _userLocalService.deleteOrganizationUsers(organizationId, userIds); 448 } 449 450 /** 451 * @throws SystemException if a system exception occurred 452 */ 453 public void deleteOrganizationUsers(long organizationId, 454 java.util.List<com.liferay.portal.model.User> Users) 455 throws com.liferay.portal.kernel.exception.SystemException { 456 _userLocalService.deleteOrganizationUsers(organizationId, Users); 457 } 458 459 /** 460 * @throws SystemException if a system exception occurred 461 */ 462 public java.util.List<com.liferay.portal.model.User> getOrganizationUsers( 463 long organizationId) 464 throws com.liferay.portal.kernel.exception.SystemException { 465 return _userLocalService.getOrganizationUsers(organizationId); 466 } 467 468 /** 469 * @throws SystemException if a system exception occurred 470 */ 471 public java.util.List<com.liferay.portal.model.User> getOrganizationUsers( 472 long organizationId, int start, int end) 473 throws com.liferay.portal.kernel.exception.SystemException { 474 return _userLocalService.getOrganizationUsers(organizationId, start, end); 475 } 476 477 /** 478 * @throws SystemException if a system exception occurred 479 */ 480 public java.util.List<com.liferay.portal.model.User> getOrganizationUsers( 481 long organizationId, int start, int end, 482 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 483 throws com.liferay.portal.kernel.exception.SystemException { 484 return _userLocalService.getOrganizationUsers(organizationId, start, 485 end, orderByComparator); 486 } 487 488 /** 489 * @throws SystemException if a system exception occurred 490 */ 491 public int getOrganizationUsersCount(long organizationId) 492 throws com.liferay.portal.kernel.exception.SystemException { 493 return _userLocalService.getOrganizationUsersCount(organizationId); 494 } 495 496 /** 497 * @throws SystemException if a system exception occurred 498 */ 499 public boolean hasOrganizationUser(long organizationId, long userId) 500 throws com.liferay.portal.kernel.exception.SystemException { 501 return _userLocalService.hasOrganizationUser(organizationId, userId); 502 } 503 504 /** 505 * @throws SystemException if a system exception occurred 506 */ 507 public boolean hasOrganizationUsers(long organizationId) 508 throws com.liferay.portal.kernel.exception.SystemException { 509 return _userLocalService.hasOrganizationUsers(organizationId); 510 } 511 512 /** 513 * @throws SystemException if a system exception occurred 514 */ 515 public void setOrganizationUsers(long organizationId, long[] userIds) 516 throws com.liferay.portal.kernel.exception.SystemException { 517 _userLocalService.setOrganizationUsers(organizationId, userIds); 518 } 519 520 /** 521 * @throws SystemException if a system exception occurred 522 */ 523 public void addPermissionUser(long permissionId, long userId) 524 throws com.liferay.portal.kernel.exception.SystemException { 525 _userLocalService.addPermissionUser(permissionId, userId); 526 } 527 528 /** 529 * @throws SystemException if a system exception occurred 530 */ 531 public void addPermissionUser(long permissionId, 532 com.liferay.portal.model.User user) 533 throws com.liferay.portal.kernel.exception.SystemException { 534 _userLocalService.addPermissionUser(permissionId, user); 535 } 536 537 /** 538 * @throws SystemException if a system exception occurred 539 */ 540 public void addPermissionUsers(long permissionId, long[] userIds) 541 throws com.liferay.portal.kernel.exception.SystemException { 542 _userLocalService.addPermissionUsers(permissionId, userIds); 543 } 544 545 /** 546 * @throws SystemException if a system exception occurred 547 */ 548 public void addPermissionUsers(long permissionId, 549 java.util.List<com.liferay.portal.model.User> Users) 550 throws com.liferay.portal.kernel.exception.SystemException { 551 _userLocalService.addPermissionUsers(permissionId, Users); 552 } 553 554 /** 555 * @throws SystemException if a system exception occurred 556 */ 557 public void clearPermissionUsers(long permissionId) 558 throws com.liferay.portal.kernel.exception.SystemException { 559 _userLocalService.clearPermissionUsers(permissionId); 560 } 561 562 /** 563 * @throws SystemException if a system exception occurred 564 */ 565 public void deletePermissionUser(long permissionId, long userId) 566 throws com.liferay.portal.kernel.exception.SystemException { 567 _userLocalService.deletePermissionUser(permissionId, userId); 568 } 569 570 /** 571 * @throws SystemException if a system exception occurred 572 */ 573 public void deletePermissionUser(long permissionId, 574 com.liferay.portal.model.User user) 575 throws com.liferay.portal.kernel.exception.SystemException { 576 _userLocalService.deletePermissionUser(permissionId, user); 577 } 578 579 /** 580 * @throws SystemException if a system exception occurred 581 */ 582 public void deletePermissionUsers(long permissionId, long[] userIds) 583 throws com.liferay.portal.kernel.exception.SystemException { 584 _userLocalService.deletePermissionUsers(permissionId, userIds); 585 } 586 587 /** 588 * @throws SystemException if a system exception occurred 589 */ 590 public void deletePermissionUsers(long permissionId, 591 java.util.List<com.liferay.portal.model.User> Users) 592 throws com.liferay.portal.kernel.exception.SystemException { 593 _userLocalService.deletePermissionUsers(permissionId, Users); 594 } 595 596 /** 597 * @throws SystemException if a system exception occurred 598 */ 599 public java.util.List<com.liferay.portal.model.User> getPermissionUsers( 600 long permissionId) 601 throws com.liferay.portal.kernel.exception.SystemException { 602 return _userLocalService.getPermissionUsers(permissionId); 603 } 604 605 /** 606 * @throws SystemException if a system exception occurred 607 */ 608 public java.util.List<com.liferay.portal.model.User> getPermissionUsers( 609 long permissionId, int start, int end) 610 throws com.liferay.portal.kernel.exception.SystemException { 611 return _userLocalService.getPermissionUsers(permissionId, start, end); 612 } 613 614 /** 615 * @throws SystemException if a system exception occurred 616 */ 617 public java.util.List<com.liferay.portal.model.User> getPermissionUsers( 618 long permissionId, int start, int end, 619 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 620 throws com.liferay.portal.kernel.exception.SystemException { 621 return _userLocalService.getPermissionUsers(permissionId, start, end, 622 orderByComparator); 623 } 624 625 /** 626 * @throws SystemException if a system exception occurred 627 */ 628 public int getPermissionUsersCount(long permissionId) 629 throws com.liferay.portal.kernel.exception.SystemException { 630 return _userLocalService.getPermissionUsersCount(permissionId); 631 } 632 633 /** 634 * @throws SystemException if a system exception occurred 635 */ 636 public boolean hasPermissionUser(long permissionId, long userId) 637 throws com.liferay.portal.kernel.exception.SystemException { 638 return _userLocalService.hasPermissionUser(permissionId, userId); 639 } 640 641 /** 642 * @throws SystemException if a system exception occurred 643 */ 644 public boolean hasPermissionUsers(long permissionId) 645 throws com.liferay.portal.kernel.exception.SystemException { 646 return _userLocalService.hasPermissionUsers(permissionId); 647 } 648 649 /** 650 * @throws SystemException if a system exception occurred 651 */ 652 public void setPermissionUsers(long permissionId, long[] userIds) 653 throws com.liferay.portal.kernel.exception.SystemException { 654 _userLocalService.setPermissionUsers(permissionId, userIds); 655 } 656 657 /** 658 * @throws SystemException if a system exception occurred 659 */ 660 public void addRoleUser(long roleId, long userId) 661 throws com.liferay.portal.kernel.exception.SystemException { 662 _userLocalService.addRoleUser(roleId, userId); 663 } 664 665 /** 666 * @throws SystemException if a system exception occurred 667 */ 668 public void addRoleUser(long roleId, com.liferay.portal.model.User user) 669 throws com.liferay.portal.kernel.exception.SystemException { 670 _userLocalService.addRoleUser(roleId, user); 671 } 672 673 /** 674 * @throws PortalException 675 * @throws SystemException if a system exception occurred 676 */ 677 public void addRoleUsers(long roleId, long[] userIds) 678 throws com.liferay.portal.kernel.exception.PortalException, 679 com.liferay.portal.kernel.exception.SystemException { 680 _userLocalService.addRoleUsers(roleId, userIds); 681 } 682 683 /** 684 * @throws PortalException 685 * @throws SystemException if a system exception occurred 686 */ 687 public void addRoleUsers(long roleId, 688 java.util.List<com.liferay.portal.model.User> Users) 689 throws com.liferay.portal.kernel.exception.PortalException, 690 com.liferay.portal.kernel.exception.SystemException { 691 _userLocalService.addRoleUsers(roleId, Users); 692 } 693 694 /** 695 * @throws SystemException if a system exception occurred 696 */ 697 public void clearRoleUsers(long roleId) 698 throws com.liferay.portal.kernel.exception.SystemException { 699 _userLocalService.clearRoleUsers(roleId); 700 } 701 702 /** 703 * @throws PortalException 704 * @throws SystemException if a system exception occurred 705 */ 706 public void deleteRoleUser(long roleId, long userId) 707 throws com.liferay.portal.kernel.exception.PortalException, 708 com.liferay.portal.kernel.exception.SystemException { 709 _userLocalService.deleteRoleUser(roleId, userId); 710 } 711 712 /** 713 * @throws PortalException 714 * @throws SystemException if a system exception occurred 715 */ 716 public void deleteRoleUser(long roleId, com.liferay.portal.model.User user) 717 throws com.liferay.portal.kernel.exception.PortalException, 718 com.liferay.portal.kernel.exception.SystemException { 719 _userLocalService.deleteRoleUser(roleId, user); 720 } 721 722 /** 723 * @throws SystemException if a system exception occurred 724 */ 725 public void deleteRoleUsers(long roleId, long[] userIds) 726 throws com.liferay.portal.kernel.exception.SystemException { 727 _userLocalService.deleteRoleUsers(roleId, userIds); 728 } 729 730 /** 731 * @throws SystemException if a system exception occurred 732 */ 733 public void deleteRoleUsers(long roleId, 734 java.util.List<com.liferay.portal.model.User> Users) 735 throws com.liferay.portal.kernel.exception.SystemException { 736 _userLocalService.deleteRoleUsers(roleId, Users); 737 } 738 739 /** 740 * @throws SystemException if a system exception occurred 741 */ 742 public java.util.List<com.liferay.portal.model.User> getRoleUsers( 743 long roleId) throws com.liferay.portal.kernel.exception.SystemException { 744 return _userLocalService.getRoleUsers(roleId); 745 } 746 747 /** 748 * @throws SystemException if a system exception occurred 749 */ 750 public java.util.List<com.liferay.portal.model.User> getRoleUsers( 751 long roleId, int start, int end) 752 throws com.liferay.portal.kernel.exception.SystemException { 753 return _userLocalService.getRoleUsers(roleId, start, end); 754 } 755 756 /** 757 * @throws SystemException if a system exception occurred 758 */ 759 public java.util.List<com.liferay.portal.model.User> getRoleUsers( 760 long roleId, int start, int end, 761 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 762 throws com.liferay.portal.kernel.exception.SystemException { 763 return _userLocalService.getRoleUsers(roleId, start, end, 764 orderByComparator); 765 } 766 767 /** 768 * @throws SystemException if a system exception occurred 769 */ 770 public int getRoleUsersCount(long roleId) 771 throws com.liferay.portal.kernel.exception.SystemException { 772 return _userLocalService.getRoleUsersCount(roleId); 773 } 774 775 /** 776 * @throws SystemException if a system exception occurred 777 */ 778 public boolean hasRoleUser(long roleId, long userId) 779 throws com.liferay.portal.kernel.exception.SystemException { 780 return _userLocalService.hasRoleUser(roleId, userId); 781 } 782 783 /** 784 * @throws SystemException if a system exception occurred 785 */ 786 public boolean hasRoleUsers(long roleId) 787 throws com.liferay.portal.kernel.exception.SystemException { 788 return _userLocalService.hasRoleUsers(roleId); 789 } 790 791 /** 792 * @throws PortalException 793 * @throws SystemException if a system exception occurred 794 */ 795 public void setRoleUsers(long roleId, long[] userIds) 796 throws com.liferay.portal.kernel.exception.PortalException, 797 com.liferay.portal.kernel.exception.SystemException { 798 _userLocalService.setRoleUsers(roleId, userIds); 799 } 800 801 /** 802 * @throws SystemException if a system exception occurred 803 */ 804 public void addTeamUser(long teamId, long userId) 805 throws com.liferay.portal.kernel.exception.SystemException { 806 _userLocalService.addTeamUser(teamId, userId); 807 } 808 809 /** 810 * @throws SystemException if a system exception occurred 811 */ 812 public void addTeamUser(long teamId, com.liferay.portal.model.User user) 813 throws com.liferay.portal.kernel.exception.SystemException { 814 _userLocalService.addTeamUser(teamId, user); 815 } 816 817 /** 818 * @throws PortalException 819 * @throws SystemException if a system exception occurred 820 */ 821 public void addTeamUsers(long teamId, long[] userIds) 822 throws com.liferay.portal.kernel.exception.PortalException, 823 com.liferay.portal.kernel.exception.SystemException { 824 _userLocalService.addTeamUsers(teamId, userIds); 825 } 826 827 /** 828 * @throws PortalException 829 * @throws SystemException if a system exception occurred 830 */ 831 public void addTeamUsers(long teamId, 832 java.util.List<com.liferay.portal.model.User> Users) 833 throws com.liferay.portal.kernel.exception.PortalException, 834 com.liferay.portal.kernel.exception.SystemException { 835 _userLocalService.addTeamUsers(teamId, Users); 836 } 837 838 /** 839 * @throws SystemException if a system exception occurred 840 */ 841 public void clearTeamUsers(long teamId) 842 throws com.liferay.portal.kernel.exception.SystemException { 843 _userLocalService.clearTeamUsers(teamId); 844 } 845 846 /** 847 * @throws SystemException if a system exception occurred 848 */ 849 public void deleteTeamUser(long teamId, long userId) 850 throws com.liferay.portal.kernel.exception.SystemException { 851 _userLocalService.deleteTeamUser(teamId, userId); 852 } 853 854 /** 855 * @throws SystemException if a system exception occurred 856 */ 857 public void deleteTeamUser(long teamId, com.liferay.portal.model.User user) 858 throws com.liferay.portal.kernel.exception.SystemException { 859 _userLocalService.deleteTeamUser(teamId, user); 860 } 861 862 /** 863 * @throws SystemException if a system exception occurred 864 */ 865 public void deleteTeamUsers(long teamId, long[] userIds) 866 throws com.liferay.portal.kernel.exception.SystemException { 867 _userLocalService.deleteTeamUsers(teamId, userIds); 868 } 869 870 /** 871 * @throws SystemException if a system exception occurred 872 */ 873 public void deleteTeamUsers(long teamId, 874 java.util.List<com.liferay.portal.model.User> Users) 875 throws com.liferay.portal.kernel.exception.SystemException { 876 _userLocalService.deleteTeamUsers(teamId, Users); 877 } 878 879 /** 880 * @throws SystemException if a system exception occurred 881 */ 882 public java.util.List<com.liferay.portal.model.User> getTeamUsers( 883 long teamId) throws com.liferay.portal.kernel.exception.SystemException { 884 return _userLocalService.getTeamUsers(teamId); 885 } 886 887 /** 888 * @throws SystemException if a system exception occurred 889 */ 890 public java.util.List<com.liferay.portal.model.User> getTeamUsers( 891 long teamId, int start, int end) 892 throws com.liferay.portal.kernel.exception.SystemException { 893 return _userLocalService.getTeamUsers(teamId, start, end); 894 } 895 896 /** 897 * @throws SystemException if a system exception occurred 898 */ 899 public java.util.List<com.liferay.portal.model.User> getTeamUsers( 900 long teamId, int start, int end, 901 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 902 throws com.liferay.portal.kernel.exception.SystemException { 903 return _userLocalService.getTeamUsers(teamId, start, end, 904 orderByComparator); 905 } 906 907 /** 908 * @throws SystemException if a system exception occurred 909 */ 910 public int getTeamUsersCount(long teamId) 911 throws com.liferay.portal.kernel.exception.SystemException { 912 return _userLocalService.getTeamUsersCount(teamId); 913 } 914 915 /** 916 * @throws SystemException if a system exception occurred 917 */ 918 public boolean hasTeamUser(long teamId, long userId) 919 throws com.liferay.portal.kernel.exception.SystemException { 920 return _userLocalService.hasTeamUser(teamId, userId); 921 } 922 923 /** 924 * @throws SystemException if a system exception occurred 925 */ 926 public boolean hasTeamUsers(long teamId) 927 throws com.liferay.portal.kernel.exception.SystemException { 928 return _userLocalService.hasTeamUsers(teamId); 929 } 930 931 /** 932 * @throws SystemException if a system exception occurred 933 */ 934 public void setTeamUsers(long teamId, long[] userIds) 935 throws com.liferay.portal.kernel.exception.SystemException { 936 _userLocalService.setTeamUsers(teamId, userIds); 937 } 938 939 /** 940 * @throws SystemException if a system exception occurred 941 */ 942 public void addUserGroupUser(long userGroupId, long userId) 943 throws com.liferay.portal.kernel.exception.SystemException { 944 _userLocalService.addUserGroupUser(userGroupId, userId); 945 } 946 947 /** 948 * @throws SystemException if a system exception occurred 949 */ 950 public void addUserGroupUser(long userGroupId, 951 com.liferay.portal.model.User user) 952 throws com.liferay.portal.kernel.exception.SystemException { 953 _userLocalService.addUserGroupUser(userGroupId, user); 954 } 955 956 /** 957 * @throws PortalException 958 * @throws SystemException if a system exception occurred 959 */ 960 public void addUserGroupUsers(long userGroupId, long[] userIds) 961 throws com.liferay.portal.kernel.exception.PortalException, 962 com.liferay.portal.kernel.exception.SystemException { 963 _userLocalService.addUserGroupUsers(userGroupId, userIds); 964 } 965 966 /** 967 * @throws PortalException 968 * @throws SystemException if a system exception occurred 969 */ 970 public void addUserGroupUsers(long userGroupId, 971 java.util.List<com.liferay.portal.model.User> Users) 972 throws com.liferay.portal.kernel.exception.PortalException, 973 com.liferay.portal.kernel.exception.SystemException { 974 _userLocalService.addUserGroupUsers(userGroupId, Users); 975 } 976 977 /** 978 * @throws SystemException if a system exception occurred 979 */ 980 public void clearUserGroupUsers(long userGroupId) 981 throws com.liferay.portal.kernel.exception.SystemException { 982 _userLocalService.clearUserGroupUsers(userGroupId); 983 } 984 985 /** 986 * @throws PortalException 987 * @throws SystemException if a system exception occurred 988 */ 989 public void deleteUserGroupUser(long userGroupId, long userId) 990 throws com.liferay.portal.kernel.exception.PortalException, 991 com.liferay.portal.kernel.exception.SystemException { 992 _userLocalService.deleteUserGroupUser(userGroupId, userId); 993 } 994 995 /** 996 * @throws PortalException 997 * @throws SystemException if a system exception occurred 998 */ 999 public void deleteUserGroupUser(long userGroupId, 1000 com.liferay.portal.model.User user) 1001 throws com.liferay.portal.kernel.exception.PortalException, 1002 com.liferay.portal.kernel.exception.SystemException { 1003 _userLocalService.deleteUserGroupUser(userGroupId, user); 1004 } 1005 1006 /** 1007 * @throws SystemException if a system exception occurred 1008 */ 1009 public void deleteUserGroupUsers(long userGroupId, long[] userIds) 1010 throws com.liferay.portal.kernel.exception.SystemException { 1011 _userLocalService.deleteUserGroupUsers(userGroupId, userIds); 1012 } 1013 1014 /** 1015 * @throws SystemException if a system exception occurred 1016 */ 1017 public void deleteUserGroupUsers(long userGroupId, 1018 java.util.List<com.liferay.portal.model.User> Users) 1019 throws com.liferay.portal.kernel.exception.SystemException { 1020 _userLocalService.deleteUserGroupUsers(userGroupId, Users); 1021 } 1022 1023 /** 1024 * @throws SystemException if a system exception occurred 1025 */ 1026 public java.util.List<com.liferay.portal.model.User> getUserGroupUsers( 1027 long userGroupId) 1028 throws com.liferay.portal.kernel.exception.SystemException { 1029 return _userLocalService.getUserGroupUsers(userGroupId); 1030 } 1031 1032 /** 1033 * @throws SystemException if a system exception occurred 1034 */ 1035 public java.util.List<com.liferay.portal.model.User> getUserGroupUsers( 1036 long userGroupId, int start, int end) 1037 throws com.liferay.portal.kernel.exception.SystemException { 1038 return _userLocalService.getUserGroupUsers(userGroupId, start, end); 1039 } 1040 1041 /** 1042 * @throws SystemException if a system exception occurred 1043 */ 1044 public java.util.List<com.liferay.portal.model.User> getUserGroupUsers( 1045 long userGroupId, int start, int end, 1046 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1047 throws com.liferay.portal.kernel.exception.SystemException { 1048 return _userLocalService.getUserGroupUsers(userGroupId, start, end, 1049 orderByComparator); 1050 } 1051 1052 /** 1053 * @throws SystemException if a system exception occurred 1054 */ 1055 public int getUserGroupUsersCount(long userGroupId) 1056 throws com.liferay.portal.kernel.exception.SystemException { 1057 return _userLocalService.getUserGroupUsersCount(userGroupId); 1058 } 1059 1060 /** 1061 * @throws SystemException if a system exception occurred 1062 */ 1063 public boolean hasUserGroupUser(long userGroupId, long userId) 1064 throws com.liferay.portal.kernel.exception.SystemException { 1065 return _userLocalService.hasUserGroupUser(userGroupId, userId); 1066 } 1067 1068 /** 1069 * @throws SystemException if a system exception occurred 1070 */ 1071 public boolean hasUserGroupUsers(long userGroupId) 1072 throws com.liferay.portal.kernel.exception.SystemException { 1073 return _userLocalService.hasUserGroupUsers(userGroupId); 1074 } 1075 1076 /** 1077 * @throws PortalException 1078 * @throws SystemException if a system exception occurred 1079 */ 1080 public void setUserGroupUsers(long userGroupId, long[] userIds) 1081 throws com.liferay.portal.kernel.exception.PortalException, 1082 com.liferay.portal.kernel.exception.SystemException { 1083 _userLocalService.setUserGroupUsers(userGroupId, userIds); 1084 } 1085 1086 /** 1087 * Returns the Spring bean ID for this bean. 1088 * 1089 * @return the Spring bean ID for this bean 1090 */ 1091 public java.lang.String getBeanIdentifier() { 1092 return _userLocalService.getBeanIdentifier(); 1093 } 1094 1095 /** 1096 * Sets the Spring bean ID for this bean. 1097 * 1098 * @param beanIdentifier the Spring bean ID for this bean 1099 */ 1100 public void setBeanIdentifier(java.lang.String beanIdentifier) { 1101 _userLocalService.setBeanIdentifier(beanIdentifier); 1102 } 1103 1104 public com.liferay.portal.model.User addDefaultAdminUser(long companyId, 1105 java.lang.String screenName, java.lang.String emailAddress, 1106 java.util.Locale locale, java.lang.String firstName, 1107 java.lang.String middleName, java.lang.String lastName) 1108 throws com.liferay.portal.kernel.exception.PortalException, 1109 com.liferay.portal.kernel.exception.SystemException { 1110 return _userLocalService.addDefaultAdminUser(companyId, screenName, 1111 emailAddress, locale, firstName, middleName, lastName); 1112 } 1113 1114 /** 1115 * Adds the user to the default groups, unless the user is already in these 1116 * groups. The default groups can be specified in 1117 * <code>portal.properties</code> with the key 1118 * <code>admin.default.group.names</code>. 1119 * 1120 * @param userId the primary key of the user 1121 * @throws PortalException if a user with the primary key could not be found 1122 * @throws SystemException if a system exception occurred 1123 */ 1124 public void addDefaultGroups(long userId) 1125 throws com.liferay.portal.kernel.exception.PortalException, 1126 com.liferay.portal.kernel.exception.SystemException { 1127 _userLocalService.addDefaultGroups(userId); 1128 } 1129 1130 /** 1131 * Adds the user to the default roles, unless the user already has these 1132 * roles. The default roles can be specified in 1133 * <code>portal.properties</code> with the key 1134 * <code>admin.default.role.names</code>. 1135 * 1136 * @param userId the primary key of the user 1137 * @throws PortalException if a user with the primary key could not be found 1138 * @throws SystemException if a system exception occurred 1139 */ 1140 public void addDefaultRoles(long userId) 1141 throws com.liferay.portal.kernel.exception.PortalException, 1142 com.liferay.portal.kernel.exception.SystemException { 1143 _userLocalService.addDefaultRoles(userId); 1144 } 1145 1146 /** 1147 * Adds the user to the default user groups, unless the user is already in 1148 * these user groups. The default user groups can be specified in 1149 * <code>portal.properties</code> with the property 1150 * <code>admin.default.user.group.names</code>. 1151 * 1152 * @param userId the primary key of the user 1153 * @throws PortalException if a user with the primary key could not be found 1154 * @throws SystemException if a system exception occurred 1155 */ 1156 public void addDefaultUserGroups(long userId) 1157 throws com.liferay.portal.kernel.exception.PortalException, 1158 com.liferay.portal.kernel.exception.SystemException { 1159 _userLocalService.addDefaultUserGroups(userId); 1160 } 1161 1162 /** 1163 * Assigns the password policy to the users, removing any other currently 1164 * assigned password policies. 1165 * 1166 * @param passwordPolicyId the primary key of the password policy 1167 * @param userIds the primary keys of the users 1168 * @throws SystemException if a system exception occurred 1169 */ 1170 public void addPasswordPolicyUsers(long passwordPolicyId, long[] userIds) 1171 throws com.liferay.portal.kernel.exception.SystemException { 1172 _userLocalService.addPasswordPolicyUsers(passwordPolicyId, userIds); 1173 } 1174 1175 /** 1176 * Adds a user. 1177 * 1178 * <p> 1179 * This method handles the creation and bookkeeping of the user including 1180 * its resources, metadata, and internal data structures. It is not 1181 * necessary to make subsequent calls to any methods to setup default 1182 * groups, resources, etc. 1183 * </p> 1184 * 1185 * @param creatorUserId the primary key of the creator 1186 * @param companyId the primary key of the user's company 1187 * @param autoPassword whether a password should be automatically generated 1188 for the user 1189 * @param password1 the user's password 1190 * @param password2 the user's password confirmation 1191 * @param autoScreenName whether a screen name should be automatically 1192 generated for the user 1193 * @param screenName the user's screen name 1194 * @param emailAddress the user's email address 1195 * @param facebookId the user's facebook ID 1196 * @param openId the user's OpenID 1197 * @param locale the user's locale 1198 * @param firstName the user's first name 1199 * @param middleName the user's middle name 1200 * @param lastName the user's last name 1201 * @param prefixId the user's name prefix ID 1202 * @param suffixId the user's name suffix ID 1203 * @param male whether the user is male 1204 * @param birthdayMonth the user's birthday month (0-based, meaning 0 for 1205 January) 1206 * @param birthdayDay the user's birthday day 1207 * @param birthdayYear the user's birthday year 1208 * @param jobTitle the user's job title 1209 * @param groupIds the primary keys of the user's groups 1210 * @param organizationIds the primary keys of the user's organizations 1211 * @param roleIds the primary keys of the roles this user possesses 1212 * @param userGroupIds the primary keys of the user's user groups 1213 * @param sendEmail whether to send the user an email notification about 1214 their new account 1215 * @param serviceContext the user's service context (optionally 1216 <code>null</code>). Can set the universally unique identifier 1217 (with the <code>uuid</code> attribute), asset category IDs, asset 1218 tag names, and expando bridge attributes for the user. 1219 * @return the new user 1220 * @throws PortalException if the user's information was invalid 1221 * @throws SystemException if a system exception occurred 1222 */ 1223 public com.liferay.portal.model.User addUser(long creatorUserId, 1224 long companyId, boolean autoPassword, java.lang.String password1, 1225 java.lang.String password2, boolean autoScreenName, 1226 java.lang.String screenName, java.lang.String emailAddress, 1227 long facebookId, java.lang.String openId, java.util.Locale locale, 1228 java.lang.String firstName, java.lang.String middleName, 1229 java.lang.String lastName, int prefixId, int suffixId, boolean male, 1230 int birthdayMonth, int birthdayDay, int birthdayYear, 1231 java.lang.String jobTitle, long[] groupIds, long[] organizationIds, 1232 long[] roleIds, long[] userGroupIds, boolean sendEmail, 1233 com.liferay.portal.service.ServiceContext serviceContext) 1234 throws com.liferay.portal.kernel.exception.PortalException, 1235 com.liferay.portal.kernel.exception.SystemException { 1236 return _userLocalService.addUser(creatorUserId, companyId, 1237 autoPassword, password1, password2, autoScreenName, screenName, 1238 emailAddress, facebookId, openId, locale, firstName, middleName, 1239 lastName, prefixId, suffixId, male, birthdayMonth, birthdayDay, 1240 birthdayYear, jobTitle, groupIds, organizationIds, roleIds, 1241 userGroupIds, sendEmail, serviceContext); 1242 } 1243 1244 /** 1245 * Adds a user with workflow. 1246 * 1247 * <p> 1248 * This method handles the creation and bookkeeping of the user including 1249 * its resources, metadata, and internal data structures. It is not 1250 * necessary to make subsequent calls to any methods to setup default 1251 * groups, resources, etc. 1252 * </p> 1253 * 1254 * @param creatorUserId the primary key of the creator 1255 * @param companyId the primary key of the user's company 1256 * @param autoPassword whether a password should be automatically generated 1257 for the user 1258 * @param password1 the user's password 1259 * @param password2 the user's password confirmation 1260 * @param autoScreenName whether a screen name should be automatically 1261 generated for the user 1262 * @param screenName the user's screen name 1263 * @param emailAddress the user's email address 1264 * @param facebookId the user's facebook ID 1265 * @param openId the user's OpenID 1266 * @param locale the user's locale 1267 * @param firstName the user's first name 1268 * @param middleName the user's middle name 1269 * @param lastName the user's last name 1270 * @param prefixId the user's name prefix ID 1271 * @param suffixId the user's name suffix ID 1272 * @param male whether the user is male 1273 * @param birthdayMonth the user's birthday month (0-based, meaning 0 for 1274 January) 1275 * @param birthdayDay the user's birthday day 1276 * @param birthdayYear the user's birthday year 1277 * @param jobTitle the user's job title 1278 * @param groupIds the primary keys of the user's groups 1279 * @param organizationIds the primary keys of the user's organizations 1280 * @param roleIds the primary keys of the roles this user possesses 1281 * @param userGroupIds the primary keys of the user's user groups 1282 * @param sendEmail whether to send the user an email notification about 1283 their new account 1284 * @param serviceContext the user's service context (optionally 1285 <code>null</code>). Can set the universally unique identifier 1286 (with the <code>uuid</code> attribute), asset category IDs, asset 1287 tag names, and expando bridge attributes for the user. 1288 * @return the new user 1289 * @throws PortalException if the user's information was invalid 1290 * @throws SystemException if a system exception occurred 1291 */ 1292 public com.liferay.portal.model.User addUserWithWorkflow( 1293 long creatorUserId, long companyId, boolean autoPassword, 1294 java.lang.String password1, java.lang.String password2, 1295 boolean autoScreenName, java.lang.String screenName, 1296 java.lang.String emailAddress, long facebookId, 1297 java.lang.String openId, java.util.Locale locale, 1298 java.lang.String firstName, java.lang.String middleName, 1299 java.lang.String lastName, int prefixId, int suffixId, boolean male, 1300 int birthdayMonth, int birthdayDay, int birthdayYear, 1301 java.lang.String jobTitle, long[] groupIds, long[] organizationIds, 1302 long[] roleIds, long[] userGroupIds, boolean sendEmail, 1303 com.liferay.portal.service.ServiceContext serviceContext) 1304 throws com.liferay.portal.kernel.exception.PortalException, 1305 com.liferay.portal.kernel.exception.SystemException { 1306 return _userLocalService.addUserWithWorkflow(creatorUserId, companyId, 1307 autoPassword, password1, password2, autoScreenName, screenName, 1308 emailAddress, facebookId, openId, locale, firstName, middleName, 1309 lastName, prefixId, suffixId, male, birthdayMonth, birthdayDay, 1310 birthdayYear, jobTitle, groupIds, organizationIds, roleIds, 1311 userGroupIds, sendEmail, serviceContext); 1312 } 1313 1314 /** 1315 * Attempts to authenticate the user by their email address and password, 1316 * while using the AuthPipeline. 1317 * 1318 * @param companyId the primary key of the user's company 1319 * @param emailAddress the user's email address 1320 * @param password the user's password 1321 * @param headerMap the header map from the authentication request 1322 * @param parameterMap the parameter map from the authentication request 1323 * @param resultsMap the map of authentication results (may be nil). After 1324 a succesful authentication the user's primary key will be placed 1325 under the key <code>userId</code>. 1326 * @return the authentication status. This can be {@link 1327 com.liferay.portal.security.auth.Authenticator#FAILURE} 1328 indicating that the user's credentials are invalid, {@link 1329 com.liferay.portal.security.auth.Authenticator#SUCCESS} 1330 indicating a successful login, or {@link 1331 com.liferay.portal.security.auth.Authenticator#DNE} indicating 1332 that a user with that login does not exist. 1333 * @throws PortalException if <code>emailAddress</code> or 1334 <code>password</code> was <code>null</code> 1335 * @throws SystemException if a system exception occurred 1336 * @see com.liferay.portal.security.auth.AuthPipeline 1337 */ 1338 public int authenticateByEmailAddress(long companyId, 1339 java.lang.String emailAddress, java.lang.String password, 1340 java.util.Map<java.lang.String, java.lang.String[]> headerMap, 1341 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 1342 java.util.Map<java.lang.String, java.lang.Object> resultsMap) 1343 throws com.liferay.portal.kernel.exception.PortalException, 1344 com.liferay.portal.kernel.exception.SystemException { 1345 return _userLocalService.authenticateByEmailAddress(companyId, 1346 emailAddress, password, headerMap, parameterMap, resultsMap); 1347 } 1348 1349 /** 1350 * Attempts to authenticate the user by their screen name and password, 1351 * while using the AuthPipeline. 1352 * 1353 * @param companyId the primary key of the user's company 1354 * @param screenName the user's screen name 1355 * @param password the user's password 1356 * @param headerMap the header map from the authentication request 1357 * @param parameterMap the parameter map from the authentication request 1358 * @param resultsMap the map of authentication results (may be nil). After 1359 a succesful authentication the user's primary key will be placed 1360 under the key <code>userId</code>. 1361 * @return the authentication status. This can be {@link 1362 com.liferay.portal.security.auth.Authenticator#FAILURE} 1363 indicating that the user's credentials are invalid, {@link 1364 com.liferay.portal.security.auth.Authenticator#SUCCESS} 1365 indicating a successful login, or {@link 1366 com.liferay.portal.security.auth.Authenticator#DNE} indicating 1367 that a user with that login does not exist. 1368 * @throws PortalException if <code>screenName</code> or 1369 <code>password</code> was <code>null</code> 1370 * @throws SystemException if a system exception occurred 1371 * @see com.liferay.portal.security.auth.AuthPipeline 1372 */ 1373 public int authenticateByScreenName(long companyId, 1374 java.lang.String screenName, java.lang.String password, 1375 java.util.Map<java.lang.String, java.lang.String[]> headerMap, 1376 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 1377 java.util.Map<java.lang.String, java.lang.Object> resultsMap) 1378 throws com.liferay.portal.kernel.exception.PortalException, 1379 com.liferay.portal.kernel.exception.SystemException { 1380 return _userLocalService.authenticateByScreenName(companyId, 1381 screenName, password, headerMap, parameterMap, resultsMap); 1382 } 1383 1384 /** 1385 * Attempts to authenticate the user by their primary key and password, 1386 * while using the AuthPipeline. 1387 * 1388 * @param companyId the primary key of the user's company 1389 * @param userId the user's primary key 1390 * @param password the user's password 1391 * @param headerMap the header map from the authentication request 1392 * @param parameterMap the parameter map from the authentication request 1393 * @param resultsMap the map of authentication results (may be nil). After 1394 a succesful authentication the user's primary key will be placed 1395 under the key <code>userId</code>. 1396 * @return the authentication status. This can be {@link 1397 com.liferay.portal.security.auth.Authenticator#FAILURE} 1398 indicating that the user's credentials are invalid, {@link 1399 com.liferay.portal.security.auth.Authenticator#SUCCESS} 1400 indicating a successful login, or {@link 1401 com.liferay.portal.security.auth.Authenticator#DNE} indicating 1402 that a user with that login does not exist. 1403 * @throws PortalException if <code>userId</code> or <code>password</code> 1404 was <code>null</code> 1405 * @throws SystemException if a system exception occurred 1406 * @see com.liferay.portal.security.auth.AuthPipeline 1407 */ 1408 public int authenticateByUserId(long companyId, long userId, 1409 java.lang.String password, 1410 java.util.Map<java.lang.String, java.lang.String[]> headerMap, 1411 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 1412 java.util.Map<java.lang.String, java.lang.Object> resultsMap) 1413 throws com.liferay.portal.kernel.exception.PortalException, 1414 com.liferay.portal.kernel.exception.SystemException { 1415 return _userLocalService.authenticateByUserId(companyId, userId, 1416 password, headerMap, parameterMap, resultsMap); 1417 } 1418 1419 /** 1420 * Attempts to authenticate the user using HTTP basic access authentication, 1421 * without using the AuthPipeline. Primarily used for authenticating users 1422 * of <code>tunnel-web</code>. 1423 * 1424 * <p> 1425 * Authentication type specifies what <code>login</code> contains.The valid 1426 * values are: 1427 * </p> 1428 * 1429 * <ul> 1430 * <li> 1431 * <code>CompanyConstants.AUTH_TYPE_EA</code> - <code>login</code> is the 1432 * user's email address 1433 * </li> 1434 * <li> 1435 * <code>CompanyConstants.AUTH_TYPE_SN</code> - <code>login</code> is the 1436 * user's screen name 1437 * </li> 1438 * <li> 1439 * <code>CompanyConstants.AUTH_TYPE_ID</code> - <code>login</code> is the 1440 * user's primary key 1441 * </li> 1442 * </ul> 1443 * 1444 * @param companyId the primary key of the user's company 1445 * @param authType the type of authentication to perform 1446 * @param login either the user's email address, screen name, or primary 1447 key depending on the value of <code>authType</code> 1448 * @param password the user's password 1449 * @return the authentication status. This can be {@link 1450 com.liferay.portal.security.auth.Authenticator#FAILURE} 1451 indicating that the user's credentials are invalid, {@link 1452 com.liferay.portal.security.auth.Authenticator#SUCCESS} 1453 indicating a successful login, or {@link 1454 com.liferay.portal.security.auth.Authenticator#DNE} indicating 1455 that a user with that login does not exist. 1456 * @throws PortalException if a portal exception occurred 1457 * @throws SystemException if a system exception occurred 1458 */ 1459 public long authenticateForBasic(long companyId, java.lang.String authType, 1460 java.lang.String login, java.lang.String password) 1461 throws com.liferay.portal.kernel.exception.PortalException, 1462 com.liferay.portal.kernel.exception.SystemException { 1463 return _userLocalService.authenticateForBasic(companyId, authType, 1464 login, password); 1465 } 1466 1467 /** 1468 * Attempts to authenticate the user using HTTP digest access 1469 * authentication, without using the AuthPipeline. Primarily used for 1470 * authenticating users of <code>tunnel-web</code>. 1471 * 1472 * @param companyId the primary key of the user's company 1473 * @param username either the user's email address, screen name, or primary 1474 key 1475 * @param realm unused 1476 * @param nonce the number used once 1477 * @param method the request method 1478 * @param uri the request URI 1479 * @param response the authentication response hash 1480 * @return the user's primary key if authentication is succesful; 1481 <code>0</code> otherwise 1482 * @throws PortalException if a portal exception occurred 1483 * @throws SystemException if a system exception occurred 1484 */ 1485 public long authenticateForDigest(long companyId, 1486 java.lang.String username, java.lang.String realm, 1487 java.lang.String nonce, java.lang.String method, java.lang.String uri, 1488 java.lang.String response) 1489 throws com.liferay.portal.kernel.exception.PortalException, 1490 com.liferay.portal.kernel.exception.SystemException { 1491 return _userLocalService.authenticateForDigest(companyId, username, 1492 realm, nonce, method, uri, response); 1493 } 1494 1495 /** 1496 * Attempts to authenticate the user using JAAS credentials, without using 1497 * the AuthPipeline. 1498 * 1499 * @param userId the primary key of the user 1500 * @param encPassword the encrypted password 1501 * @return <code>true</code> if authentication is successful; 1502 <code>false</code> otherwise 1503 */ 1504 public boolean authenticateForJAAS(long userId, java.lang.String encPassword) { 1505 return _userLocalService.authenticateForJAAS(userId, encPassword); 1506 } 1507 1508 /** 1509 * Checks if the user is currently locked out based on the password policy, 1510 * and performs maintenance on the user's lockout and failed login data. 1511 * 1512 * @param user the user 1513 * @throws PortalException if the user was determined to still be locked out 1514 * @throws SystemException if a system exception occurred 1515 */ 1516 public void checkLockout(com.liferay.portal.model.User user) 1517 throws com.liferay.portal.kernel.exception.PortalException, 1518 com.liferay.portal.kernel.exception.SystemException { 1519 _userLocalService.checkLockout(user); 1520 } 1521 1522 /** 1523 * Adds a failed login attempt to the user and updates the user's last 1524 * failed login date. 1525 * 1526 * @param user the user 1527 * @throws SystemException if a system exception occurred 1528 */ 1529 public void checkLoginFailure(com.liferay.portal.model.User user) 1530 throws com.liferay.portal.kernel.exception.SystemException { 1531 _userLocalService.checkLoginFailure(user); 1532 } 1533 1534 /** 1535 * Adds a failed login attempt to the user with the email address and 1536 * updates the user's last failed login date. 1537 * 1538 * @param companyId the primary key of the user's company 1539 * @param emailAddress the user's email address 1540 * @throws PortalException if a user with the email address could not be 1541 found 1542 * @throws SystemException if a system exception occurred 1543 */ 1544 public void checkLoginFailureByEmailAddress(long companyId, 1545 java.lang.String emailAddress) 1546 throws com.liferay.portal.kernel.exception.PortalException, 1547 com.liferay.portal.kernel.exception.SystemException { 1548 _userLocalService.checkLoginFailureByEmailAddress(companyId, 1549 emailAddress); 1550 } 1551 1552 /** 1553 * Adds a failed login attempt to the user and updates the user's last 1554 * failed login date. 1555 * 1556 * @param userId the primary key of the user 1557 * @throws PortalException if a user with the primary key could not be found 1558 * @throws SystemException if a system exception occurred 1559 */ 1560 public void checkLoginFailureById(long userId) 1561 throws com.liferay.portal.kernel.exception.PortalException, 1562 com.liferay.portal.kernel.exception.SystemException { 1563 _userLocalService.checkLoginFailureById(userId); 1564 } 1565 1566 /** 1567 * Adds a failed login attempt to the user with the screen name and updates 1568 * the user's last failed login date. 1569 * 1570 * @param companyId the primary key of the user's company 1571 * @param screenName the user's screen name 1572 * @throws PortalException if a user with the screen name could not be found 1573 * @throws SystemException if a system exception occurred 1574 */ 1575 public void checkLoginFailureByScreenName(long companyId, 1576 java.lang.String screenName) 1577 throws com.liferay.portal.kernel.exception.PortalException, 1578 com.liferay.portal.kernel.exception.SystemException { 1579 _userLocalService.checkLoginFailureByScreenName(companyId, screenName); 1580 } 1581 1582 /** 1583 * Checks if the user's password is expired based on the password policy, 1584 * and performs maintenance on the user's grace login and password reset 1585 * data. 1586 * 1587 * @param user the user 1588 * @throws PortalException if the user's password has expired and the grace 1589 login limit has been exceeded 1590 * @throws SystemException if a system exception occurred 1591 */ 1592 public void checkPasswordExpired(com.liferay.portal.model.User user) 1593 throws com.liferay.portal.kernel.exception.PortalException, 1594 com.liferay.portal.kernel.exception.SystemException { 1595 _userLocalService.checkPasswordExpired(user); 1596 } 1597 1598 /** 1599 * Completes the user's registration by generating a password and sending 1600 * the confirmation email. 1601 * 1602 * @param user the user 1603 * @param serviceContext the user's service context. Can set whether a 1604 password should be generated (with the <code>autoPassword</code> 1605 attribute) and whether the confirmation email should be sent 1606 (with the <code>sendEmail</code> attribute) for the user. 1607 * @throws PortalException if a portal exception occurred 1608 * @throws SystemException if a system exception occurred 1609 */ 1610 public void completeUserRegistration(com.liferay.portal.model.User user, 1611 com.liferay.portal.service.ServiceContext serviceContext) 1612 throws com.liferay.portal.kernel.exception.PortalException, 1613 com.liferay.portal.kernel.exception.SystemException { 1614 _userLocalService.completeUserRegistration(user, serviceContext); 1615 } 1616 1617 /** 1618 * Decrypts the user's primary key and password from their encrypted forms. 1619 * Used for decrypting a user's credentials from the values stored in an 1620 * automatic login cookie. 1621 * 1622 * @param companyId the primary key of the user's company 1623 * @param name the encrypted primary key of the user 1624 * @param password the encrypted password of the user 1625 * @return the user's primary key and password 1626 * @throws PortalException if a user with the primary key could not be found 1627 or if the user's password was incorrect 1628 * @throws SystemException if a system exception occurred 1629 */ 1630 public com.liferay.portal.kernel.util.KeyValuePair decryptUserId( 1631 long companyId, java.lang.String name, java.lang.String password) 1632 throws com.liferay.portal.kernel.exception.PortalException, 1633 com.liferay.portal.kernel.exception.SystemException { 1634 return _userLocalService.decryptUserId(companyId, name, password); 1635 } 1636 1637 /** 1638 * Deletes the user's portrait image. 1639 * 1640 * @param userId the primary key of the user 1641 * @throws PortalException if a user with the primary key could not be found 1642 or if the user's portrait could not be found 1643 * @throws SystemException if a system exception occurred 1644 */ 1645 public void deletePortrait(long userId) 1646 throws com.liferay.portal.kernel.exception.PortalException, 1647 com.liferay.portal.kernel.exception.SystemException { 1648 _userLocalService.deletePortrait(userId); 1649 } 1650 1651 /** 1652 * Encrypts the primary key of the user. Used when encrypting the user's 1653 * credentials for storage in an automatic login cookie. 1654 * 1655 * @param name the primary key of the user 1656 * @return the user's encrypted primary key 1657 * @throws PortalException if a user with the primary key could not be found 1658 * @throws SystemException if a system exception occurred 1659 */ 1660 public java.lang.String encryptUserId(java.lang.String name) 1661 throws com.liferay.portal.kernel.exception.PortalException, 1662 com.liferay.portal.kernel.exception.SystemException { 1663 return _userLocalService.encryptUserId(name); 1664 } 1665 1666 /** 1667 * Returns the user with the email address. 1668 * 1669 * @param companyId the primary key of the user's company 1670 * @param emailAddress the user's email address 1671 * @return the user with the email address, or <code>null</code> if a user 1672 with the email address could not be found 1673 * @throws SystemException if a system exception occurred 1674 */ 1675 public com.liferay.portal.model.User fetchUserByEmailAddress( 1676 long companyId, java.lang.String emailAddress) 1677 throws com.liferay.portal.kernel.exception.SystemException { 1678 return _userLocalService.fetchUserByEmailAddress(companyId, emailAddress); 1679 } 1680 1681 /** 1682 * Returns the user with the primary key. 1683 * 1684 * @param userId the primary key of the user 1685 * @return the user with the primary key, or <code>null</code> if a user 1686 with the primary key could not be found 1687 * @throws SystemException if a system exception occurred 1688 */ 1689 public com.liferay.portal.model.User fetchUserById(long userId) 1690 throws com.liferay.portal.kernel.exception.SystemException { 1691 return _userLocalService.fetchUserById(userId); 1692 } 1693 1694 /** 1695 * Returns the user with the screen name. 1696 * 1697 * @param companyId the primary key of the user's company 1698 * @param screenName the user's screen name 1699 * @return the user with the screen name, or <code>null</code> if a user 1700 with the screen name could not be found 1701 * @throws SystemException if a system exception occurred 1702 */ 1703 public com.liferay.portal.model.User fetchUserByScreenName(long companyId, 1704 java.lang.String screenName) 1705 throws com.liferay.portal.kernel.exception.SystemException { 1706 return _userLocalService.fetchUserByScreenName(companyId, screenName); 1707 } 1708 1709 /** 1710 * Returns a range of all the users belonging to the company. 1711 * 1712 * <p> 1713 * Useful when paginating results. Returns a maximum of <code>end - 1714 * start</code> instances. <code>start</code> and <code>end</code> are not 1715 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1716 * refers to the first result in the set. Setting both <code>start</code> 1717 * and <code>end</code> to {@link 1718 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1719 * result set. 1720 * </p> 1721 * 1722 * @param companyId the primary key of the company 1723 * @param start the lower bound of the range of users 1724 * @param end the upper bound of the range of users (not inclusive) 1725 * @return the range of users belonging to the company 1726 * @throws SystemException if a system exception occurred 1727 */ 1728 public java.util.List<com.liferay.portal.model.User> getCompanyUsers( 1729 long companyId, int start, int end) 1730 throws com.liferay.portal.kernel.exception.SystemException { 1731 return _userLocalService.getCompanyUsers(companyId, start, end); 1732 } 1733 1734 /** 1735 * Returns the number of users belonging to the company. 1736 * 1737 * @param companyId the primary key of the company 1738 * @return the number of users belonging to the company 1739 * @throws SystemException if a system exception occurred 1740 */ 1741 public int getCompanyUsersCount(long companyId) 1742 throws com.liferay.portal.kernel.exception.SystemException { 1743 return _userLocalService.getCompanyUsersCount(companyId); 1744 } 1745 1746 /** 1747 * Returns the default user for the company. 1748 * 1749 * @param companyId the primary key of the company 1750 * @return the default user for the company 1751 * @throws PortalException if a default user for the company could not be 1752 found 1753 * @throws SystemException if a system exception occurred 1754 */ 1755 public com.liferay.portal.model.User getDefaultUser(long companyId) 1756 throws com.liferay.portal.kernel.exception.PortalException, 1757 com.liferay.portal.kernel.exception.SystemException { 1758 return _userLocalService.getDefaultUser(companyId); 1759 } 1760 1761 /** 1762 * Returns the primary key of the default user for the company. 1763 * 1764 * @param companyId the primary key of the company 1765 * @return the primary key of the default user for the company 1766 * @throws PortalException if a default user for the company could not be 1767 found 1768 * @throws SystemException if a system exception occurred 1769 */ 1770 public long getDefaultUserId(long companyId) 1771 throws com.liferay.portal.kernel.exception.PortalException, 1772 com.liferay.portal.kernel.exception.SystemException { 1773 return _userLocalService.getDefaultUserId(companyId); 1774 } 1775 1776 /** 1777 * Returns the primary keys of all the users belonging to the group. 1778 * 1779 * @param groupId the primary key of the group 1780 * @return the primary keys of the users belonging to the group 1781 * @throws SystemException if a system exception occurred 1782 */ 1783 public long[] getGroupUserIds(long groupId) 1784 throws com.liferay.portal.kernel.exception.SystemException { 1785 return _userLocalService.getGroupUserIds(groupId); 1786 } 1787 1788 /** 1789 * Returns the number of users with the status belonging to the group. 1790 * 1791 * @param groupId the primary key of the group 1792 * @param status the workflow status 1793 * @return the number of users with the status belonging to the group 1794 * @throws PortalException if a group with the primary key could not be 1795 found 1796 * @throws SystemException if a system exception occurred 1797 */ 1798 public int getGroupUsersCount(long groupId, int status) 1799 throws com.liferay.portal.kernel.exception.PortalException, 1800 com.liferay.portal.kernel.exception.SystemException { 1801 return _userLocalService.getGroupUsersCount(groupId, status); 1802 } 1803 1804 /** 1805 * Returns all the users who have not had any announcements of the type 1806 * delivered, excluding the default user. 1807 * 1808 * @param type the type of announcement 1809 * @return the users who have not had any annoucements of the type delivered 1810 * @throws SystemException if a system exception occurred 1811 */ 1812 public java.util.List<com.liferay.portal.model.User> getNoAnnouncementsDeliveries( 1813 java.lang.String type) 1814 throws com.liferay.portal.kernel.exception.SystemException { 1815 return _userLocalService.getNoAnnouncementsDeliveries(type); 1816 } 1817 1818 /** 1819 * Returns all the users who do not have any contacts. 1820 * 1821 * @return the users who do not have any contacts 1822 * @throws SystemException if a system exception occurred 1823 */ 1824 public java.util.List<com.liferay.portal.model.User> getNoContacts() 1825 throws com.liferay.portal.kernel.exception.SystemException { 1826 return _userLocalService.getNoContacts(); 1827 } 1828 1829 /** 1830 * Returns all the users who do not belong to any groups, excluding the 1831 * default user. 1832 * 1833 * @return the users who do not belong to any groups 1834 * @throws SystemException if a system exception occurred 1835 */ 1836 public java.util.List<com.liferay.portal.model.User> getNoGroups() 1837 throws com.liferay.portal.kernel.exception.SystemException { 1838 return _userLocalService.getNoGroups(); 1839 } 1840 1841 /** 1842 * Returns the primary keys of all the users belonging to the organization. 1843 * 1844 * @param organizationId the primary key of the organization 1845 * @return the primary keys of the users belonging to the organization 1846 * @throws SystemException if a system exception occurred 1847 */ 1848 public long[] getOrganizationUserIds(long organizationId) 1849 throws com.liferay.portal.kernel.exception.SystemException { 1850 return _userLocalService.getOrganizationUserIds(organizationId); 1851 } 1852 1853 /** 1854 * Returns the number of users with the status belonging to the 1855 * organization. 1856 * 1857 * @param organizationId the primary key of the organization 1858 * @param status the workflow status 1859 * @return the number of users with the status belonging to the organization 1860 * @throws PortalException if an organization with the primary key could not 1861 be found 1862 * @throws SystemException if a system exception occurred 1863 */ 1864 public int getOrganizationUsersCount(long organizationId, int status) 1865 throws com.liferay.portal.kernel.exception.PortalException, 1866 com.liferay.portal.kernel.exception.SystemException { 1867 return _userLocalService.getOrganizationUsersCount(organizationId, 1868 status); 1869 } 1870 1871 /** 1872 * Returns the primary keys of all the users belonging to the role. 1873 * 1874 * @param roleId the primary key of the role 1875 * @return the primary keys of the users belonging to the role 1876 * @throws SystemException if a system exception occurred 1877 */ 1878 public long[] getRoleUserIds(long roleId) 1879 throws com.liferay.portal.kernel.exception.SystemException { 1880 return _userLocalService.getRoleUserIds(roleId); 1881 } 1882 1883 /** 1884 * Returns the number of users with the status belonging to the role. 1885 * 1886 * @param roleId the primary key of the role 1887 * @param status the workflow status 1888 * @return the number of users with the status belonging to the role 1889 * @throws PortalException if an role with the primary key could not be 1890 found 1891 * @throws SystemException if a system exception occurred 1892 */ 1893 public int getRoleUsersCount(long roleId, int status) 1894 throws com.liferay.portal.kernel.exception.PortalException, 1895 com.liferay.portal.kernel.exception.SystemException { 1896 return _userLocalService.getRoleUsersCount(roleId, status); 1897 } 1898 1899 /** 1900 * Returns an ordered range of all the users with a social relation of the 1901 * type with the user. 1902 * 1903 * <p> 1904 * Useful when paginating results. Returns a maximum of <code>end - 1905 * start</code> instances. <code>start</code> and <code>end</code> are not 1906 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1907 * refers to the first result in the set. Setting both <code>start</code> 1908 * and <code>end</code> to {@link 1909 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1910 * result set. 1911 * </p> 1912 * 1913 * @param userId the primary key of the user 1914 * @param type the type of social relation. The possible types can be found 1915 in {@link 1916 com.liferay.portlet.social.model.SocialRelationConstants}. 1917 * @param start the lower bound of the range of users 1918 * @param end the upper bound of the range of users (not inclusive) 1919 * @param obc the comparator to order the users by (optionally 1920 <code>null</code>) 1921 * @return the ordered range of users with a social relation of the type 1922 with the user 1923 * @throws PortalException if a user with the primary key could not be found 1924 * @throws SystemException if a system exception occurred 1925 */ 1926 public java.util.List<com.liferay.portal.model.User> getSocialUsers( 1927 long userId, int type, int start, int end, 1928 com.liferay.portal.kernel.util.OrderByComparator obc) 1929 throws com.liferay.portal.kernel.exception.PortalException, 1930 com.liferay.portal.kernel.exception.SystemException { 1931 return _userLocalService.getSocialUsers(userId, type, start, end, obc); 1932 } 1933 1934 /** 1935 * Returns an ordered range of all the users with a social relation with the 1936 * user. 1937 * 1938 * <p> 1939 * Useful when paginating results. Returns a maximum of <code>end - 1940 * start</code> instances. <code>start</code> and <code>end</code> are not 1941 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1942 * refers to the first result in the set. Setting both <code>start</code> 1943 * and <code>end</code> to {@link 1944 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1945 * result set. 1946 * </p> 1947 * 1948 * @param userId the primary key of the user 1949 * @param start the lower bound of the range of users 1950 * @param end the upper bound of the range of users (not inclusive) 1951 * @param obc the comparator to order the users by (optionally 1952 <code>null</code>) 1953 * @return the ordered range of users with a social relation with the user 1954 * @throws PortalException if a user with the primary key could not be found 1955 * @throws SystemException if a system exception occurred 1956 */ 1957 public java.util.List<com.liferay.portal.model.User> getSocialUsers( 1958 long userId, int start, int end, 1959 com.liferay.portal.kernel.util.OrderByComparator obc) 1960 throws com.liferay.portal.kernel.exception.PortalException, 1961 com.liferay.portal.kernel.exception.SystemException { 1962 return _userLocalService.getSocialUsers(userId, start, end, obc); 1963 } 1964 1965 /** 1966 * Returns an ordered range of all the users with a mutual social relation 1967 * of the type with both of the given users. 1968 * 1969 * <p> 1970 * Useful when paginating results. Returns a maximum of <code>end - 1971 * start</code> instances. <code>start</code> and <code>end</code> are not 1972 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1973 * refers to the first result in the set. Setting both <code>start</code> 1974 * and <code>end</code> to {@link 1975 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1976 * result set. 1977 * </p> 1978 * 1979 * @param userId1 the primary key of the first user 1980 * @param userId2 the primary key of the second user 1981 * @param type the type of social relation. The possible types can be found 1982 in {@link 1983 com.liferay.portlet.social.model.SocialRelationConstants}. 1984 * @param start the lower bound of the range of users 1985 * @param end the upper bound of the range of users (not inclusive) 1986 * @param obc the comparator to order the users by (optionally 1987 <code>null</code>) 1988 * @return the ordered range of users with a mutual social relation of the 1989 type with the user 1990 * @throws PortalException if a user with the primary key could not be found 1991 * @throws SystemException if a system exception occurred 1992 */ 1993 public java.util.List<com.liferay.portal.model.User> getSocialUsers( 1994 long userId1, long userId2, int type, int start, int end, 1995 com.liferay.portal.kernel.util.OrderByComparator obc) 1996 throws com.liferay.portal.kernel.exception.PortalException, 1997 com.liferay.portal.kernel.exception.SystemException { 1998 return _userLocalService.getSocialUsers(userId1, userId2, type, start, 1999 end, obc); 2000 } 2001 2002 /** 2003 * Returns an ordered range of all the users with a mutual social relation 2004 * with both of the given users. 2005 * 2006 * <p> 2007 * Useful when paginating results. Returns a maximum of <code>end - 2008 * start</code> instances. <code>start</code> and <code>end</code> are not 2009 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2010 * refers to the first result in the set. Setting both <code>start</code> 2011 * and <code>end</code> to {@link 2012 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 2013 * result set. 2014 * </p> 2015 * 2016 * @param userId1 the primary key of the first user 2017 * @param userId2 the primary key of the second user 2018 * @param start the lower bound of the range of users 2019 * @param end the upper bound of the range of users (not inclusive) 2020 * @param obc the comparator to order the users by (optionally 2021 <code>null</code>) 2022 * @return the ordered range of users with a mutual social relation with the 2023 user 2024 * @throws PortalException if a user with the primary key could not be found 2025 * @throws SystemException if a system exception occurred 2026 */ 2027 public java.util.List<com.liferay.portal.model.User> getSocialUsers( 2028 long userId1, long userId2, int start, int end, 2029 com.liferay.portal.kernel.util.OrderByComparator obc) 2030 throws com.liferay.portal.kernel.exception.PortalException, 2031 com.liferay.portal.kernel.exception.SystemException { 2032 return _userLocalService.getSocialUsers(userId1, userId2, start, end, 2033 obc); 2034 } 2035 2036 /** 2037 * Returns the number of users with a social relation with the user. 2038 * 2039 * @param userId the primary key of the user 2040 * @return the number of users with a social relation with the user 2041 * @throws PortalException if a user with the primary key could not be found 2042 * @throws SystemException if a system exception occurred 2043 */ 2044 public int getSocialUsersCount(long userId) 2045 throws com.liferay.portal.kernel.exception.PortalException, 2046 com.liferay.portal.kernel.exception.SystemException { 2047 return _userLocalService.getSocialUsersCount(userId); 2048 } 2049 2050 /** 2051 * Returns the number of users with a social relation of the type with the 2052 * user. 2053 * 2054 * @param userId the primary key of the user 2055 * @param type the type of social relation. The possible types can be found 2056 in {@link 2057 com.liferay.portlet.social.model.SocialRelationConstants}. 2058 * @return the number of users with a social relation of the type with the 2059 user 2060 * @throws PortalException if a user with the primary key could not be found 2061 * @throws SystemException if a system exception occurred 2062 */ 2063 public int getSocialUsersCount(long userId, int type) 2064 throws com.liferay.portal.kernel.exception.PortalException, 2065 com.liferay.portal.kernel.exception.SystemException { 2066 return _userLocalService.getSocialUsersCount(userId, type); 2067 } 2068 2069 /** 2070 * Returns the number of users with a mutual social relation with both of 2071 * the given users. 2072 * 2073 * @param userId1 the primary key of the first user 2074 * @param userId2 the primary key of the second user 2075 * @return the number of users with a mutual social relation with the user 2076 * @throws PortalException if a user with the primary key could not be found 2077 * @throws SystemException if a system exception occurred 2078 */ 2079 public int getSocialUsersCount(long userId1, long userId2) 2080 throws com.liferay.portal.kernel.exception.PortalException, 2081 com.liferay.portal.kernel.exception.SystemException { 2082 return _userLocalService.getSocialUsersCount(userId1, userId2); 2083 } 2084 2085 /** 2086 * Returns the number of users with a mutual social relation of the type 2087 * with both of the given users. 2088 * 2089 * @param userId1 the primary key of the first user 2090 * @param userId2 the primary key of the second user 2091 * @param type the type of social relation. The possible types can be found 2092 in {@link 2093 com.liferay.portlet.social.model.SocialRelationConstants}. 2094 * @return the number of users with a mutual social relation of the type 2095 with the user 2096 * @throws PortalException if a user with the primary key could not be found 2097 * @throws SystemException if a system exception occurred 2098 */ 2099 public int getSocialUsersCount(long userId1, long userId2, int type) 2100 throws com.liferay.portal.kernel.exception.PortalException, 2101 com.liferay.portal.kernel.exception.SystemException { 2102 return _userLocalService.getSocialUsersCount(userId1, userId2, type); 2103 } 2104 2105 /** 2106 * Returns the user with the contact ID. 2107 * 2108 * @param contactId the user's contact ID 2109 * @return the user with the contact ID 2110 * @throws PortalException if a user with the contact ID could not be found 2111 * @throws SystemException if a system exception occurred 2112 */ 2113 public com.liferay.portal.model.User getUserByContactId(long contactId) 2114 throws com.liferay.portal.kernel.exception.PortalException, 2115 com.liferay.portal.kernel.exception.SystemException { 2116 return _userLocalService.getUserByContactId(contactId); 2117 } 2118 2119 /** 2120 * Returns the user with the email address. 2121 * 2122 * @param companyId the primary key of the user's company 2123 * @param emailAddress the user's email address 2124 * @return the user with the email address 2125 * @throws PortalException if a user with the email address could not be 2126 found 2127 * @throws SystemException if a system exception occurred 2128 */ 2129 public com.liferay.portal.model.User getUserByEmailAddress(long companyId, 2130 java.lang.String emailAddress) 2131 throws com.liferay.portal.kernel.exception.PortalException, 2132 com.liferay.portal.kernel.exception.SystemException { 2133 return _userLocalService.getUserByEmailAddress(companyId, emailAddress); 2134 } 2135 2136 /** 2137 * Returns the user with the Facebook ID. 2138 * 2139 * @param companyId the primary key of the user's company 2140 * @param facebookId the user's Facebook ID 2141 * @return the user with the Facebook ID 2142 * @throws PortalException if a user with the Facebook ID could not be found 2143 * @throws SystemException if a system exception occurred 2144 */ 2145 public com.liferay.portal.model.User getUserByFacebookId(long companyId, 2146 long facebookId) 2147 throws com.liferay.portal.kernel.exception.PortalException, 2148 com.liferay.portal.kernel.exception.SystemException { 2149 return _userLocalService.getUserByFacebookId(companyId, facebookId); 2150 } 2151 2152 /** 2153 * Returns the user with the primary key. 2154 * 2155 * @param userId the primary key of the user 2156 * @return the user with the primary key 2157 * @throws PortalException if a user with the primary key could not be found 2158 * @throws SystemException if a system exception occurred 2159 */ 2160 public com.liferay.portal.model.User getUserById(long userId) 2161 throws com.liferay.portal.kernel.exception.PortalException, 2162 com.liferay.portal.kernel.exception.SystemException { 2163 return _userLocalService.getUserById(userId); 2164 } 2165 2166 /** 2167 * Returns the user with the primary key from the company. 2168 * 2169 * @param companyId the primary key of the user's company 2170 * @param userId the primary key of the user 2171 * @return the user with the primary key 2172 * @throws PortalException if a user with the primary key from the company 2173 could not be found 2174 * @throws SystemException if a system exception occurred 2175 */ 2176 public com.liferay.portal.model.User getUserById(long companyId, long userId) 2177 throws com.liferay.portal.kernel.exception.PortalException, 2178 com.liferay.portal.kernel.exception.SystemException { 2179 return _userLocalService.getUserById(companyId, userId); 2180 } 2181 2182 /** 2183 * Returns the user with the OpenID. 2184 * 2185 * @param companyId the primary key of the user's company 2186 * @param openId the user's OpenID 2187 * @return the user with the OpenID 2188 * @throws PortalException if a user with the OpenID could not be found 2189 * @throws SystemException if a system exception occurred 2190 */ 2191 public com.liferay.portal.model.User getUserByOpenId(long companyId, 2192 java.lang.String openId) 2193 throws com.liferay.portal.kernel.exception.PortalException, 2194 com.liferay.portal.kernel.exception.SystemException { 2195 return _userLocalService.getUserByOpenId(companyId, openId); 2196 } 2197 2198 /** 2199 * Returns the user with the portrait ID. 2200 * 2201 * @param portraitId the user's portrait ID 2202 * @return the user with the portrait ID 2203 * @throws PortalException if a user with the portrait ID could not be found 2204 * @throws SystemException if a system exception occurred 2205 */ 2206 public com.liferay.portal.model.User getUserByPortraitId(long portraitId) 2207 throws com.liferay.portal.kernel.exception.PortalException, 2208 com.liferay.portal.kernel.exception.SystemException { 2209 return _userLocalService.getUserByPortraitId(portraitId); 2210 } 2211 2212 /** 2213 * Returns the user with the screen name. 2214 * 2215 * @param companyId the primary key of the user's company 2216 * @param screenName the user's screen name 2217 * @return the user with the screen name 2218 * @throws PortalException if a user with the screen name could not be found 2219 * @throws SystemException if a system exception occurred 2220 */ 2221 public com.liferay.portal.model.User getUserByScreenName(long companyId, 2222 java.lang.String screenName) 2223 throws com.liferay.portal.kernel.exception.PortalException, 2224 com.liferay.portal.kernel.exception.SystemException { 2225 return _userLocalService.getUserByScreenName(companyId, screenName); 2226 } 2227 2228 /** 2229 * Returns the user with the universally unique identifier. 2230 * 2231 * @param uuid the user's universally unique identifier 2232 * @return the user with the universally unique identifier 2233 * @throws PortalException if a user with the universally unique identifier 2234 could not be found 2235 * @throws SystemException if a system exception occurred 2236 */ 2237 public com.liferay.portal.model.User getUserByUuid(java.lang.String uuid) 2238 throws com.liferay.portal.kernel.exception.PortalException, 2239 com.liferay.portal.kernel.exception.SystemException { 2240 return _userLocalService.getUserByUuid(uuid); 2241 } 2242 2243 /** 2244 * Returns the number of users with the status belonging to the user group. 2245 * 2246 * @param userGroupId the primary key of the user group 2247 * @param status the workflow status 2248 * @return the number of users with the status belonging to the user group 2249 * @throws PortalException if a user group with the primary key could not be 2250 found 2251 * @throws SystemException if a system exception occurred 2252 */ 2253 public int getUserGroupUsersCount(long userGroupId, int status) 2254 throws com.liferay.portal.kernel.exception.PortalException, 2255 com.liferay.portal.kernel.exception.SystemException { 2256 return _userLocalService.getUserGroupUsersCount(userGroupId, status); 2257 } 2258 2259 /** 2260 * Returns the primary key of the user with the email address. 2261 * 2262 * @param companyId the primary key of the user's company 2263 * @param emailAddress the user's email address 2264 * @return the primary key of the user with the email address 2265 * @throws PortalException if a user with the email address could not be 2266 found 2267 * @throws SystemException if a system exception occurred 2268 */ 2269 public long getUserIdByEmailAddress(long companyId, 2270 java.lang.String emailAddress) 2271 throws com.liferay.portal.kernel.exception.PortalException, 2272 com.liferay.portal.kernel.exception.SystemException { 2273 return _userLocalService.getUserIdByEmailAddress(companyId, emailAddress); 2274 } 2275 2276 /** 2277 * Returns the primary key of the user with the screen name. 2278 * 2279 * @param companyId the primary key of the user's company 2280 * @param screenName the user's screen name 2281 * @return the primary key of the user with the screen name 2282 * @throws PortalException if a user with the screen name could not be found 2283 * @throws SystemException if a system exception occurred 2284 */ 2285 public long getUserIdByScreenName(long companyId, 2286 java.lang.String screenName) 2287 throws com.liferay.portal.kernel.exception.PortalException, 2288 com.liferay.portal.kernel.exception.SystemException { 2289 return _userLocalService.getUserIdByScreenName(companyId, screenName); 2290 } 2291 2292 /** 2293 * Returns <code>true</code> if the password policy has been assigned to the 2294 * user. 2295 * 2296 * @param passwordPolicyId the primary key of the password policy 2297 * @param userId the primary key of the user 2298 * @return <code>true</code> if the password policy is assigned to the user; 2299 <code>false</code> otherwise 2300 * @throws SystemException if a system exception occurred 2301 */ 2302 public boolean hasPasswordPolicyUser(long passwordPolicyId, long userId) 2303 throws com.liferay.portal.kernel.exception.SystemException { 2304 return _userLocalService.hasPasswordPolicyUser(passwordPolicyId, userId); 2305 } 2306 2307 /** 2308 * Returns <code>true</code> if the user has the role with the name, 2309 * optionally through inheritance. 2310 * 2311 * @param companyId the primary key of the role's company 2312 * @param name the name of the role (must be a regular role, not an 2313 organization, site or provider role) 2314 * @param userId the primary key of the user 2315 * @param inherited whether to include roles inherited from organizations, 2316 sites, etc. 2317 * @return <code>true</code> if the user has the role; <code>false</code> 2318 otherwise 2319 * @throws PortalException if a role with the name could not be found 2320 * @throws SystemException if a system exception occurred 2321 */ 2322 public boolean hasRoleUser(long companyId, java.lang.String name, 2323 long userId, boolean inherited) 2324 throws com.liferay.portal.kernel.exception.PortalException, 2325 com.liferay.portal.kernel.exception.SystemException { 2326 return _userLocalService.hasRoleUser(companyId, name, userId, inherited); 2327 } 2328 2329 /** 2330 * Returns <code>true</code> if the user's password is expired. 2331 * 2332 * @param user the user 2333 * @return <code>true</code> if the user's password is expired; 2334 <code>false</code> otherwise 2335 * @throws PortalException if the password policy for the user could not be 2336 found 2337 * @throws SystemException if a system exception occurred 2338 */ 2339 public boolean isPasswordExpired(com.liferay.portal.model.User user) 2340 throws com.liferay.portal.kernel.exception.PortalException, 2341 com.liferay.portal.kernel.exception.SystemException { 2342 return _userLocalService.isPasswordExpired(user); 2343 } 2344 2345 /** 2346 * Returns <code>true</code> if the user's password is expiring soon. 2347 * 2348 * @param user the user 2349 * @return <code>true</code> if the user's password is expiring soon; 2350 <code>false</code> otherwise 2351 * @throws PortalException if the password policy for the user could not be 2352 found 2353 * @throws SystemException if a system exception occurred 2354 */ 2355 public boolean isPasswordExpiringSoon(com.liferay.portal.model.User user) 2356 throws com.liferay.portal.kernel.exception.PortalException, 2357 com.liferay.portal.kernel.exception.SystemException { 2358 return _userLocalService.isPasswordExpiringSoon(user); 2359 } 2360 2361 public com.liferay.portal.model.User loadGetDefaultUser(long companyId) 2362 throws com.liferay.portal.kernel.exception.PortalException, 2363 com.liferay.portal.kernel.exception.SystemException { 2364 return _userLocalService.loadGetDefaultUser(companyId); 2365 } 2366 2367 /** 2368 * Returns an ordered range of all the users who match the keywords and 2369 * status, without using the indexer. It is preferable to use the indexed 2370 * version {@link #search(long, String, int, LinkedHashMap, int, int, Sort)} 2371 * instead of this method wherever possible for performance reasons. 2372 * 2373 * <p> 2374 * Useful when paginating results. Returns a maximum of <code>end - 2375 * start</code> instances. <code>start</code> and <code>end</code> are not 2376 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2377 * refers to the first result in the set. Setting both <code>start</code> 2378 * and <code>end</code> to {@link 2379 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 2380 * result set. 2381 * </p> 2382 * 2383 * @param companyId the primary key of the user's company 2384 * @param keywords the keywords (space separated), which may occur in the 2385 user's first name, middle name, last name, screen name, or email 2386 address 2387 * @param status the workflow status 2388 * @param params the finder parameters (optionally <code>null</code>). For 2389 more information see {@link 2390 com.liferay.portal.service.persistence.UserFinder}. 2391 * @param start the lower bound of the range of users 2392 * @param end the upper bound of the range of users (not inclusive) 2393 * @param obc the comparator to order the users by (optionally 2394 <code>null</code>) 2395 * @return the matching users 2396 * @throws SystemException if a system exception occurred 2397 * @see com.liferay.portal.service.persistence.UserFinder 2398 */ 2399 public java.util.List<com.liferay.portal.model.User> search( 2400 long companyId, java.lang.String keywords, int status, 2401 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2402 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc) 2403 throws com.liferay.portal.kernel.exception.SystemException { 2404 return _userLocalService.search(companyId, keywords, status, params, 2405 start, end, obc); 2406 } 2407 2408 /** 2409 * Returns an ordered range of all the users who match the keywords and 2410 * status, using the indexer. It is preferable to use this method instead of 2411 * the non-indexed version whenever possible for performance reasons. 2412 * 2413 * <p> 2414 * Useful when paginating results. Returns a maximum of <code>end - 2415 * start</code> instances. <code>start</code> and <code>end</code> are not 2416 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2417 * refers to the first result in the set. Setting both <code>start</code> 2418 * and <code>end</code> to {@link 2419 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 2420 * result set. 2421 * </p> 2422 * 2423 * @param companyId the primary key of the user's company 2424 * @param keywords the keywords (space separated), which may occur in the 2425 user's first name, middle name, last name, screen name, or email 2426 address 2427 * @param status the workflow status 2428 * @param params the indexer parameters (optionally <code>null</code>). For 2429 more information see {@link 2430 com.liferay.portlet.usersadmin.util.UserIndexer}. 2431 * @param start the lower bound of the range of users 2432 * @param end the upper bound of the range of users (not inclusive) 2433 * @param sort the field and direction to sort by (optionally 2434 <code>null</code>) 2435 * @return the matching users 2436 * @throws SystemException if a system exception occurred 2437 * @see com.liferay.portlet.usersadmin.util.UserIndexer 2438 */ 2439 public com.liferay.portal.kernel.search.Hits search(long companyId, 2440 java.lang.String keywords, int status, 2441 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2442 int start, int end, com.liferay.portal.kernel.search.Sort sort) 2443 throws com.liferay.portal.kernel.exception.SystemException { 2444 return _userLocalService.search(companyId, keywords, status, params, 2445 start, end, sort); 2446 } 2447 2448 /** 2449 * Returns an ordered range of all the users with the status, and whose 2450 * first name, middle name, last name, screen name, and email address match 2451 * the keywords specified for them, without using the indexer. It is 2452 * preferable to use the indexed version {@link #search(long, String, 2453 * String, String, String, String, int, LinkedHashMap, boolean, int, int, 2454 * Sort)} instead of this method wherever possible for performance reasons. 2455 * 2456 * <p> 2457 * Useful when paginating results. Returns a maximum of <code>end - 2458 * start</code> instances. <code>start</code> and <code>end</code> are not 2459 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2460 * refers to the first result in the set. Setting both <code>start</code> 2461 * and <code>end</code> to {@link 2462 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 2463 * result set. 2464 * </p> 2465 * 2466 * @param companyId the primary key of the user's company 2467 * @param firstName the first name keywords (space separated) 2468 * @param middleName the middle name keywords 2469 * @param lastName the last name keywords 2470 * @param screenName the screen name keywords 2471 * @param emailAddress the email address keywords 2472 * @param status the workflow status 2473 * @param params the finder parameters (optionally <code>null</code>). For 2474 more information see {@link 2475 com.liferay.portal.service.persistence.UserFinder}. 2476 * @param andSearch whether every field must match its keywords, or just 2477 one field. For example, "users with the first name 'bob' and 2478 last name 'smith'" vs "users with the first name 'bob' 2479 or the last name 'smith'". 2480 * @param start the lower bound of the range of users 2481 * @param end the upper bound of the range of users (not inclusive) 2482 * @param obc the comparator to order the users by (optionally 2483 <code>null</code>) 2484 * @return the matching users 2485 * @throws SystemException if a system exception occurred 2486 * @see com.liferay.portal.service.persistence.UserFinder 2487 */ 2488 public java.util.List<com.liferay.portal.model.User> search( 2489 long companyId, java.lang.String firstName, 2490 java.lang.String middleName, java.lang.String lastName, 2491 java.lang.String screenName, java.lang.String emailAddress, int status, 2492 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2493 boolean andSearch, int start, int end, 2494 com.liferay.portal.kernel.util.OrderByComparator obc) 2495 throws com.liferay.portal.kernel.exception.SystemException { 2496 return _userLocalService.search(companyId, firstName, middleName, 2497 lastName, screenName, emailAddress, status, params, andSearch, 2498 start, end, obc); 2499 } 2500 2501 /** 2502 * Returns an ordered range of all the users with the status, and whose 2503 * first name, middle name, last name, screen name, and email address match 2504 * the keywords specified for them, using the indexer. It is preferable to 2505 * use this method instead of the non-indexed version whenever possible for 2506 * performance reasons. 2507 * 2508 * <p> 2509 * Useful when paginating results. Returns a maximum of <code>end - 2510 * start</code> instances. <code>start</code> and <code>end</code> are not 2511 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2512 * refers to the first result in the set. Setting both <code>start</code> 2513 * and <code>end</code> to {@link 2514 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 2515 * result set. 2516 * </p> 2517 * 2518 * @param companyId the primary key of the user's company 2519 * @param firstName the first name keywords (space separated) 2520 * @param middleName the middle name keywords 2521 * @param lastName the last name keywords 2522 * @param screenName the screen name keywords 2523 * @param emailAddress the email address keywords 2524 * @param status the workflow status 2525 * @param params the indexer parameters (optionally <code>null</code>). For 2526 more information see {@link 2527 com.liferay.portlet.usersadmin.util.UserIndexer}. 2528 * @param andSearch whether every field must match its keywords, or just 2529 one field. For example, "users with the first name 'bob' and 2530 last name 'smith'" vs "users with the first name 'bob' 2531 or the last name 'smith'". 2532 * @param start the lower bound of the range of users 2533 * @param end the upper bound of the range of users (not inclusive) 2534 * @param sort the field and direction to sort by (optionally 2535 <code>null</code>) 2536 * @return the matching users 2537 * @throws SystemException if a system exception occurred 2538 * @see com.liferay.portlet.usersadmin.util.UserIndexer 2539 */ 2540 public com.liferay.portal.kernel.search.Hits search(long companyId, 2541 java.lang.String firstName, java.lang.String middleName, 2542 java.lang.String lastName, java.lang.String screenName, 2543 java.lang.String emailAddress, int status, 2544 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2545 boolean andSearch, int start, int end, 2546 com.liferay.portal.kernel.search.Sort sort) 2547 throws com.liferay.portal.kernel.exception.SystemException { 2548 return _userLocalService.search(companyId, firstName, middleName, 2549 lastName, screenName, emailAddress, status, params, andSearch, 2550 start, end, sort); 2551 } 2552 2553 /** 2554 * Returns the number of users who match the keywords and status. 2555 * 2556 * @param companyId the primary key of the user's company 2557 * @param keywords the keywords (space separated), which may occur in the 2558 user's first name, middle name, last name, screen name, or email 2559 address 2560 * @param status the workflow status 2561 * @param params the finder parameters (optionally <code>null</code>). For 2562 more information see {@link 2563 com.liferay.portal.service.persistence.UserFinder}. 2564 * @return the number matching users 2565 * @throws SystemException if a system exception occurred 2566 */ 2567 public int searchCount(long companyId, java.lang.String keywords, 2568 int status, 2569 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params) 2570 throws com.liferay.portal.kernel.exception.SystemException { 2571 return _userLocalService.searchCount(companyId, keywords, status, params); 2572 } 2573 2574 /** 2575 * Returns the number of users with the status, and whose first name, middle 2576 * name, last name, screen name, and email address match the keywords 2577 * specified for them. 2578 * 2579 * @param companyId the primary key of the user's company 2580 * @param firstName the first name keywords (space separated) 2581 * @param middleName the middle name keywords 2582 * @param lastName the last name keywords 2583 * @param screenName the screen name keywords 2584 * @param emailAddress the email address keywords 2585 * @param status the workflow status 2586 * @param params the finder parameters (optionally <code>null</code>). For 2587 more information see {@link 2588 com.liferay.portal.service.persistence.UserFinder}. 2589 * @param andSearch whether every field must match its keywords, or just 2590 one field. For example, "users with the first name 'bob' and 2591 last name 'smith'" vs "users with the first name 'bob' 2592 or the last name 'smith'". 2593 * @return the number of matching users 2594 * @throws SystemException if a system exception occurred 2595 */ 2596 public int searchCount(long companyId, java.lang.String firstName, 2597 java.lang.String middleName, java.lang.String lastName, 2598 java.lang.String screenName, java.lang.String emailAddress, int status, 2599 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2600 boolean andSearch) 2601 throws com.liferay.portal.kernel.exception.SystemException { 2602 return _userLocalService.searchCount(companyId, firstName, middleName, 2603 lastName, screenName, emailAddress, status, params, andSearch); 2604 } 2605 2606 /** 2607 * Sends an email address verification to the user. 2608 * 2609 * @param user the verification email recipient 2610 * @param emailAddress the recipient's email address 2611 * @param serviceContext the service context. Must set the portal URL, main 2612 path, primary key of the layout, remote address, remote host, and 2613 agent for the user. 2614 * @throws PortalException if a portal exception occurred 2615 * @throws SystemException if a system exception occurred 2616 */ 2617 public void sendEmailAddressVerification( 2618 com.liferay.portal.model.User user, java.lang.String emailAddress, 2619 com.liferay.portal.service.ServiceContext serviceContext) 2620 throws com.liferay.portal.kernel.exception.PortalException, 2621 com.liferay.portal.kernel.exception.SystemException { 2622 _userLocalService.sendEmailAddressVerification(user, emailAddress, 2623 serviceContext); 2624 } 2625 2626 /** 2627 * Sends the password email to the user with the email address. The content 2628 * of this email can be specified in <code>portal.properties</code> with the 2629 * <code>admin.email.password</code> keys. 2630 * 2631 * @param companyId the primary key of the user's company 2632 * @param emailAddress the user's email address 2633 * @param fromName the name of the individual that the email should be from 2634 * @param fromAddress the address of the individual that the email should 2635 be from 2636 * @param subject the email subject. If <code>null</code>, the subject 2637 specified in <code>portal.properties</code> will be used. 2638 * @param body the email body. If <code>null</code>, the body specified in 2639 <code>portal.properties</code> will be used. 2640 * @param serviceContext the user's service context 2641 * @throws PortalException if a user with the email address could not be 2642 found 2643 * @throws SystemException if a system exception occurred 2644 */ 2645 public void sendPassword(long companyId, java.lang.String emailAddress, 2646 java.lang.String fromName, java.lang.String fromAddress, 2647 java.lang.String subject, java.lang.String body, 2648 com.liferay.portal.service.ServiceContext serviceContext) 2649 throws com.liferay.portal.kernel.exception.PortalException, 2650 com.liferay.portal.kernel.exception.SystemException { 2651 _userLocalService.sendPassword(companyId, emailAddress, fromName, 2652 fromAddress, subject, body, serviceContext); 2653 } 2654 2655 /** 2656 * Removes the users from the teams of a group. 2657 * 2658 * @param groupId the primary key of the group 2659 * @param userIds the primary keys of the users 2660 * @throws PortalException if a portal exception occurred 2661 * @throws SystemException if a system exception occurred 2662 */ 2663 public void unsetGroupTeamsUsers(long groupId, long[] userIds) 2664 throws com.liferay.portal.kernel.exception.PortalException, 2665 com.liferay.portal.kernel.exception.SystemException { 2666 _userLocalService.unsetGroupTeamsUsers(groupId, userIds); 2667 } 2668 2669 /** 2670 * Removes the users from the group. 2671 * 2672 * @param groupId the primary key of the group 2673 * @param userIds the primary keys of the users 2674 * @param serviceContext the service context to be applied (optionally 2675 <code>null</code>) 2676 * @throws PortalException if a portal exception occurred 2677 * @throws SystemException if a system exception occurred 2678 */ 2679 public void unsetGroupUsers(long groupId, long[] userIds, 2680 com.liferay.portal.service.ServiceContext serviceContext) 2681 throws com.liferay.portal.kernel.exception.PortalException, 2682 com.liferay.portal.kernel.exception.SystemException { 2683 _userLocalService.unsetGroupUsers(groupId, userIds, serviceContext); 2684 } 2685 2686 /** 2687 * Removes the users from the organization. 2688 * 2689 * @param organizationId the primary key of the organization 2690 * @param userIds the primary keys of the users 2691 * @throws PortalException if a portal exception occurred 2692 * @throws SystemException if a system exception occurred 2693 */ 2694 public void unsetOrganizationUsers(long organizationId, long[] userIds) 2695 throws com.liferay.portal.kernel.exception.PortalException, 2696 com.liferay.portal.kernel.exception.SystemException { 2697 _userLocalService.unsetOrganizationUsers(organizationId, userIds); 2698 } 2699 2700 /** 2701 * Removes the users from the password policy. 2702 * 2703 * @param passwordPolicyId the primary key of the password policy 2704 * @param userIds the primary keys of the users 2705 * @throws SystemException if a system exception occurred 2706 */ 2707 public void unsetPasswordPolicyUsers(long passwordPolicyId, long[] userIds) 2708 throws com.liferay.portal.kernel.exception.SystemException { 2709 _userLocalService.unsetPasswordPolicyUsers(passwordPolicyId, userIds); 2710 } 2711 2712 /** 2713 * Removes the users from the role. 2714 * 2715 * @param roleId the primary key of the role 2716 * @param users the users 2717 * @throws PortalException if a portal exception occurred 2718 * @throws SystemException if a system exception occurred 2719 */ 2720 public void unsetRoleUsers(long roleId, 2721 java.util.List<com.liferay.portal.model.User> users) 2722 throws com.liferay.portal.kernel.exception.PortalException, 2723 com.liferay.portal.kernel.exception.SystemException { 2724 _userLocalService.unsetRoleUsers(roleId, users); 2725 } 2726 2727 /** 2728 * Removes the users from the role. 2729 * 2730 * @param roleId the primary key of the role 2731 * @param userIds the primary keys of the users 2732 * @throws PortalException if a portal exception occurred 2733 * @throws SystemException if a system exception occurred 2734 */ 2735 public void unsetRoleUsers(long roleId, long[] userIds) 2736 throws com.liferay.portal.kernel.exception.PortalException, 2737 com.liferay.portal.kernel.exception.SystemException { 2738 _userLocalService.unsetRoleUsers(roleId, userIds); 2739 } 2740 2741 /** 2742 * Removes the users from the team. 2743 * 2744 * @param teamId the primary key of the team 2745 * @param userIds the primary keys of the users 2746 * @throws PortalException if a portal exception occurred 2747 * @throws SystemException if a system exception occurred 2748 */ 2749 public void unsetTeamUsers(long teamId, long[] userIds) 2750 throws com.liferay.portal.kernel.exception.PortalException, 2751 com.liferay.portal.kernel.exception.SystemException { 2752 _userLocalService.unsetTeamUsers(teamId, userIds); 2753 } 2754 2755 /** 2756 * Removes the users from the user group. 2757 * 2758 * @param userGroupId the primary key of the user group 2759 * @param userIds the primary keys of the users 2760 * @throws PortalException if a portal exception occurred 2761 * @throws SystemException if a system exception occurred 2762 */ 2763 public void unsetUserGroupUsers(long userGroupId, long[] userIds) 2764 throws com.liferay.portal.kernel.exception.PortalException, 2765 com.liferay.portal.kernel.exception.SystemException { 2766 _userLocalService.unsetUserGroupUsers(userGroupId, userIds); 2767 } 2768 2769 /** 2770 * Updates whether the user has agreed to the terms of use. 2771 * 2772 * @param userId the primary key of the user 2773 * @param agreedToTermsOfUse whether the user has agreet to the terms of 2774 use 2775 * @return the user 2776 * @throws PortalException if a user with the primary key could not be found 2777 * @throws SystemException if a system exception occurred 2778 */ 2779 public com.liferay.portal.model.User updateAgreedToTermsOfUse(long userId, 2780 boolean agreedToTermsOfUse) 2781 throws com.liferay.portal.kernel.exception.PortalException, 2782 com.liferay.portal.kernel.exception.SystemException { 2783 return _userLocalService.updateAgreedToTermsOfUse(userId, 2784 agreedToTermsOfUse); 2785 } 2786 2787 /** 2788 * Updates the user's asset with the new asset categories and tag names, 2789 * removing and adding asset categories and tag names as necessary. 2790 * 2791 * @param userId the primary key of the user 2792 * @param user ID the primary key of the user 2793 * @param assetCategoryIds the primary key's of the new asset categories 2794 * @param assetTagNames the new asset tag names 2795 * @throws PortalException if a user with the primary key could not be found 2796 * @throws SystemException if a system exception occurred 2797 */ 2798 public void updateAsset(long userId, com.liferay.portal.model.User user, 2799 long[] assetCategoryIds, java.lang.String[] assetTagNames) 2800 throws com.liferay.portal.kernel.exception.PortalException, 2801 com.liferay.portal.kernel.exception.SystemException { 2802 _userLocalService.updateAsset(userId, user, assetCategoryIds, 2803 assetTagNames); 2804 } 2805 2806 /** 2807 * Updates the user's creation date. 2808 * 2809 * @param userId the primary key of the user 2810 * @param createDate the new creation date 2811 * @return the user 2812 * @throws PortalException if a user with the primary key could not be found 2813 * @throws SystemException if a system exception occurred 2814 */ 2815 public com.liferay.portal.model.User updateCreateDate(long userId, 2816 java.util.Date createDate) 2817 throws com.liferay.portal.kernel.exception.PortalException, 2818 com.liferay.portal.kernel.exception.SystemException { 2819 return _userLocalService.updateCreateDate(userId, createDate); 2820 } 2821 2822 /** 2823 * Updates the user's email address. 2824 * 2825 * @param userId the primary key of the user 2826 * @param password the user's password 2827 * @param emailAddress1 the user's new email address 2828 * @param emailAddress2 the user's new email address confirmation 2829 * @return the user 2830 * @throws PortalException if a user with the primary key could not be found 2831 * @throws SystemException if a system exception occurred 2832 */ 2833 public com.liferay.portal.model.User updateEmailAddress(long userId, 2834 java.lang.String password, java.lang.String emailAddress1, 2835 java.lang.String emailAddress2) 2836 throws com.liferay.portal.kernel.exception.PortalException, 2837 com.liferay.portal.kernel.exception.SystemException { 2838 return _userLocalService.updateEmailAddress(userId, password, 2839 emailAddress1, emailAddress2); 2840 } 2841 2842 /** 2843 * Updates the user's email address or sends verification email. 2844 * 2845 * @param userId the primary key of the user 2846 * @param password the user's password 2847 * @param emailAddress1 the user's new email address 2848 * @param emailAddress2 the user's new email address confirmation 2849 * @param serviceContext the service context to be applied. Must set the 2850 portal URL, main path, primary key of the layout, remote address, 2851 remote host, and agent for the user. 2852 * @return the user 2853 * @throws PortalException if a user with the primary key could not be found 2854 * @throws SystemException if a system exception occurred 2855 */ 2856 public com.liferay.portal.model.User updateEmailAddress(long userId, 2857 java.lang.String password, java.lang.String emailAddress1, 2858 java.lang.String emailAddress2, 2859 com.liferay.portal.service.ServiceContext serviceContext) 2860 throws com.liferay.portal.kernel.exception.PortalException, 2861 com.liferay.portal.kernel.exception.SystemException { 2862 return _userLocalService.updateEmailAddress(userId, password, 2863 emailAddress1, emailAddress2, serviceContext); 2864 } 2865 2866 /** 2867 * Updates whether the user has verified email address. 2868 * 2869 * @param userId the primary key of the user 2870 * @param emailAddressVerified whether the user has verified email address 2871 * @return the user 2872 * @throws PortalException if a user with the primary key could not be found 2873 * @throws SystemException if a system exception occurred 2874 */ 2875 public com.liferay.portal.model.User updateEmailAddressVerified( 2876 long userId, boolean emailAddressVerified) 2877 throws com.liferay.portal.kernel.exception.PortalException, 2878 com.liferay.portal.kernel.exception.SystemException { 2879 return _userLocalService.updateEmailAddressVerified(userId, 2880 emailAddressVerified); 2881 } 2882 2883 /** 2884 * Updates the user's Facebook ID. 2885 * 2886 * @param userId the primary key of the user 2887 * @param facebookId the user's new Facebook ID 2888 * @return the user 2889 * @throws PortalException if a user with the primary key could not be found 2890 * @throws SystemException if a system exception occurred 2891 */ 2892 public com.liferay.portal.model.User updateFacebookId(long userId, 2893 long facebookId) 2894 throws com.liferay.portal.kernel.exception.PortalException, 2895 com.liferay.portal.kernel.exception.SystemException { 2896 return _userLocalService.updateFacebookId(userId, facebookId); 2897 } 2898 2899 /** 2900 * Sets the groups the user is in, removing and adding groups as necessary. 2901 * 2902 * @param userId the primary key of the user 2903 * @param newGroupIds the primary keys of the groups 2904 * @param serviceContext the service context to be applied (optionally 2905 <code>null</code>) 2906 * @throws PortalException if a portal exception occurred 2907 * @throws SystemException if a system exception occurred 2908 */ 2909 public void updateGroups(long userId, long[] newGroupIds, 2910 com.liferay.portal.service.ServiceContext serviceContext) 2911 throws com.liferay.portal.kernel.exception.PortalException, 2912 com.liferay.portal.kernel.exception.SystemException { 2913 _userLocalService.updateGroups(userId, newGroupIds, serviceContext); 2914 } 2915 2916 /** 2917 * Updates a user account that was automatically created when a guest user 2918 * participated in an action (e.g. posting a comment) and only provided his 2919 * name and email address. 2920 * 2921 * @param creatorUserId the primary key of the creator 2922 * @param companyId the primary key of the user's company 2923 * @param autoPassword whether a password should be automatically generated 2924 for the user 2925 * @param password1 the user's password 2926 * @param password2 the user's password confirmation 2927 * @param autoScreenName whether a screen name should be automatically 2928 generated for the user 2929 * @param screenName the user's screen name 2930 * @param emailAddress the user's email address 2931 * @param facebookId the user's facebook ID 2932 * @param openId the user's OpenID 2933 * @param locale the user's locale 2934 * @param firstName the user's first name 2935 * @param middleName the user's middle name 2936 * @param lastName the user's last name 2937 * @param prefixId the user's name prefix ID 2938 * @param suffixId the user's name suffix ID 2939 * @param male whether the user is male 2940 * @param birthdayMonth the user's birthday month (0-based, meaning 0 for 2941 January) 2942 * @param birthdayDay the user's birthday day 2943 * @param birthdayYear the user's birthday year 2944 * @param jobTitle the user's job title 2945 * @param updateUserInformation whether to update the user's information 2946 * @param sendEmail whether to send the user an email notification about 2947 their new account 2948 * @param serviceContext the user's service context (optionally 2949 <code>null</code>). Can set expando bridge attributes for the 2950 user. 2951 * @return the user 2952 * @throws PortalException if the user's information was invalid 2953 * @throws SystemException if a system exception occurred 2954 */ 2955 public com.liferay.portal.model.User updateIncompleteUser( 2956 long creatorUserId, long companyId, boolean autoPassword, 2957 java.lang.String password1, java.lang.String password2, 2958 boolean autoScreenName, java.lang.String screenName, 2959 java.lang.String emailAddress, long facebookId, 2960 java.lang.String openId, java.util.Locale locale, 2961 java.lang.String firstName, java.lang.String middleName, 2962 java.lang.String lastName, int prefixId, int suffixId, boolean male, 2963 int birthdayMonth, int birthdayDay, int birthdayYear, 2964 java.lang.String jobTitle, boolean updateUserInformation, 2965 boolean sendEmail, 2966 com.liferay.portal.service.ServiceContext serviceContext) 2967 throws com.liferay.portal.kernel.exception.PortalException, 2968 com.liferay.portal.kernel.exception.SystemException { 2969 return _userLocalService.updateIncompleteUser(creatorUserId, companyId, 2970 autoPassword, password1, password2, autoScreenName, screenName, 2971 emailAddress, facebookId, openId, locale, firstName, middleName, 2972 lastName, prefixId, suffixId, male, birthdayMonth, birthdayDay, 2973 birthdayYear, jobTitle, updateUserInformation, sendEmail, 2974 serviceContext); 2975 } 2976 2977 /** 2978 * Updates the user's job title. 2979 * 2980 * @param userId the primary key of the user 2981 * @param jobTitle the user's job title 2982 * @return the user 2983 * @throws PortalException if a user with the primary key could not be found 2984 or if a contact could not be found matching the user's contact ID 2985 * @throws SystemException if a system exception occurred 2986 */ 2987 public com.liferay.portal.model.User updateJobTitle(long userId, 2988 java.lang.String jobTitle) 2989 throws com.liferay.portal.kernel.exception.PortalException, 2990 com.liferay.portal.kernel.exception.SystemException { 2991 return _userLocalService.updateJobTitle(userId, jobTitle); 2992 } 2993 2994 /** 2995 * Updates the user's last login with the current time and the IP address. 2996 * 2997 * @param userId the primary key of the user 2998 * @param loginIP the IP address the user logged in from 2999 * @return the user 3000 * @throws PortalException if a user with the primary key could not be found 3001 * @throws SystemException if a system exception occurred 3002 */ 3003 public com.liferay.portal.model.User updateLastLogin(long userId, 3004 java.lang.String loginIP) 3005 throws com.liferay.portal.kernel.exception.PortalException, 3006 com.liferay.portal.kernel.exception.SystemException { 3007 return _userLocalService.updateLastLogin(userId, loginIP); 3008 } 3009 3010 /** 3011 * Updates whether the user is locked out from logging in. 3012 * 3013 * @param user the user 3014 * @param lockout whether the user is locked out 3015 * @return the user 3016 * @throws PortalException if a portal exception occurred 3017 * @throws SystemException if a system exception occurred 3018 */ 3019 public com.liferay.portal.model.User updateLockout( 3020 com.liferay.portal.model.User user, boolean lockout) 3021 throws com.liferay.portal.kernel.exception.PortalException, 3022 com.liferay.portal.kernel.exception.SystemException { 3023 return _userLocalService.updateLockout(user, lockout); 3024 } 3025 3026 /** 3027 * Updates whether the user is locked out from logging in. 3028 * 3029 * @param companyId the primary key of the user's company 3030 * @param emailAddress the user's email address 3031 * @param lockout whether the user is locked out 3032 * @return the user 3033 * @throws PortalException if a user with the email address could not be 3034 found 3035 * @throws SystemException if a system exception occurred 3036 */ 3037 public com.liferay.portal.model.User updateLockoutByEmailAddress( 3038 long companyId, java.lang.String emailAddress, boolean lockout) 3039 throws com.liferay.portal.kernel.exception.PortalException, 3040 com.liferay.portal.kernel.exception.SystemException { 3041 return _userLocalService.updateLockoutByEmailAddress(companyId, 3042 emailAddress, lockout); 3043 } 3044 3045 /** 3046 * Updates whether the user is locked out from logging in. 3047 * 3048 * @param userId the primary key of the user 3049 * @param lockout whether the user is locked out 3050 * @return the user 3051 * @throws PortalException if a user with the primary key could not be found 3052 * @throws SystemException if a system exception occurred 3053 */ 3054 public com.liferay.portal.model.User updateLockoutById(long userId, 3055 boolean lockout) 3056 throws com.liferay.portal.kernel.exception.PortalException, 3057 com.liferay.portal.kernel.exception.SystemException { 3058 return _userLocalService.updateLockoutById(userId, lockout); 3059 } 3060 3061 /** 3062 * Updates whether the user is locked out from logging in. 3063 * 3064 * @param companyId the primary key of the user's company 3065 * @param screenName the user's screen name 3066 * @param lockout whether the user is locked out 3067 * @return the user 3068 * @throws PortalException if a user with the screen name could not be found 3069 * @throws SystemException if a system exception occurred 3070 */ 3071 public com.liferay.portal.model.User updateLockoutByScreenName( 3072 long companyId, java.lang.String screenName, boolean lockout) 3073 throws com.liferay.portal.kernel.exception.PortalException, 3074 com.liferay.portal.kernel.exception.SystemException { 3075 return _userLocalService.updateLockoutByScreenName(companyId, 3076 screenName, lockout); 3077 } 3078 3079 /** 3080 * Updates the user's modified date. 3081 * 3082 * @param userId the primary key of the user 3083 * @param modifiedDate the new modified date 3084 * @return the user 3085 * @throws PortalException if a user with the primary key could not be found 3086 * @throws SystemException if a system exception occurred 3087 */ 3088 public com.liferay.portal.model.User updateModifiedDate(long userId, 3089 java.util.Date modifiedDate) 3090 throws com.liferay.portal.kernel.exception.PortalException, 3091 com.liferay.portal.kernel.exception.SystemException { 3092 return _userLocalService.updateModifiedDate(userId, modifiedDate); 3093 } 3094 3095 /** 3096 * Updates the user's OpenID. 3097 * 3098 * @param userId the primary key of the user 3099 * @param openId the new OpenID 3100 * @return the user 3101 * @throws PortalException if a user with the primary key could not be found 3102 * @throws SystemException if a system exception occurred 3103 */ 3104 public com.liferay.portal.model.User updateOpenId(long userId, 3105 java.lang.String openId) 3106 throws com.liferay.portal.kernel.exception.PortalException, 3107 com.liferay.portal.kernel.exception.SystemException { 3108 return _userLocalService.updateOpenId(userId, openId); 3109 } 3110 3111 /** 3112 * Sets the organizations that the user is in, removing and adding 3113 * organizations as necessary. 3114 * 3115 * @param userId the primary key of the user 3116 * @param newOrganizationIds the primary keys of the organizations 3117 * @param serviceContext the service context to be applied. Must set 3118 whether user indexing is enabled. 3119 * @throws PortalException if a user with the primary key could not be found 3120 * @throws SystemException if a system exception occurred 3121 */ 3122 public void updateOrganizations(long userId, long[] newOrganizationIds, 3123 com.liferay.portal.service.ServiceContext serviceContext) 3124 throws com.liferay.portal.kernel.exception.PortalException, 3125 com.liferay.portal.kernel.exception.SystemException { 3126 _userLocalService.updateOrganizations(userId, newOrganizationIds, 3127 serviceContext); 3128 } 3129 3130 /** 3131 * Updates the user's password without tracking or validation of the change. 3132 * 3133 * @param userId the primary key of the user 3134 * @param password1 the user's new password 3135 * @param password2 the user's new password confirmation 3136 * @param passwordReset whether the user should be asked to reset their 3137 password the next time they log in 3138 * @return the user 3139 * @throws PortalException if a user with the primary key could not be found 3140 * @throws SystemException if a system exception occurred 3141 */ 3142 public com.liferay.portal.model.User updatePassword(long userId, 3143 java.lang.String password1, java.lang.String password2, 3144 boolean passwordReset) 3145 throws com.liferay.portal.kernel.exception.PortalException, 3146 com.liferay.portal.kernel.exception.SystemException { 3147 return _userLocalService.updatePassword(userId, password1, password2, 3148 passwordReset); 3149 } 3150 3151 /** 3152 * Updates the user's password, optionally with tracking and validation of 3153 * the change. 3154 * 3155 * @param userId the primary key of the user 3156 * @param password1 the user's new password 3157 * @param password2 the user's new password confirmation 3158 * @param passwordReset whether the user should be asked to reset their 3159 password the next time they login 3160 * @param silentUpdate whether the password should be updated without being 3161 tracked, or validated. Primarily used for password imports. 3162 * @return the user 3163 * @throws PortalException if a user with the primary key could not be found 3164 * @throws SystemException if a system exception occurred 3165 */ 3166 public com.liferay.portal.model.User updatePassword(long userId, 3167 java.lang.String password1, java.lang.String password2, 3168 boolean passwordReset, boolean silentUpdate) 3169 throws com.liferay.portal.kernel.exception.PortalException, 3170 com.liferay.portal.kernel.exception.SystemException { 3171 return _userLocalService.updatePassword(userId, password1, password2, 3172 passwordReset, silentUpdate); 3173 } 3174 3175 /** 3176 * Updates the user's password with manually input information. This method 3177 * should only be used when performing maintenance. 3178 * 3179 * @param userId the primary key of the user 3180 * @param password the user's new password 3181 * @param passwordEncrypted the user's new encrypted password 3182 * @param passwordReset whether the user should be asked to reset their 3183 password the next time they login 3184 * @param passwordModifiedDate the new password modified date 3185 * @return the user 3186 * @throws PortalException if a user with the primary key could not be found 3187 * @throws SystemException if a system exception occurred 3188 */ 3189 public com.liferay.portal.model.User updatePasswordManually(long userId, 3190 java.lang.String password, boolean passwordEncrypted, 3191 boolean passwordReset, java.util.Date passwordModifiedDate) 3192 throws com.liferay.portal.kernel.exception.PortalException, 3193 com.liferay.portal.kernel.exception.SystemException { 3194 return _userLocalService.updatePasswordManually(userId, password, 3195 passwordEncrypted, passwordReset, passwordModifiedDate); 3196 } 3197 3198 /** 3199 * Updates whether the user should be asked to reset their password the next 3200 * time they login. 3201 * 3202 * @param userId the primary key of the user 3203 * @param passwordReset whether the user should be asked to reset their 3204 password the next time they login 3205 * @return the user 3206 * @throws PortalException if a user with the primary key could not be found 3207 * @throws SystemException if a system exception occurred 3208 */ 3209 public com.liferay.portal.model.User updatePasswordReset(long userId, 3210 boolean passwordReset) 3211 throws com.liferay.portal.kernel.exception.PortalException, 3212 com.liferay.portal.kernel.exception.SystemException { 3213 return _userLocalService.updatePasswordReset(userId, passwordReset); 3214 } 3215 3216 /** 3217 * Updates the user's portrait image. 3218 * 3219 * @param userId the primary key of the user 3220 * @param bytes the new portrait image data 3221 * @return the user 3222 * @throws PortalException if a user with the primary key could not be found 3223 or if the new portrait was invalid 3224 * @throws SystemException if a system exception occurred 3225 */ 3226 public com.liferay.portal.model.User updatePortrait(long userId, 3227 byte[] bytes) 3228 throws com.liferay.portal.kernel.exception.PortalException, 3229 com.liferay.portal.kernel.exception.SystemException { 3230 return _userLocalService.updatePortrait(userId, bytes); 3231 } 3232 3233 /** 3234 * Updates the user's password reset question and answer. 3235 * 3236 * @param userId the primary key of the user 3237 * @param question the user's new password reset question 3238 * @param answer the user's new password reset answer 3239 * @return the user 3240 * @throws PortalException if a user with the primary key could not be found 3241 or if the new question or answer were invalid 3242 * @throws SystemException if a system exception occurred 3243 */ 3244 public com.liferay.portal.model.User updateReminderQuery(long userId, 3245 java.lang.String question, java.lang.String answer) 3246 throws com.liferay.portal.kernel.exception.PortalException, 3247 com.liferay.portal.kernel.exception.SystemException { 3248 return _userLocalService.updateReminderQuery(userId, question, answer); 3249 } 3250 3251 /** 3252 * Updates the user's screen name. 3253 * 3254 * @param userId the primary key of the user 3255 * @param screenName the user's new screen name 3256 * @return the user 3257 * @throws PortalException if a user with the primary key could not be found 3258 or if the new screen name was invalid 3259 * @throws SystemException if a system exception occurred 3260 */ 3261 public com.liferay.portal.model.User updateScreenName(long userId, 3262 java.lang.String screenName) 3263 throws com.liferay.portal.kernel.exception.PortalException, 3264 com.liferay.portal.kernel.exception.SystemException { 3265 return _userLocalService.updateScreenName(userId, screenName); 3266 } 3267 3268 /** 3269 * Updates the user's workflow status. 3270 * 3271 * @param userId the primary key of the user 3272 * @param status the user's new workflow status 3273 * @return the user 3274 * @throws PortalException if a user with the primary key could not be found 3275 * @throws SystemException if a system exception occurred 3276 */ 3277 public com.liferay.portal.model.User updateStatus(long userId, int status) 3278 throws com.liferay.portal.kernel.exception.PortalException, 3279 com.liferay.portal.kernel.exception.SystemException { 3280 return _userLocalService.updateStatus(userId, status); 3281 } 3282 3283 /** 3284 * Updates the user. 3285 * 3286 * @param userId the primary key of the user 3287 * @param oldPassword the user's old password 3288 * @param newPassword1 the user's new password (optionally 3289 <code>null</code>) 3290 * @param newPassword2 the user's new password confirmation (optionally 3291 <code>null</code>) 3292 * @param passwordReset whether the user should be asked to reset their 3293 password the next time they login 3294 * @param reminderQueryQuestion the user's new password reset question 3295 * @param reminderQueryAnswer the user's new password reset answer 3296 * @param screenName the user's new screen name 3297 * @param emailAddress the user's new email address 3298 * @param facebookId the user's new Facebook ID 3299 * @param openId the user's new OpenID 3300 * @param languageId the user's new language ID 3301 * @param timeZoneId the user's new time zone ID 3302 * @param greeting the user's new greeting 3303 * @param comments the user's new comments 3304 * @param firstName the user's new first name 3305 * @param middleName the user's new middle name 3306 * @param lastName the user's new last name 3307 * @param prefixId the user's new name prefix ID 3308 * @param suffixId the user's new name suffix ID 3309 * @param male whether user is male 3310 * @param birthdayMonth the user's new birthday month (0-based, meaning 0 3311 for January) 3312 * @param birthdayDay the user's new birthday day 3313 * @param birthdayYear the user's birthday year 3314 * @param smsSn the user's new SMS screen name 3315 * @param aimSn the user's new AIM screen name 3316 * @param facebookSn the user's new Facebook screen name 3317 * @param icqSn the user's new ICQ screen name 3318 * @param jabberSn the user's new Jabber screen name 3319 * @param msnSn the user's new MSN screen name 3320 * @param mySpaceSn the user's new MySpace screen name 3321 * @param skypeSn the user's new Skype screen name 3322 * @param twitterSn the user's new Twitter screen name 3323 * @param ymSn the user's new Yahoo! Messenger screen name 3324 * @param jobTitle the user's new job title 3325 * @param groupIds the primary keys of the user's groups 3326 * @param organizationIds the primary keys of the user's organizations 3327 * @param roleIds the primary keys of the user's roles 3328 * @param userGroupRoles the user user's group roles 3329 * @param userGroupIds the primary keys of the user's user groups 3330 * @param serviceContext the user's service context (optionally 3331 <code>null</code>). Can set the universally unique identifier 3332 (with the <code>uuid</code> attribute), asset category IDs, asset 3333 tag names, and expando bridge attributes for the user. 3334 * @return the user 3335 * @throws PortalException if a user with the primary key could not be found 3336 or if the new information was invalid 3337 * @throws SystemException if a system exception occurred 3338 */ 3339 public com.liferay.portal.model.User updateUser(long userId, 3340 java.lang.String oldPassword, java.lang.String newPassword1, 3341 java.lang.String newPassword2, boolean passwordReset, 3342 java.lang.String reminderQueryQuestion, 3343 java.lang.String reminderQueryAnswer, java.lang.String screenName, 3344 java.lang.String emailAddress, long facebookId, 3345 java.lang.String openId, java.lang.String languageId, 3346 java.lang.String timeZoneId, java.lang.String greeting, 3347 java.lang.String comments, java.lang.String firstName, 3348 java.lang.String middleName, java.lang.String lastName, int prefixId, 3349 int suffixId, boolean male, int birthdayMonth, int birthdayDay, 3350 int birthdayYear, java.lang.String smsSn, java.lang.String aimSn, 3351 java.lang.String facebookSn, java.lang.String icqSn, 3352 java.lang.String jabberSn, java.lang.String msnSn, 3353 java.lang.String mySpaceSn, java.lang.String skypeSn, 3354 java.lang.String twitterSn, java.lang.String ymSn, 3355 java.lang.String jobTitle, long[] groupIds, long[] organizationIds, 3356 long[] roleIds, 3357 java.util.List<com.liferay.portal.model.UserGroupRole> userGroupRoles, 3358 long[] userGroupIds, 3359 com.liferay.portal.service.ServiceContext serviceContext) 3360 throws com.liferay.portal.kernel.exception.PortalException, 3361 com.liferay.portal.kernel.exception.SystemException { 3362 return _userLocalService.updateUser(userId, oldPassword, newPassword1, 3363 newPassword2, passwordReset, reminderQueryQuestion, 3364 reminderQueryAnswer, screenName, emailAddress, facebookId, openId, 3365 languageId, timeZoneId, greeting, comments, firstName, middleName, 3366 lastName, prefixId, suffixId, male, birthdayMonth, birthdayDay, 3367 birthdayYear, smsSn, aimSn, facebookSn, icqSn, jabberSn, msnSn, 3368 mySpaceSn, skypeSn, twitterSn, ymSn, jobTitle, groupIds, 3369 organizationIds, roleIds, userGroupRoles, userGroupIds, 3370 serviceContext); 3371 } 3372 3373 /** 3374 * Verifies the email address of the ticket. 3375 * 3376 * @param ticketKey the ticket key 3377 * @throws PortalException if a ticket matching the ticket key could not be 3378 found, if the ticket has expired, if the ticket is an email 3379 address ticket, or if the email address is invalid 3380 * @throws SystemException if a system exception occurred 3381 */ 3382 public void verifyEmailAddress(java.lang.String ticketKey) 3383 throws com.liferay.portal.kernel.exception.PortalException, 3384 com.liferay.portal.kernel.exception.SystemException { 3385 _userLocalService.verifyEmailAddress(ticketKey); 3386 } 3387 3388 /** 3389 * @deprecated Renamed to {@link #getWrappedService} 3390 */ 3391 public UserLocalService getWrappedUserLocalService() { 3392 return _userLocalService; 3393 } 3394 3395 /** 3396 * @deprecated Renamed to {@link #setWrappedService} 3397 */ 3398 public void setWrappedUserLocalService(UserLocalService userLocalService) { 3399 _userLocalService = userLocalService; 3400 } 3401 3402 public UserLocalService getWrappedService() { 3403 return _userLocalService; 3404 } 3405 3406 public void setWrappedService(UserLocalService userLocalService) { 3407 _userLocalService = userLocalService; 3408 } 3409 3410 private UserLocalService _userLocalService; 3411 }