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