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