001 /** 002 * Copyright (c) 2000-present 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 import aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.kernel.exception.PortalException; 020 import com.liferay.portal.kernel.exception.SystemException; 021 import com.liferay.portal.kernel.search.IndexableType; 022 import com.liferay.portal.kernel.transaction.Isolation; 023 import com.liferay.portal.kernel.transaction.Propagation; 024 import com.liferay.portal.kernel.transaction.Transactional; 025 026 /** 027 * Provides the local service interface for User. Methods of this 028 * service will not have security checks based on the propagated JAAS 029 * credentials because this service can only be accessed from within the same 030 * VM. 031 * 032 * @author Brian Wing Shun Chan 033 * @see UserLocalServiceUtil 034 * @see com.liferay.portal.service.base.UserLocalServiceBaseImpl 035 * @see com.liferay.portal.service.impl.UserLocalServiceImpl 036 * @generated 037 */ 038 @ProviderType 039 @Transactional(isolation = Isolation.PORTAL, rollbackFor = { 040 PortalException.class, SystemException.class}) 041 public interface UserLocalService extends BaseLocalService, 042 PersistedModelLocalService { 043 /* 044 * NOTE FOR DEVELOPERS: 045 * 046 * Never modify or reference this interface directly. Always use {@link UserLocalServiceUtil} to access the user local service. Add custom service methods to {@link com.liferay.portal.service.impl.UserLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. 047 */ 048 049 /** 050 * Adds a default admin user for the company. 051 * 052 * @param companyId the primary key of the user's company 053 * @param screenName the user's screen name 054 * @param emailAddress the user's email address 055 * @param locale the user's locale 056 * @param firstName the user's first name 057 * @param middleName the user's middle name 058 * @param lastName the user's last name 059 * @return the new default admin user 060 */ 061 public com.liferay.portal.model.User addDefaultAdminUser(long companyId, 062 java.lang.String screenName, java.lang.String emailAddress, 063 java.util.Locale locale, java.lang.String firstName, 064 java.lang.String middleName, java.lang.String lastName) 065 throws PortalException; 066 067 /** 068 * Adds the user to the default groups, unless the user is already in these 069 * groups. The default groups can be specified in 070 * <code>portal.properties</code> with the key 071 * <code>admin.default.group.names</code>. 072 * 073 * @param userId the primary key of the user 074 */ 075 public void addDefaultGroups(long userId) throws PortalException; 076 077 /** 078 * Adds the user to the default roles, unless the user already has these 079 * roles. The default roles can be specified in 080 * <code>portal.properties</code> with the key 081 * <code>admin.default.role.names</code>. 082 * 083 * @param userId the primary key of the user 084 */ 085 public void addDefaultRoles(long userId) throws PortalException; 086 087 /** 088 * Adds the user to the default user groups, unless the user is already in 089 * these user groups. The default user groups can be specified in 090 * <code>portal.properties</code> with the property 091 * <code>admin.default.user.group.names</code>. 092 * 093 * @param userId the primary key of the user 094 */ 095 public void addDefaultUserGroups(long userId) throws PortalException; 096 097 public void addGroupUser(long groupId, com.liferay.portal.model.User user); 098 099 public void addGroupUser(long groupId, long userId); 100 101 /** 102 * @throws PortalException 103 */ 104 public void addGroupUsers(long groupId, 105 java.util.List<com.liferay.portal.model.User> Users) 106 throws PortalException; 107 108 /** 109 * @throws PortalException 110 */ 111 public void addGroupUsers(long groupId, long[] userIds) 112 throws PortalException; 113 114 public void addOrganizationUser(long organizationId, 115 com.liferay.portal.model.User user); 116 117 public void addOrganizationUser(long organizationId, long userId); 118 119 /** 120 * @throws PortalException 121 */ 122 public void addOrganizationUsers(long organizationId, 123 java.util.List<com.liferay.portal.model.User> Users) 124 throws PortalException; 125 126 /** 127 * @throws PortalException 128 */ 129 public void addOrganizationUsers(long organizationId, long[] userIds) 130 throws PortalException; 131 132 /** 133 * Assigns the password policy to the users, removing any other currently 134 * assigned password policies. 135 * 136 * @param passwordPolicyId the primary key of the password policy 137 * @param userIds the primary keys of the users 138 */ 139 public void addPasswordPolicyUsers(long passwordPolicyId, long[] userIds); 140 141 public void addRoleUser(long roleId, com.liferay.portal.model.User user); 142 143 public void addRoleUser(long roleId, long userId); 144 145 /** 146 * @throws PortalException 147 */ 148 public void addRoleUsers(long roleId, 149 java.util.List<com.liferay.portal.model.User> Users) 150 throws PortalException; 151 152 /** 153 * @throws PortalException 154 */ 155 public void addRoleUsers(long roleId, long[] userIds) 156 throws PortalException; 157 158 public void addTeamUser(long teamId, com.liferay.portal.model.User user); 159 160 public void addTeamUser(long teamId, long userId); 161 162 /** 163 * @throws PortalException 164 */ 165 public void addTeamUsers(long teamId, 166 java.util.List<com.liferay.portal.model.User> Users) 167 throws PortalException; 168 169 /** 170 * @throws PortalException 171 */ 172 public void addTeamUsers(long teamId, long[] userIds) 173 throws PortalException; 174 175 /** 176 * Adds a user. 177 * 178 * <p> 179 * This method handles the creation and bookkeeping of the user including 180 * its resources, metadata, and internal data structures. It is not 181 * necessary to make subsequent calls to any methods to setup default 182 * groups, resources, etc. 183 * </p> 184 * 185 * @param creatorUserId the primary key of the creator 186 * @param companyId the primary key of the user's company 187 * @param autoPassword whether a password should be automatically generated 188 for the user 189 * @param password1 the user's password 190 * @param password2 the user's password confirmation 191 * @param autoScreenName whether a screen name should be automatically 192 generated for the user 193 * @param screenName the user's screen name 194 * @param emailAddress the user's email address 195 * @param facebookId the user's facebook ID 196 * @param openId the user's OpenID 197 * @param locale the user's locale 198 * @param firstName the user's first name 199 * @param middleName the user's middle name 200 * @param lastName the user's last name 201 * @param prefixId the user's name prefix ID 202 * @param suffixId the user's name suffix ID 203 * @param male whether the user is male 204 * @param birthdayMonth the user's birthday month (0-based, meaning 0 for 205 January) 206 * @param birthdayDay the user's birthday day 207 * @param birthdayYear the user's birthday year 208 * @param jobTitle the user's job title 209 * @param groupIds the primary keys of the user's groups 210 * @param organizationIds the primary keys of the user's organizations 211 * @param roleIds the primary keys of the roles this user possesses 212 * @param userGroupIds the primary keys of the user's user groups 213 * @param sendEmail whether to send the user an email notification about 214 their new account 215 * @param serviceContext the service context to be applied (optionally 216 <code>null</code>). Can set the UUID (with the <code>uuid</code> 217 attribute), asset category IDs, asset tag names, and expando 218 bridge attributes for the user. 219 * @return the new user 220 */ 221 public com.liferay.portal.model.User addUser(long creatorUserId, 222 long companyId, boolean autoPassword, java.lang.String password1, 223 java.lang.String password2, boolean autoScreenName, 224 java.lang.String screenName, java.lang.String emailAddress, 225 long facebookId, java.lang.String openId, java.util.Locale locale, 226 java.lang.String firstName, java.lang.String middleName, 227 java.lang.String lastName, long prefixId, long suffixId, boolean male, 228 int birthdayMonth, int birthdayDay, int birthdayYear, 229 java.lang.String jobTitle, long[] groupIds, long[] organizationIds, 230 long[] roleIds, long[] userGroupIds, boolean sendEmail, 231 com.liferay.portal.service.ServiceContext serviceContext) 232 throws PortalException; 233 234 /** 235 * Adds the user to the database. Also notifies the appropriate model listeners. 236 * 237 * @param user the user 238 * @return the user that was added 239 */ 240 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 241 public com.liferay.portal.model.User addUser( 242 com.liferay.portal.model.User user); 243 244 public void addUserGroupUser(long userGroupId, 245 com.liferay.portal.model.User user); 246 247 public void addUserGroupUser(long userGroupId, long userId); 248 249 /** 250 * @throws PortalException 251 */ 252 public void addUserGroupUsers(long userGroupId, 253 java.util.List<com.liferay.portal.model.User> Users) 254 throws PortalException; 255 256 /** 257 * @throws PortalException 258 */ 259 public void addUserGroupUsers(long userGroupId, long[] userIds) 260 throws PortalException; 261 262 /** 263 * Adds a user with workflow. 264 * 265 * <p> 266 * This method handles the creation and bookkeeping of the user including 267 * its resources, metadata, and internal data structures. It is not 268 * necessary to make subsequent calls to any methods to setup default 269 * groups, resources, etc. 270 * </p> 271 * 272 * @param creatorUserId the primary key of the creator 273 * @param companyId the primary key of the user's company 274 * @param autoPassword whether a password should be automatically generated 275 for the user 276 * @param password1 the user's password 277 * @param password2 the user's password confirmation 278 * @param autoScreenName whether a screen name should be automatically 279 generated for the user 280 * @param screenName the user's screen name 281 * @param emailAddress the user's email address 282 * @param facebookId the user's facebook ID 283 * @param openId the user's OpenID 284 * @param locale the user's locale 285 * @param firstName the user's first name 286 * @param middleName the user's middle name 287 * @param lastName the user's last name 288 * @param prefixId the user's name prefix ID 289 * @param suffixId the user's name suffix ID 290 * @param male whether the user is male 291 * @param birthdayMonth the user's birthday month (0-based, meaning 0 for 292 January) 293 * @param birthdayDay the user's birthday day 294 * @param birthdayYear the user's birthday year 295 * @param jobTitle the user's job title 296 * @param groupIds the primary keys of the user's groups 297 * @param organizationIds the primary keys of the user's organizations 298 * @param roleIds the primary keys of the roles this user possesses 299 * @param userGroupIds the primary keys of the user's user groups 300 * @param sendEmail whether to send the user an email notification about 301 their new account 302 * @param serviceContext the service context to be applied (optionally 303 <code>null</code>). Can set the UUID (with the <code>uuid</code> 304 attribute), asset category IDs, asset tag names, and expando 305 bridge attributes for the user. 306 * @return the new user 307 */ 308 public com.liferay.portal.model.User addUserWithWorkflow( 309 long creatorUserId, long companyId, boolean autoPassword, 310 java.lang.String password1, java.lang.String password2, 311 boolean autoScreenName, java.lang.String screenName, 312 java.lang.String emailAddress, long facebookId, 313 java.lang.String openId, java.util.Locale locale, 314 java.lang.String firstName, java.lang.String middleName, 315 java.lang.String lastName, long prefixId, long suffixId, boolean male, 316 int birthdayMonth, int birthdayDay, int birthdayYear, 317 java.lang.String jobTitle, long[] groupIds, long[] organizationIds, 318 long[] roleIds, long[] userGroupIds, boolean sendEmail, 319 com.liferay.portal.service.ServiceContext serviceContext) 320 throws PortalException; 321 322 /** 323 * Attempts to authenticate the user by their email address and password, 324 * while using the AuthPipeline. 325 * 326 * @param companyId the primary key of the user's company 327 * @param emailAddress the user's email address 328 * @param password the user's password 329 * @param headerMap the header map from the authentication request 330 * @param parameterMap the parameter map from the authentication request 331 * @param resultsMap the map of authentication results (may be nil). After 332 a successful authentication the user's primary key will be placed 333 under the key <code>userId</code>. 334 * @return the authentication status. This can be {@link 335 Authenticator#FAILURE} indicating that the user's credentials are 336 invalid, {@link Authenticator#SUCCESS} indicating a successful 337 login, or {@link Authenticator#DNE} indicating that a user with 338 that login does not exist. 339 * @see AuthPipeline 340 */ 341 public int authenticateByEmailAddress(long companyId, 342 java.lang.String emailAddress, java.lang.String password, 343 java.util.Map<java.lang.String, java.lang.String[]> headerMap, 344 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 345 java.util.Map<java.lang.String, java.lang.Object> resultsMap) 346 throws PortalException; 347 348 /** 349 * Attempts to authenticate the user by their screen name and password, 350 * while using the AuthPipeline. 351 * 352 * @param companyId the primary key of the user's company 353 * @param screenName the user's screen name 354 * @param password the user's password 355 * @param headerMap the header map from the authentication request 356 * @param parameterMap the parameter map from the authentication request 357 * @param resultsMap the map of authentication results (may be nil). After 358 a successful authentication the user's primary key will be placed 359 under the key <code>userId</code>. 360 * @return the authentication status. This can be {@link 361 Authenticator#FAILURE} indicating that the user's credentials are 362 invalid, {@link Authenticator#SUCCESS} indicating a successful 363 login, or {@link Authenticator#DNE} indicating that a user with 364 that login does not exist. 365 * @see AuthPipeline 366 */ 367 public int authenticateByScreenName(long companyId, 368 java.lang.String screenName, java.lang.String password, 369 java.util.Map<java.lang.String, java.lang.String[]> headerMap, 370 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 371 java.util.Map<java.lang.String, java.lang.Object> resultsMap) 372 throws PortalException; 373 374 /** 375 * Attempts to authenticate the user by their primary key and password, 376 * while using the AuthPipeline. 377 * 378 * @param companyId the primary key of the user's company 379 * @param userId the user's primary key 380 * @param password the user's password 381 * @param headerMap the header map from the authentication request 382 * @param parameterMap the parameter map from the authentication request 383 * @param resultsMap the map of authentication results (may be nil). After 384 a successful authentication the user's primary key will be placed 385 under the key <code>userId</code>. 386 * @return the authentication status. This can be {@link 387 Authenticator#FAILURE} indicating that the user's credentials are 388 invalid, {@link Authenticator#SUCCESS} indicating a successful 389 login, or {@link Authenticator#DNE} indicating that a user with 390 that login does not exist. 391 * @see AuthPipeline 392 */ 393 public int authenticateByUserId(long companyId, long userId, 394 java.lang.String password, 395 java.util.Map<java.lang.String, java.lang.String[]> headerMap, 396 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 397 java.util.Map<java.lang.String, java.lang.Object> resultsMap) 398 throws PortalException; 399 400 /** 401 * Attempts to authenticate the user using HTTP basic access authentication, 402 * without using the AuthPipeline. Primarily used for authenticating users 403 * of <code>tunnel-web</code>. 404 * 405 * <p> 406 * Authentication type specifies what <code>login</code> contains.The valid 407 * values are: 408 * </p> 409 * 410 * <ul> 411 * <li> 412 * <code>CompanyConstants.AUTH_TYPE_EA</code> - <code>login</code> is the 413 * user's email address 414 * </li> 415 * <li> 416 * <code>CompanyConstants.AUTH_TYPE_SN</code> - <code>login</code> is the 417 * user's screen name 418 * </li> 419 * <li> 420 * <code>CompanyConstants.AUTH_TYPE_ID</code> - <code>login</code> is the 421 * user's primary key 422 * </li> 423 * </ul> 424 * 425 * @param companyId the primary key of the user's company 426 * @param authType the type of authentication to perform 427 * @param login either the user's email address, screen name, or primary 428 key depending on the value of <code>authType</code> 429 * @param password the user's password 430 * @return the user's primary key if authentication is successful; 431 <code>0</code> otherwise 432 */ 433 @Transactional(propagation = Propagation.SUPPORTS) 434 public long authenticateForBasic(long companyId, java.lang.String authType, 435 java.lang.String login, java.lang.String password) 436 throws PortalException; 437 438 /** 439 * Attempts to authenticate the user using HTTP digest access 440 * authentication, without using the AuthPipeline. Primarily used for 441 * authenticating users of <code>tunnel-web</code>. 442 * 443 * @param companyId the primary key of the user's company 444 * @param username either the user's email address, screen name, or primary 445 key 446 * @param realm unused 447 * @param nonce the number used once 448 * @param method the request method 449 * @param uri the request URI 450 * @param response the authentication response hash 451 * @return the user's primary key if authentication is successful; 452 <code>0</code> otherwise 453 */ 454 @Transactional(propagation = Propagation.SUPPORTS) 455 public long authenticateForDigest(long companyId, 456 java.lang.String username, java.lang.String realm, 457 java.lang.String nonce, java.lang.String method, java.lang.String uri, 458 java.lang.String response) throws PortalException; 459 460 /** 461 * Attempts to authenticate the user using JAAS credentials, without using 462 * the AuthPipeline. 463 * 464 * @param userId the primary key of the user 465 * @param encPassword the encrypted password 466 * @return <code>true</code> if authentication is successful; 467 <code>false</code> otherwise 468 */ 469 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 470 public boolean authenticateForJAAS(long userId, java.lang.String encPassword); 471 472 /** 473 * Checks if the user is currently locked out based on the password policy, 474 * and performs maintenance on the user's lockout and failed login data. 475 * 476 * @param user the user 477 */ 478 public void checkLockout(com.liferay.portal.model.User user) 479 throws PortalException; 480 481 /** 482 * Adds a failed login attempt to the user and updates the user's last 483 * failed login date. 484 * 485 * @param user the user 486 */ 487 public void checkLoginFailure(com.liferay.portal.model.User user); 488 489 /** 490 * Adds a failed login attempt to the user with the email address and 491 * updates the user's last failed login date. 492 * 493 * @param companyId the primary key of the user's company 494 * @param emailAddress the user's email address 495 */ 496 public void checkLoginFailureByEmailAddress(long companyId, 497 java.lang.String emailAddress) throws PortalException; 498 499 /** 500 * Adds a failed login attempt to the user and updates the user's last 501 * failed login date. 502 * 503 * @param userId the primary key of the user 504 */ 505 public void checkLoginFailureById(long userId) throws PortalException; 506 507 /** 508 * Adds a failed login attempt to the user with the screen name and updates 509 * the user's last failed login date. 510 * 511 * @param companyId the primary key of the user's company 512 * @param screenName the user's screen name 513 */ 514 public void checkLoginFailureByScreenName(long companyId, 515 java.lang.String screenName) throws PortalException; 516 517 /** 518 * Checks if the user's password is expired based on the password policy, 519 * and performs maintenance on the user's grace login and password reset 520 * data. 521 * 522 * @param user the user 523 */ 524 public void checkPasswordExpired(com.liferay.portal.model.User user) 525 throws PortalException; 526 527 public void clearGroupUsers(long groupId); 528 529 public void clearOrganizationUsers(long organizationId); 530 531 public void clearRoleUsers(long roleId); 532 533 public void clearTeamUsers(long teamId); 534 535 public void clearUserGroupUsers(long userGroupId); 536 537 /** 538 * Completes the user's registration by generating a password and sending 539 * the confirmation email. 540 * 541 * @param user the user 542 * @param serviceContext the service context to be applied. You can specify 543 an unencrypted custom password for the user via attribute 544 <code>passwordUnencrypted</code>. You automatically generate a 545 password for the user by setting attribute 546 <code>autoPassword</code> to <code>true</code>. You can send a 547 confirmation email to the user by setting attribute 548 <code>sendEmail</code> to <code>true</code>. 549 */ 550 public void completeUserRegistration(com.liferay.portal.model.User user, 551 com.liferay.portal.service.ServiceContext serviceContext) 552 throws PortalException; 553 554 /** 555 * Creates a new user with the primary key. Does not add the user to the database. 556 * 557 * @param userId the primary key for the new user 558 * @return the new user 559 */ 560 public com.liferay.portal.model.User createUser(long userId); 561 562 /** 563 * Decrypts the user's primary key and password from their encrypted forms. 564 * Used for decrypting a user's credentials from the values stored in an 565 * automatic login cookie. 566 * 567 * @param companyId the primary key of the user's company 568 * @param name the encrypted primary key of the user 569 * @param password the encrypted password of the user 570 * @return the user's primary key and password 571 */ 572 public com.liferay.portal.kernel.util.KeyValuePair decryptUserId( 573 long companyId, java.lang.String name, java.lang.String password) 574 throws PortalException; 575 576 public void deleteGroupUser(long groupId, com.liferay.portal.model.User user); 577 578 public void deleteGroupUser(long groupId, long userId); 579 580 public void deleteGroupUsers(long groupId, 581 java.util.List<com.liferay.portal.model.User> Users); 582 583 public void deleteGroupUsers(long groupId, long[] userIds); 584 585 public void deleteOrganizationUser(long organizationId, 586 com.liferay.portal.model.User user); 587 588 public void deleteOrganizationUser(long organizationId, long userId); 589 590 public void deleteOrganizationUsers(long organizationId, 591 java.util.List<com.liferay.portal.model.User> Users); 592 593 public void deleteOrganizationUsers(long organizationId, long[] userIds); 594 595 /** 596 * @throws PortalException 597 */ 598 @Override 599 public com.liferay.portal.model.PersistedModel deletePersistedModel( 600 com.liferay.portal.model.PersistedModel persistedModel) 601 throws PortalException; 602 603 /** 604 * Deletes the user's portrait image. 605 * 606 * @param userId the primary key of the user 607 */ 608 public void deletePortrait(long userId) throws PortalException; 609 610 /** 611 * @throws PortalException 612 */ 613 public void deleteRoleUser(long roleId, com.liferay.portal.model.User user) 614 throws PortalException; 615 616 /** 617 * @throws PortalException 618 */ 619 public void deleteRoleUser(long roleId, long userId) 620 throws PortalException; 621 622 public void deleteRoleUsers(long roleId, 623 java.util.List<com.liferay.portal.model.User> Users); 624 625 public void deleteRoleUsers(long roleId, long[] userIds); 626 627 public void deleteTeamUser(long teamId, com.liferay.portal.model.User user); 628 629 public void deleteTeamUser(long teamId, long userId); 630 631 public void deleteTeamUsers(long teamId, 632 java.util.List<com.liferay.portal.model.User> Users); 633 634 public void deleteTeamUsers(long teamId, long[] userIds); 635 636 /** 637 * Deletes the user from the database. Also notifies the appropriate model listeners. 638 * 639 * @param user the user 640 * @return the user that was removed 641 * @throws PortalException 642 */ 643 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) 644 public com.liferay.portal.model.User deleteUser( 645 com.liferay.portal.model.User user) throws PortalException; 646 647 /** 648 * Deletes the user with the primary key from the database. Also notifies the appropriate model listeners. 649 * 650 * @param userId the primary key of the user 651 * @return the user that was removed 652 * @throws PortalException if a user with the primary key could not be found 653 */ 654 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) 655 public com.liferay.portal.model.User deleteUser(long userId) 656 throws PortalException; 657 658 /** 659 * @throws PortalException 660 */ 661 public void deleteUserGroupUser(long userGroupId, 662 com.liferay.portal.model.User user) throws PortalException; 663 664 /** 665 * @throws PortalException 666 */ 667 public void deleteUserGroupUser(long userGroupId, long userId) 668 throws PortalException; 669 670 public void deleteUserGroupUsers(long userGroupId, 671 java.util.List<com.liferay.portal.model.User> Users); 672 673 public void deleteUserGroupUsers(long userGroupId, long[] userIds); 674 675 public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery(); 676 677 /** 678 * Performs a dynamic query on the database and returns the matching rows. 679 * 680 * @param dynamicQuery the dynamic query 681 * @return the matching rows 682 */ 683 public <T> java.util.List<T> dynamicQuery( 684 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery); 685 686 /** 687 * Performs a dynamic query on the database and returns a range of the matching rows. 688 * 689 * <p> 690 * 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. 691 * </p> 692 * 693 * @param dynamicQuery the dynamic query 694 * @param start the lower bound of the range of model instances 695 * @param end the upper bound of the range of model instances (not inclusive) 696 * @return the range of matching rows 697 */ 698 public <T> java.util.List<T> dynamicQuery( 699 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 700 int end); 701 702 /** 703 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 704 * 705 * <p> 706 * 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. 707 * </p> 708 * 709 * @param dynamicQuery the dynamic query 710 * @param start the lower bound of the range of model instances 711 * @param end the upper bound of the range of model instances (not inclusive) 712 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 713 * @return the ordered range of matching rows 714 */ 715 public <T> java.util.List<T> dynamicQuery( 716 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 717 int end, 718 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator); 719 720 /** 721 * Returns the number of rows matching the dynamic query. 722 * 723 * @param dynamicQuery the dynamic query 724 * @return the number of rows matching the dynamic query 725 */ 726 public long dynamicQueryCount( 727 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery); 728 729 /** 730 * Returns the number of rows matching the dynamic query. 731 * 732 * @param dynamicQuery the dynamic query 733 * @param projection the projection to apply to the query 734 * @return the number of rows matching the dynamic query 735 */ 736 public long dynamicQueryCount( 737 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 738 com.liferay.portal.kernel.dao.orm.Projection projection); 739 740 /** 741 * Encrypts the primary key of the user. Used when encrypting the user's 742 * credentials for storage in an automatic login cookie. 743 * 744 * @param name the primary key of the user 745 * @return the user's encrypted primary key 746 */ 747 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 748 public java.lang.String encryptUserId(java.lang.String name) 749 throws PortalException; 750 751 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 752 public com.liferay.portal.model.User fetchUser(long userId); 753 754 /** 755 * Returns the user with the contact ID. 756 * 757 * @param contactId the user's contact ID 758 * @return the user with the contact ID, or <code>null</code> if a user with 759 the contact ID could not be found 760 */ 761 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 762 public com.liferay.portal.model.User fetchUserByContactId(long contactId); 763 764 /** 765 * Returns the user with the email address. 766 * 767 * @param companyId the primary key of the user's company 768 * @param emailAddress the user's email address 769 * @return the user with the email address, or <code>null</code> if a user 770 with the email address could not be found 771 */ 772 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 773 public com.liferay.portal.model.User fetchUserByEmailAddress( 774 long companyId, java.lang.String emailAddress); 775 776 /** 777 * Returns the user with the Facebook ID. 778 * 779 * @param companyId the primary key of the user's company 780 * @param facebookId the user's Facebook ID 781 * @return the user with the Facebook ID, or <code>null</code> if a user 782 with the Facebook ID could not be found 783 */ 784 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 785 public com.liferay.portal.model.User fetchUserByFacebookId(long companyId, 786 long facebookId); 787 788 /** 789 * Returns the user with the primary key. 790 * 791 * @param userId the primary key of the user 792 * @return the user with the primary key, or <code>null</code> if a user 793 with the primary key could not be found 794 */ 795 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 796 public com.liferay.portal.model.User fetchUserById(long userId); 797 798 /** 799 * Returns the user with the OpenID. 800 * 801 * @param companyId the primary key of the user's company 802 * @param openId the user's OpenID 803 * @return the user with the OpenID, or <code>null</code> if a user with the 804 OpenID could not be found 805 */ 806 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 807 public com.liferay.portal.model.User fetchUserByOpenId(long companyId, 808 java.lang.String openId); 809 810 /** 811 * Returns the user with the portrait ID. 812 * 813 * @param portraitId the user's portrait ID 814 * @return the user with the portrait ID, or <code>null</code> if a user 815 with the portrait ID could not be found 816 */ 817 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 818 public com.liferay.portal.model.User fetchUserByPortraitId(long portraitId); 819 820 /** 821 * Returns the user with the screen name. 822 * 823 * @param companyId the primary key of the user's company 824 * @param screenName the user's screen name 825 * @return the user with the screen name, or <code>null</code> if a user 826 with the screen name could not be found 827 */ 828 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 829 public com.liferay.portal.model.User fetchUserByScreenName(long companyId, 830 java.lang.String screenName); 831 832 /** 833 * Returns the user with the matching UUID and company. 834 * 835 * @param uuid the user's UUID 836 * @param companyId the primary key of the company 837 * @return the matching user, or <code>null</code> if a matching user could not be found 838 */ 839 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 840 public com.liferay.portal.model.User fetchUserByUuidAndCompanyId( 841 java.lang.String uuid, long companyId); 842 843 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 844 public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery(); 845 846 /** 847 * Returns a range of all the users belonging to the company. 848 * 849 * <p> 850 * Useful when paginating results. Returns a maximum of <code>end - 851 * start</code> instances. <code>start</code> and <code>end</code> are not 852 * primary keys, they are indexes in the result set. Thus, <code>0</code> 853 * refers to the first result in the set. Setting both <code>start</code> 854 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 855 * result set. 856 * </p> 857 * 858 * @param companyId the primary key of the company 859 * @param start the lower bound of the range of users 860 * @param end the upper bound of the range of users (not inclusive) 861 * @return the range of users belonging to the company 862 */ 863 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 864 public java.util.List<com.liferay.portal.model.User> getCompanyUsers( 865 long companyId, int start, int end); 866 867 /** 868 * Returns the number of users belonging to the company. 869 * 870 * @param companyId the primary key of the company 871 * @return the number of users belonging to the company 872 */ 873 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 874 public int getCompanyUsersCount(long companyId); 875 876 /** 877 * Returns the default user for the company. 878 * 879 * @param companyId the primary key of the company 880 * @return the default user for the company 881 */ 882 @com.liferay.portal.kernel.spring.aop.Skip 883 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 884 public com.liferay.portal.model.User getDefaultUser(long companyId) 885 throws PortalException; 886 887 /** 888 * Returns the primary key of the default user for the company. 889 * 890 * @param companyId the primary key of the company 891 * @return the primary key of the default user for the company 892 */ 893 @com.liferay.portal.kernel.spring.aop.Skip 894 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 895 public long getDefaultUserId(long companyId) throws PortalException; 896 897 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 898 public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery( 899 com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext); 900 901 /** 902 * Returns the groupIds of the groups associated with the user. 903 * 904 * @param userId the userId of the user 905 * @return long[] the groupIds of groups associated with the user 906 */ 907 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 908 public long[] getGroupPrimaryKeys(long userId); 909 910 /** 911 * Returns the primary keys of all the users belonging to the group. 912 * 913 * @param groupId the primary key of the group 914 * @return the primary keys of the users belonging to the group 915 */ 916 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 917 public long[] getGroupUserIds(long groupId); 918 919 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 920 public java.util.List<com.liferay.portal.model.User> getGroupUsers( 921 long groupId); 922 923 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 924 public java.util.List<com.liferay.portal.model.User> getGroupUsers( 925 long groupId, int start, int end); 926 927 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 928 public java.util.List<com.liferay.portal.model.User> getGroupUsers( 929 long groupId, int start, int end, 930 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.User> orderByComparator); 931 932 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 933 public int getGroupUsersCount(long groupId); 934 935 /** 936 * Returns the number of users with the status belonging to the group. 937 * 938 * @param groupId the primary key of the group 939 * @param status the workflow status 940 * @return the number of users with the status belonging to the group 941 */ 942 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 943 public int getGroupUsersCount(long groupId, int status) 944 throws PortalException; 945 946 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 947 public com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery(); 948 949 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 950 public java.util.List<com.liferay.portal.model.User> getInheritedRoleUsers( 951 long roleId, int start, int end, 952 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.User> obc) 953 throws PortalException; 954 955 /** 956 * Returns all the users who have not had any announcements of the type 957 * delivered, excluding the default user. 958 * 959 * @param type the type of announcement 960 * @return the users who have not had any annoucements of the type delivered 961 */ 962 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 963 public java.util.List<com.liferay.portal.model.User> getNoAnnouncementsDeliveries( 964 java.lang.String type); 965 966 /** 967 * Returns all the users who do not have any contacts. 968 * 969 * @return the users who do not have any contacts 970 */ 971 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 972 public java.util.List<com.liferay.portal.model.User> getNoContacts(); 973 974 /** 975 * Returns all the users who do not belong to any groups, excluding the 976 * default user. 977 * 978 * @return the users who do not belong to any groups 979 */ 980 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 981 public java.util.List<com.liferay.portal.model.User> getNoGroups(); 982 983 /** 984 * Returns the OSGi service identifier. 985 * 986 * @return the OSGi service identifier 987 */ 988 public java.lang.String getOSGiServiceIdentifier(); 989 990 /** 991 * Returns the organizationIds of the organizations associated with the user. 992 * 993 * @param userId the userId of the user 994 * @return long[] the organizationIds of organizations associated with the user 995 */ 996 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 997 public long[] getOrganizationPrimaryKeys(long userId); 998 999 /** 1000 * Returns the primary keys of all the users belonging to the organization. 1001 * 1002 * @param organizationId the primary key of the organization 1003 * @return the primary keys of the users belonging to the organization 1004 */ 1005 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1006 public long[] getOrganizationUserIds(long organizationId); 1007 1008 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1009 public java.util.List<com.liferay.portal.model.User> getOrganizationUsers( 1010 long organizationId); 1011 1012 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1013 public java.util.List<com.liferay.portal.model.User> getOrganizationUsers( 1014 long organizationId, int start, int end); 1015 1016 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1017 public java.util.List<com.liferay.portal.model.User> getOrganizationUsers( 1018 long organizationId, int start, int end, 1019 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.User> orderByComparator); 1020 1021 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1022 public int getOrganizationUsersCount(long organizationId); 1023 1024 /** 1025 * Returns the number of users with the status belonging to the 1026 * organization. 1027 * 1028 * @param organizationId the primary key of the organization 1029 * @param status the workflow status 1030 * @return the number of users with the status belonging to the organization 1031 */ 1032 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1033 public int getOrganizationUsersCount(long organizationId, int status) 1034 throws PortalException; 1035 1036 @Override 1037 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1038 public com.liferay.portal.model.PersistedModel getPersistedModel( 1039 java.io.Serializable primaryKeyObj) throws PortalException; 1040 1041 /** 1042 * Returns the roleIds of the roles associated with the user. 1043 * 1044 * @param userId the userId of the user 1045 * @return long[] the roleIds of roles associated with the user 1046 */ 1047 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1048 public long[] getRolePrimaryKeys(long userId); 1049 1050 /** 1051 * Returns the primary keys of all the users belonging to the role. 1052 * 1053 * @param roleId the primary key of the role 1054 * @return the primary keys of the users belonging to the role 1055 */ 1056 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1057 public long[] getRoleUserIds(long roleId); 1058 1059 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1060 public java.util.List<com.liferay.portal.model.User> getRoleUsers( 1061 long roleId); 1062 1063 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1064 public java.util.List<com.liferay.portal.model.User> getRoleUsers( 1065 long roleId, int start, int end); 1066 1067 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1068 public java.util.List<com.liferay.portal.model.User> getRoleUsers( 1069 long roleId, int start, int end, 1070 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.User> orderByComparator); 1071 1072 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1073 public int getRoleUsersCount(long roleId); 1074 1075 /** 1076 * Returns the number of users with the status belonging to the role. 1077 * 1078 * @param roleId the primary key of the role 1079 * @param status the workflow status 1080 * @return the number of users with the status belonging to the role 1081 */ 1082 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1083 public int getRoleUsersCount(long roleId, int status) 1084 throws PortalException; 1085 1086 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1087 public java.util.List<com.liferay.portal.model.User> getSocialUsers( 1088 long userId, int socialRelationType, 1089 java.lang.String socialRelationTypeComparator, int start, int end, 1090 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.User> obc) 1091 throws PortalException; 1092 1093 /** 1094 * Returns an ordered range of all the users with a social relation of the 1095 * type with the user. 1096 * 1097 * <p> 1098 * Useful when paginating results. Returns a maximum of <code>end - 1099 * start</code> instances. <code>start</code> and <code>end</code> are not 1100 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1101 * refers to the first result in the set. Setting both <code>start</code> 1102 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1103 * result set. 1104 * </p> 1105 * 1106 * @param userId the primary key of the user 1107 * @param socialRelationType the type of social relation. The possible 1108 types can be found in {@link SocialRelationConstants}. 1109 * @param start the lower bound of the range of users 1110 * @param end the upper bound of the range of users (not inclusive) 1111 * @param obc the comparator to order the users by (optionally 1112 <code>null</code>) 1113 * @return the ordered range of users with a social relation of the type 1114 with the user 1115 * @deprecated As of 7.0.0, replaced by {@link #getSocialUsers(long, int, 1116 String, int, int, OrderByComparator)} 1117 */ 1118 @java.lang.Deprecated 1119 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1120 public java.util.List<com.liferay.portal.model.User> getSocialUsers( 1121 long userId, int socialRelationType, int start, int end, 1122 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.User> obc) 1123 throws PortalException; 1124 1125 /** 1126 * Returns an ordered range of all the users with a social relation with the 1127 * user. 1128 * 1129 * <p> 1130 * Useful when paginating results. Returns a maximum of <code>end - 1131 * start</code> instances. <code>start</code> and <code>end</code> are not 1132 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1133 * refers to the first result in the set. Setting both <code>start</code> 1134 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1135 * result set. 1136 * </p> 1137 * 1138 * @param userId the primary key of the user 1139 * @param start the lower bound of the range of users 1140 * @param end the upper bound of the range of users (not inclusive) 1141 * @param obc the comparator to order the users by (optionally 1142 <code>null</code>) 1143 * @return the ordered range of users with a social relation with the 1144 user 1145 * @deprecated As of 7.0.0, replaced by {@link #getSocialUsers(long, int, 1146 String, int, int, OrderByComparator)} 1147 */ 1148 @java.lang.Deprecated 1149 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1150 public java.util.List<com.liferay.portal.model.User> getSocialUsers( 1151 long userId, int start, int end, 1152 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.User> obc) 1153 throws PortalException; 1154 1155 /** 1156 * Returns an ordered range of all the users with a mutual social relation 1157 * of the type with both of the given users. 1158 * 1159 * <p> 1160 * Useful when paginating results. Returns a maximum of <code>end - 1161 * start</code> instances. <code>start</code> and <code>end</code> are not 1162 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1163 * refers to the first result in the set. Setting both <code>start</code> 1164 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1165 * result set. 1166 * </p> 1167 * 1168 * @param userId1 the primary key of the first user 1169 * @param userId2 the primary key of the second user 1170 * @param socialRelationType the type of social relation. The possible 1171 types can be found in {@link SocialRelationConstants}. 1172 * @param start the lower bound of the range of users 1173 * @param end the upper bound of the range of users (not inclusive) 1174 * @param obc the comparator to order the users by (optionally 1175 <code>null</code>) 1176 * @return the ordered range of users with a mutual social relation of the 1177 type with the user 1178 */ 1179 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1180 public java.util.List<com.liferay.portal.model.User> getSocialUsers( 1181 long userId1, long userId2, int socialRelationType, int start, int end, 1182 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.User> obc) 1183 throws PortalException; 1184 1185 /** 1186 * Returns an ordered range of all the users with a mutual social relation 1187 * with both of the given users. 1188 * 1189 * <p> 1190 * Useful when paginating results. Returns a maximum of <code>end - 1191 * start</code> instances. <code>start</code> and <code>end</code> are not 1192 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1193 * refers to the first result in the set. Setting both <code>start</code> 1194 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1195 * result set. 1196 * </p> 1197 * 1198 * @param userId1 the primary key of the first user 1199 * @param userId2 the primary key of the second user 1200 * @param start the lower bound of the range of users 1201 * @param end the upper bound of the range of users (not inclusive) 1202 * @param obc the comparator to order the users by (optionally 1203 <code>null</code>) 1204 * @return the ordered range of users with a mutual social relation with the 1205 user 1206 */ 1207 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1208 public java.util.List<com.liferay.portal.model.User> getSocialUsers( 1209 long userId1, long userId2, int start, int end, 1210 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.User> obc) 1211 throws PortalException; 1212 1213 /** 1214 * Returns the number of users with a social relation with the user. 1215 * 1216 * @param userId the primary key of the user 1217 * @return the number of users with a social relation with the user 1218 * @deprecated As of 7.0.0, replaced by {@link #getSocialUsersCount(long, 1219 int, String)} 1220 */ 1221 @java.lang.Deprecated 1222 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1223 public int getSocialUsersCount(long userId) throws PortalException; 1224 1225 /** 1226 * Returns the number of users with a social relation of the type with the 1227 * user. 1228 * 1229 * @param userId the primary key of the user 1230 * @param socialRelationType the type of social relation. The possible 1231 types can be found in {@link SocialRelationConstants}. 1232 * @return the number of users with a social relation of the type with 1233 the user 1234 * @deprecated As of 7.0.0, replaced by {@link #getSocialUsersCount(long, 1235 int, String)} 1236 */ 1237 @java.lang.Deprecated 1238 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1239 public int getSocialUsersCount(long userId, int socialRelationType) 1240 throws PortalException; 1241 1242 /** 1243 * Returns the number of users with a social relation with the user. 1244 * 1245 * @param userId the primary key of the user 1246 * @param socialRelationType the type of social relation. The possible 1247 types can be found in {@link SocialRelationConstants}. 1248 * @return the number of users with a social relation with the user 1249 */ 1250 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1251 public int getSocialUsersCount(long userId, int socialRelationType, 1252 java.lang.String socialRelationTypeComparator) 1253 throws PortalException; 1254 1255 /** 1256 * Returns the number of users with a mutual social relation with both of 1257 * the given users. 1258 * 1259 * @param userId1 the primary key of the first user 1260 * @param userId2 the primary key of the second user 1261 * @return the number of users with a mutual social relation with the user 1262 */ 1263 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1264 public int getSocialUsersCount(long userId1, long userId2) 1265 throws PortalException; 1266 1267 /** 1268 * Returns the number of users with a mutual social relation of the type 1269 * with both of the given users. 1270 * 1271 * @param userId1 the primary key of the first user 1272 * @param userId2 the primary key of the second user 1273 * @param socialRelationType the type of social relation. The possible 1274 types can be found in {@link SocialRelationConstants}. 1275 * @return the number of users with a mutual social relation of the type 1276 with the user 1277 */ 1278 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1279 public int getSocialUsersCount(long userId1, long userId2, 1280 int socialRelationType) throws PortalException; 1281 1282 /** 1283 * Returns the teamIds of the teams associated with the user. 1284 * 1285 * @param userId the userId of the user 1286 * @return long[] the teamIds of teams associated with the user 1287 */ 1288 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1289 public long[] getTeamPrimaryKeys(long userId); 1290 1291 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1292 public java.util.List<com.liferay.portal.model.User> getTeamUsers( 1293 long teamId); 1294 1295 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1296 public java.util.List<com.liferay.portal.model.User> getTeamUsers( 1297 long teamId, int start, int end); 1298 1299 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1300 public java.util.List<com.liferay.portal.model.User> getTeamUsers( 1301 long teamId, int start, int end, 1302 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.User> orderByComparator); 1303 1304 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1305 public int getTeamUsersCount(long teamId); 1306 1307 /** 1308 * Returns the user with the primary key. 1309 * 1310 * @param userId the primary key of the user 1311 * @return the user 1312 * @throws PortalException if a user with the primary key could not be found 1313 */ 1314 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1315 public com.liferay.portal.model.User getUser(long userId) 1316 throws PortalException; 1317 1318 /** 1319 * Returns the user with the contact ID. 1320 * 1321 * @param contactId the user's contact ID 1322 * @return the user with the contact ID 1323 */ 1324 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1325 public com.liferay.portal.model.User getUserByContactId(long contactId) 1326 throws PortalException; 1327 1328 /** 1329 * Returns the user with the email address. 1330 * 1331 * @param companyId the primary key of the user's company 1332 * @param emailAddress the user's email address 1333 * @return the user with the email address 1334 */ 1335 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1336 public com.liferay.portal.model.User getUserByEmailAddress(long companyId, 1337 java.lang.String emailAddress) throws PortalException; 1338 1339 /** 1340 * Returns the user with the Facebook ID. 1341 * 1342 * @param companyId the primary key of the user's company 1343 * @param facebookId the user's Facebook ID 1344 * @return the user with the Facebook ID 1345 */ 1346 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1347 public com.liferay.portal.model.User getUserByFacebookId(long companyId, 1348 long facebookId) throws PortalException; 1349 1350 /** 1351 * Returns the user with the primary key from the company. 1352 * 1353 * @param companyId the primary key of the user's company 1354 * @param userId the primary key of the user 1355 * @return the user with the primary key 1356 */ 1357 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1358 public com.liferay.portal.model.User getUserById(long companyId, long userId) 1359 throws PortalException; 1360 1361 /** 1362 * Returns the user with the primary key. 1363 * 1364 * @param userId the primary key of the user 1365 * @return the user with the primary key 1366 */ 1367 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1368 public com.liferay.portal.model.User getUserById(long userId) 1369 throws PortalException; 1370 1371 /** 1372 * Returns the user with the OpenID. 1373 * 1374 * @param companyId the primary key of the user's company 1375 * @param openId the user's OpenID 1376 * @return the user with the OpenID 1377 */ 1378 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1379 public com.liferay.portal.model.User getUserByOpenId(long companyId, 1380 java.lang.String openId) throws PortalException; 1381 1382 /** 1383 * Returns the user with the portrait ID. 1384 * 1385 * @param portraitId the user's portrait ID 1386 * @return the user with the portrait ID 1387 */ 1388 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1389 public com.liferay.portal.model.User getUserByPortraitId(long portraitId) 1390 throws PortalException; 1391 1392 /** 1393 * Returns the user with the screen name. 1394 * 1395 * @param companyId the primary key of the user's company 1396 * @param screenName the user's screen name 1397 * @return the user with the screen name 1398 */ 1399 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1400 public com.liferay.portal.model.User getUserByScreenName(long companyId, 1401 java.lang.String screenName) throws PortalException; 1402 1403 /** 1404 * Returns the user with the UUID. 1405 * 1406 * @param uuid the user's UUID 1407 * @return the user with the UUID 1408 * @deprecated As of 6.2.0, replaced by {@link 1409 #getUserByUuidAndCompanyId(String, long)} 1410 */ 1411 @java.lang.Deprecated 1412 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1413 public com.liferay.portal.model.User getUserByUuid(java.lang.String uuid) 1414 throws PortalException; 1415 1416 /** 1417 * Returns the user with the matching UUID and company. 1418 * 1419 * @param uuid the user's UUID 1420 * @param companyId the primary key of the company 1421 * @return the matching user 1422 * @throws PortalException if a matching user could not be found 1423 */ 1424 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1425 public com.liferay.portal.model.User getUserByUuidAndCompanyId( 1426 java.lang.String uuid, long companyId) throws PortalException; 1427 1428 /** 1429 * Returns the userGroupIds of the user groups associated with the user. 1430 * 1431 * @param userId the userId of the user 1432 * @return long[] the userGroupIds of user groups associated with the user 1433 */ 1434 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1435 public long[] getUserGroupPrimaryKeys(long userId); 1436 1437 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1438 public java.util.List<com.liferay.portal.model.User> getUserGroupUsers( 1439 long userGroupId); 1440 1441 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1442 public java.util.List<com.liferay.portal.model.User> getUserGroupUsers( 1443 long userGroupId, int start, int end); 1444 1445 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1446 public java.util.List<com.liferay.portal.model.User> getUserGroupUsers( 1447 long userGroupId, int start, int end, 1448 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.User> orderByComparator); 1449 1450 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1451 public int getUserGroupUsersCount(long userGroupId); 1452 1453 /** 1454 * Returns the number of users with the status belonging to the user group. 1455 * 1456 * @param userGroupId the primary key of the user group 1457 * @param status the workflow status 1458 * @return the number of users with the status belonging to the user group 1459 */ 1460 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1461 public int getUserGroupUsersCount(long userGroupId, int status) 1462 throws PortalException; 1463 1464 /** 1465 * Returns the primary key of the user with the email address. 1466 * 1467 * @param companyId the primary key of the user's company 1468 * @param emailAddress the user's email address 1469 * @return the primary key of the user with the email address 1470 */ 1471 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1472 public long getUserIdByEmailAddress(long companyId, 1473 java.lang.String emailAddress) throws PortalException; 1474 1475 /** 1476 * Returns the primary key of the user with the screen name. 1477 * 1478 * @param companyId the primary key of the user's company 1479 * @param screenName the user's screen name 1480 * @return the primary key of the user with the screen name 1481 */ 1482 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1483 public long getUserIdByScreenName(long companyId, 1484 java.lang.String screenName) throws PortalException; 1485 1486 /** 1487 * Returns a range of all the users. 1488 * 1489 * <p> 1490 * 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. 1491 * </p> 1492 * 1493 * @param start the lower bound of the range of users 1494 * @param end the upper bound of the range of users (not inclusive) 1495 * @return the range of users 1496 */ 1497 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1498 public java.util.List<com.liferay.portal.model.User> getUsers(int start, 1499 int end); 1500 1501 /** 1502 * Returns the number of users. 1503 * 1504 * @return the number of users 1505 */ 1506 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1507 public int getUsersCount(); 1508 1509 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1510 public boolean hasGroupUser(long groupId, long userId); 1511 1512 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1513 public boolean hasGroupUsers(long groupId); 1514 1515 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1516 public boolean hasOrganizationUser(long organizationId, long userId); 1517 1518 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1519 public boolean hasOrganizationUsers(long organizationId); 1520 1521 /** 1522 * Returns <code>true</code> if the password policy has been assigned to the 1523 * user. 1524 * 1525 * @param passwordPolicyId the primary key of the password policy 1526 * @param userId the primary key of the user 1527 * @return <code>true</code> if the password policy is assigned to the user; 1528 <code>false</code> otherwise 1529 */ 1530 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1531 public boolean hasPasswordPolicyUser(long passwordPolicyId, long userId); 1532 1533 /** 1534 * Returns <code>true</code> if the user has the role with the name, 1535 * optionally through inheritance. 1536 * 1537 * @param companyId the primary key of the role's company 1538 * @param name the name of the role (must be a regular role, not an 1539 organization, site or provider role) 1540 * @param userId the primary key of the user 1541 * @param inherited whether to include roles inherited from organizations, 1542 sites, etc. 1543 * @return <code>true</code> if the user has the role; <code>false</code> 1544 otherwise 1545 */ 1546 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1547 public boolean hasRoleUser(long companyId, java.lang.String name, 1548 long userId, boolean inherited) throws PortalException; 1549 1550 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1551 public boolean hasRoleUser(long roleId, long userId); 1552 1553 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1554 public boolean hasRoleUsers(long roleId); 1555 1556 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1557 public boolean hasTeamUser(long teamId, long userId); 1558 1559 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1560 public boolean hasTeamUsers(long teamId); 1561 1562 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1563 public boolean hasUserGroupUser(long userGroupId, long userId); 1564 1565 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1566 public boolean hasUserGroupUsers(long userGroupId); 1567 1568 /** 1569 * Returns <code>true</code> if the user's password is expired. 1570 * 1571 * @param user the user 1572 * @return <code>true</code> if the user's password is expired; 1573 <code>false</code> otherwise 1574 */ 1575 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1576 public boolean isPasswordExpired(com.liferay.portal.model.User user) 1577 throws PortalException; 1578 1579 /** 1580 * Returns <code>true</code> if the password policy is configured to warn 1581 * the user that his password is expiring and the remaining time until 1582 * expiration is equal or less than the configured warning time. 1583 * 1584 * @param user the user 1585 * @return <code>true</code> if the user's password is expiring soon; 1586 <code>false</code> otherwise 1587 */ 1588 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1589 public boolean isPasswordExpiringSoon(com.liferay.portal.model.User user) 1590 throws PortalException; 1591 1592 /** 1593 * Returns the default user for the company. 1594 * 1595 * @param companyId the primary key of the company 1596 * @return the default user for the company 1597 */ 1598 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1599 public com.liferay.portal.model.User loadGetDefaultUser(long companyId) 1600 throws PortalException; 1601 1602 /** 1603 * Returns an ordered range of all the users with the status, and whose 1604 * first name, middle name, last name, screen name, and email address match 1605 * the keywords specified for them, without using the indexer. It is 1606 * preferable to use the indexed version {@link #search(long, String, 1607 * String, String, String, String, int, LinkedHashMap, boolean, int, int, 1608 * Sort)} instead of this method wherever possible for performance reasons. 1609 * 1610 * <p> 1611 * Useful when paginating results. Returns a maximum of <code>end - 1612 * start</code> instances. <code>start</code> and <code>end</code> are not 1613 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1614 * refers to the first result in the set. Setting both <code>start</code> 1615 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1616 * result set. 1617 * </p> 1618 * 1619 * @param companyId the primary key of the user's company 1620 * @param firstName the first name keywords (space separated) 1621 * @param middleName the middle name keywords 1622 * @param lastName the last name keywords 1623 * @param screenName the screen name keywords 1624 * @param emailAddress the email address keywords 1625 * @param status the workflow status 1626 * @param params the finder parameters (optionally <code>null</code>). For 1627 more information see {@link 1628 com.liferay.portal.service.persistence.UserFinder}. 1629 * @param andSearch whether every field must match its keywords, or just 1630 one field. For example, "users with the first name 'bob' and 1631 last name 'smith'" vs "users with the first name 'bob' 1632 or the last name 'smith'". 1633 * @param start the lower bound of the range of users 1634 * @param end the upper bound of the range of users (not inclusive) 1635 * @param obc the comparator to order the users by (optionally 1636 <code>null</code>) 1637 * @return the matching users 1638 * @see com.liferay.portal.service.persistence.UserFinder 1639 */ 1640 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1641 public java.util.List<com.liferay.portal.model.User> search( 1642 long companyId, java.lang.String firstName, 1643 java.lang.String middleName, java.lang.String lastName, 1644 java.lang.String screenName, java.lang.String emailAddress, int status, 1645 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1646 boolean andSearch, int start, int end, 1647 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.User> obc); 1648 1649 /** 1650 * Returns an ordered range of all the users with the status, and whose 1651 * first name, middle name, last name, screen name, and email address match 1652 * the keywords specified for them, using the indexer. It is preferable to 1653 * use this method instead of the non-indexed version whenever possible for 1654 * performance reasons. 1655 * 1656 * <p> 1657 * Useful when paginating results. Returns a maximum of <code>end - 1658 * start</code> instances. <code>start</code> and <code>end</code> are not 1659 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1660 * refers to the first result in the set. Setting both <code>start</code> 1661 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1662 * result set. 1663 * </p> 1664 * 1665 * @param companyId the primary key of the user's company 1666 * @param firstName the first name keywords (space separated) 1667 * @param middleName the middle name keywords 1668 * @param lastName the last name keywords 1669 * @param screenName the screen name keywords 1670 * @param emailAddress the email address keywords 1671 * @param status the workflow status 1672 * @param params the indexer parameters (optionally <code>null</code>). For 1673 more information see {@link 1674 com.liferay.portlet.usersadmin.util.UserIndexer}. 1675 * @param andSearch whether every field must match its keywords, or just 1676 one field. For example, "users with the first name 'bob' and 1677 last name 'smith'" vs "users with the first name 'bob' 1678 or the last name 'smith'". 1679 * @param start the lower bound of the range of users 1680 * @param end the upper bound of the range of users (not inclusive) 1681 * @param sort the field and direction to sort by (optionally 1682 <code>null</code>) 1683 * @return the matching users 1684 * @see com.liferay.portlet.usersadmin.util.UserIndexer 1685 */ 1686 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1687 public com.liferay.portal.kernel.search.Hits search(long companyId, 1688 java.lang.String firstName, java.lang.String middleName, 1689 java.lang.String lastName, java.lang.String screenName, 1690 java.lang.String emailAddress, int status, 1691 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1692 boolean andSearch, int start, int end, 1693 com.liferay.portal.kernel.search.Sort sort); 1694 1695 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1696 public com.liferay.portal.kernel.search.Hits search(long companyId, 1697 java.lang.String firstName, java.lang.String middleName, 1698 java.lang.String lastName, java.lang.String screenName, 1699 java.lang.String emailAddress, int status, 1700 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1701 boolean andSearch, int start, int end, 1702 com.liferay.portal.kernel.search.Sort[] sorts); 1703 1704 /** 1705 * Returns an ordered range of all the users who match the keywords and 1706 * status, without using the indexer. It is preferable to use the indexed 1707 * version {@link #search(long, String, int, LinkedHashMap, int, int, Sort)} 1708 * instead of this method wherever possible for performance reasons. 1709 * 1710 * <p> 1711 * Useful when paginating results. Returns a maximum of <code>end - 1712 * start</code> instances. <code>start</code> and <code>end</code> are not 1713 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1714 * refers to the first result in the set. Setting both <code>start</code> 1715 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1716 * result set. 1717 * </p> 1718 * 1719 * @param companyId the primary key of the user's company 1720 * @param keywords the keywords (space separated), which may occur in the 1721 user's first name, middle name, last name, screen name, or email 1722 address 1723 * @param status the workflow status 1724 * @param params the finder parameters (optionally <code>null</code>). For 1725 more information see {@link 1726 com.liferay.portal.service.persistence.UserFinder}. 1727 * @param start the lower bound of the range of users 1728 * @param end the upper bound of the range of users (not inclusive) 1729 * @param obc the comparator to order the users by (optionally 1730 <code>null</code>) 1731 * @return the matching users 1732 * @see com.liferay.portal.service.persistence.UserFinder 1733 */ 1734 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1735 public java.util.List<com.liferay.portal.model.User> search( 1736 long companyId, java.lang.String keywords, int status, 1737 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1738 int start, int end, 1739 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.User> obc); 1740 1741 /** 1742 * Returns an ordered range of all the users who match the keywords and 1743 * status, using the indexer. It is preferable to use this method instead of 1744 * the non-indexed version whenever possible for performance reasons. 1745 * 1746 * <p> 1747 * Useful when paginating results. Returns a maximum of <code>end - 1748 * start</code> instances. <code>start</code> and <code>end</code> are not 1749 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1750 * refers to the first result in the set. Setting both <code>start</code> 1751 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1752 * result set. 1753 * </p> 1754 * 1755 * @param companyId the primary key of the user's company 1756 * @param keywords the keywords (space separated), which may occur in the 1757 user's first name, middle name, last name, screen name, or email 1758 address 1759 * @param status the workflow status 1760 * @param params the indexer parameters (optionally <code>null</code>). For 1761 more information see {@link 1762 com.liferay.portlet.usersadmin.util.UserIndexer}. 1763 * @param start the lower bound of the range of users 1764 * @param end the upper bound of the range of users (not inclusive) 1765 * @param sort the field and direction to sort by (optionally 1766 <code>null</code>) 1767 * @return the matching users 1768 * @see com.liferay.portlet.usersadmin.util.UserIndexer 1769 */ 1770 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1771 public com.liferay.portal.kernel.search.Hits search(long companyId, 1772 java.lang.String keywords, int status, 1773 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1774 int start, int end, com.liferay.portal.kernel.search.Sort sort); 1775 1776 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1777 public com.liferay.portal.kernel.search.Hits search(long companyId, 1778 java.lang.String keywords, int status, 1779 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1780 int start, int end, com.liferay.portal.kernel.search.Sort[] sorts); 1781 1782 /** 1783 * Returns the number of users with the status, and whose first name, middle 1784 * name, last name, screen name, and email address match the keywords 1785 * specified for them. 1786 * 1787 * @param companyId the primary key of the user's company 1788 * @param firstName the first name keywords (space separated) 1789 * @param middleName the middle name keywords 1790 * @param lastName the last name keywords 1791 * @param screenName the screen name keywords 1792 * @param emailAddress the email address keywords 1793 * @param status the workflow status 1794 * @param params the finder parameters (optionally <code>null</code>). For 1795 more information see {@link 1796 com.liferay.portal.service.persistence.UserFinder}. 1797 * @param andSearch whether every field must match its keywords, or just 1798 one field. For example, "users with the first name 'bob' and 1799 last name 'smith'" vs "users with the first name 'bob' 1800 or the last name 'smith'". 1801 * @return the number of matching users 1802 */ 1803 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1804 public int searchCount(long companyId, java.lang.String firstName, 1805 java.lang.String middleName, java.lang.String lastName, 1806 java.lang.String screenName, java.lang.String emailAddress, int status, 1807 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1808 boolean andSearch); 1809 1810 /** 1811 * Returns the number of users who match the keywords and status. 1812 * 1813 * @param companyId the primary key of the user's company 1814 * @param keywords the keywords (space separated), which may occur in the 1815 user's first name, middle name, last name, screen name, or email 1816 address 1817 * @param status the workflow status 1818 * @param params the finder parameters (optionally <code>null</code>). For 1819 more information see {@link 1820 com.liferay.portal.service.persistence.UserFinder}. 1821 * @return the number matching users 1822 */ 1823 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1824 public int searchCount(long companyId, java.lang.String keywords, 1825 int status, 1826 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params); 1827 1828 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1829 public java.util.Map<java.lang.Long, java.lang.Integer> searchCounts( 1830 long companyId, int status, long[] groupIds); 1831 1832 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1833 public java.util.List<com.liferay.portal.model.User> searchSocial( 1834 long companyId, long[] groupIds, java.lang.String keywords, int start, 1835 int end); 1836 1837 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1838 public java.util.List<com.liferay.portal.model.User> searchSocial( 1839 long[] groupIds, long userId, int[] socialRelationTypes, 1840 java.lang.String keywords, int start, int end) 1841 throws PortalException; 1842 1843 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1844 public java.util.List<com.liferay.portal.model.User> searchSocial( 1845 long userId, int[] socialRelationTypes, java.lang.String keywords, 1846 int start, int end) throws PortalException; 1847 1848 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1849 public com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.model.User> searchUsers( 1850 long companyId, java.lang.String firstName, 1851 java.lang.String middleName, java.lang.String lastName, 1852 java.lang.String screenName, java.lang.String emailAddress, int status, 1853 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1854 boolean andSearch, int start, int end, 1855 com.liferay.portal.kernel.search.Sort sort) throws PortalException; 1856 1857 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1858 public com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.model.User> searchUsers( 1859 long companyId, java.lang.String firstName, 1860 java.lang.String middleName, java.lang.String lastName, 1861 java.lang.String screenName, java.lang.String emailAddress, int status, 1862 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1863 boolean andSearch, int start, int end, 1864 com.liferay.portal.kernel.search.Sort[] sorts) 1865 throws PortalException; 1866 1867 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1868 public com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.model.User> searchUsers( 1869 long companyId, java.lang.String keywords, int status, 1870 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1871 int start, int end, com.liferay.portal.kernel.search.Sort sort) 1872 throws PortalException; 1873 1874 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1875 public com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.model.User> searchUsers( 1876 long companyId, java.lang.String keywords, int status, 1877 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1878 int start, int end, com.liferay.portal.kernel.search.Sort[] sorts) 1879 throws PortalException; 1880 1881 /** 1882 * Sends an email address verification to the user. 1883 * 1884 * @param user the verification email recipient 1885 * @param emailAddress the recipient's email address 1886 * @param serviceContext the service context to be applied. Must set the 1887 portal URL, main path, primary key of the layout, remote address, 1888 remote host, and agent for the user. 1889 */ 1890 public void sendEmailAddressVerification( 1891 com.liferay.portal.model.User user, java.lang.String emailAddress, 1892 com.liferay.portal.service.ServiceContext serviceContext) 1893 throws PortalException; 1894 1895 /** 1896 * Sends the password email to the user with the email address. The content 1897 * of this email can be specified in <code>portal.properties</code> with the 1898 * <code>admin.email.password</code> keys. 1899 * 1900 * @param companyId the primary key of the user's company 1901 * @param emailAddress the user's email address 1902 * @param fromName the name of the individual that the email should be from 1903 * @param fromAddress the address of the individual that the email should be 1904 from 1905 * @param subject the email subject. If <code>null</code>, the subject 1906 specified in <code>portal.properties</code> will be used. 1907 * @param body the email body. If <code>null</code>, the body specified in 1908 <code>portal.properties</code> will be used. 1909 * @param serviceContext the service context to be applied 1910 */ 1911 public boolean sendPassword(long companyId, java.lang.String emailAddress, 1912 java.lang.String fromName, java.lang.String fromAddress, 1913 java.lang.String subject, java.lang.String body, 1914 com.liferay.portal.service.ServiceContext serviceContext) 1915 throws PortalException; 1916 1917 /** 1918 * Sends a password notification email to the user matching the email 1919 * address. The portal's settings determine whether a password is sent 1920 * explicitly or whether a link for resetting the user's password is sent. 1921 * The method sends the email asynchronously and returns before the email is 1922 * sent. 1923 * 1924 * <p> 1925 * The content of the notification email is specified with the 1926 * <code>admin.email.password</code> portal property keys. They can be 1927 * overridden via a <code>portal-ext.properties</code> file or modified 1928 * through the Portal Settings UI. 1929 * </p> 1930 * 1931 * @param companyId the primary key of the user's company 1932 * @param emailAddress the user's email address 1933 * @return <code>true</code> if the notification email includes a new 1934 password; <code>false</code> if the notification email only 1935 contains a reset link 1936 */ 1937 public boolean sendPasswordByEmailAddress(long companyId, 1938 java.lang.String emailAddress) throws PortalException; 1939 1940 /** 1941 * Sends a password notification email to the user matching the screen name. 1942 * The portal's settings determine whether a password is sent explicitly or 1943 * whether a link for resetting the user's password is sent. The method 1944 * sends the email asynchronously and returns before the email is sent. 1945 * 1946 * <p> 1947 * The content of the notification email is specified with the 1948 * <code>admin.email.password</code> portal property keys. They can be 1949 * overridden via a <code>portal-ext.properties</code> file or modified 1950 * through the Portal Settings UI. 1951 * </p> 1952 * 1953 * @param companyId the primary key of the user's company 1954 * @param screenName the user's screen name 1955 * @return <code>true</code> if the notification email includes a new 1956 password; <code>false</code> if the notification email only 1957 contains a reset link 1958 */ 1959 public boolean sendPasswordByScreenName(long companyId, 1960 java.lang.String screenName) throws PortalException; 1961 1962 /** 1963 * Sends a password notification email to the user matching the ID. The 1964 * portal's settings determine whether a password is sent explicitly or 1965 * whether a link for resetting the user's password is sent. The method 1966 * sends the email asynchronously and returns before the email is sent. 1967 * 1968 * <p> 1969 * The content of the notification email is specified with the 1970 * <code>admin.email.password</code> portal property keys. They can be 1971 * overridden via a <code>portal-ext.properties</code> file or modified 1972 * through the Portal Settings UI. 1973 * </p> 1974 * 1975 * @param userId the user's primary key 1976 * @return <code>true</code> if the notification email includes a new 1977 password; <code>false</code> if the notification email only 1978 contains a reset link 1979 */ 1980 public boolean sendPasswordByUserId(long userId) throws PortalException; 1981 1982 public void setGroupUsers(long groupId, long[] userIds); 1983 1984 public void setOrganizationUsers(long organizationId, long[] userIds); 1985 1986 /** 1987 * @throws PortalException 1988 */ 1989 public void setRoleUsers(long roleId, long[] userIds) 1990 throws PortalException; 1991 1992 public void setTeamUsers(long teamId, long[] userIds); 1993 1994 /** 1995 * @throws PortalException 1996 */ 1997 public void setUserGroupUsers(long userGroupId, long[] userIds) 1998 throws PortalException; 1999 2000 /** 2001 * Removes the users from the teams of a group. 2002 * 2003 * @param groupId the primary key of the group 2004 * @param userIds the primary keys of the users 2005 */ 2006 public void unsetGroupTeamsUsers(long groupId, long[] userIds) 2007 throws PortalException; 2008 2009 /** 2010 * Removes the users from the group. 2011 * 2012 * @param groupId the primary key of the group 2013 * @param userIds the primary keys of the users 2014 * @param serviceContext the service context to be applied (optionally 2015 <code>null</code>) 2016 */ 2017 public void unsetGroupUsers(long groupId, long[] userIds, 2018 com.liferay.portal.service.ServiceContext serviceContext) 2019 throws PortalException; 2020 2021 /** 2022 * Removes the users from the organization. 2023 * 2024 * @param organizationId the primary key of the organization 2025 * @param userIds the primary keys of the users 2026 */ 2027 public void unsetOrganizationUsers(long organizationId, long[] userIds) 2028 throws PortalException; 2029 2030 /** 2031 * Removes the users from the password policy. 2032 * 2033 * @param passwordPolicyId the primary key of the password policy 2034 * @param userIds the primary keys of the users 2035 */ 2036 public void unsetPasswordPolicyUsers(long passwordPolicyId, long[] userIds); 2037 2038 /** 2039 * Removes the users from the role. 2040 * 2041 * @param roleId the primary key of the role 2042 * @param userIds the primary keys of the users 2043 */ 2044 public void unsetRoleUsers(long roleId, long[] userIds) 2045 throws PortalException; 2046 2047 /** 2048 * Removes the users from the role. 2049 * 2050 * @param roleId the primary key of the role 2051 * @param users the users 2052 */ 2053 public void unsetRoleUsers(long roleId, 2054 java.util.List<com.liferay.portal.model.User> users) 2055 throws PortalException; 2056 2057 /** 2058 * Removes the users from the team. 2059 * 2060 * @param teamId the primary key of the team 2061 * @param userIds the primary keys of the users 2062 */ 2063 public void unsetTeamUsers(long teamId, long[] userIds) 2064 throws PortalException; 2065 2066 /** 2067 * Removes the users from the user group. 2068 * 2069 * @param userGroupId the primary key of the user group 2070 * @param userIds the primary keys of the users 2071 */ 2072 public void unsetUserGroupUsers(long userGroupId, long[] userIds) 2073 throws PortalException; 2074 2075 /** 2076 * Updates whether the user has agreed to the terms of use. 2077 * 2078 * @param userId the primary key of the user 2079 * @param agreedToTermsOfUse whether the user has agreet to the terms of 2080 use 2081 * @return the user 2082 */ 2083 public com.liferay.portal.model.User updateAgreedToTermsOfUse(long userId, 2084 boolean agreedToTermsOfUse) throws PortalException; 2085 2086 /** 2087 * Updates the user's asset with the new asset categories and tag names, 2088 * removing and adding asset categories and tag names as necessary. 2089 * 2090 * @param userId the primary key of the user 2091 * @param user ID the primary key of the user 2092 * @param assetCategoryIds the primary key's of the new asset categories 2093 * @param assetTagNames the new asset tag names 2094 */ 2095 public void updateAsset(long userId, com.liferay.portal.model.User user, 2096 long[] assetCategoryIds, java.lang.String[] assetTagNames) 2097 throws PortalException; 2098 2099 /** 2100 * Updates the user's creation date. 2101 * 2102 * @param userId the primary key of the user 2103 * @param createDate the new creation date 2104 * @return the user 2105 */ 2106 public com.liferay.portal.model.User updateCreateDate(long userId, 2107 java.util.Date createDate) throws PortalException; 2108 2109 /** 2110 * Updates the user's email address. 2111 * 2112 * @param userId the primary key of the user 2113 * @param password the user's password 2114 * @param emailAddress1 the user's new email address 2115 * @param emailAddress2 the user's new email address confirmation 2116 * @return the user 2117 */ 2118 public com.liferay.portal.model.User updateEmailAddress(long userId, 2119 java.lang.String password, java.lang.String emailAddress1, 2120 java.lang.String emailAddress2) throws PortalException; 2121 2122 /** 2123 * Updates the user's email address or sends verification email. 2124 * 2125 * @param userId the primary key of the user 2126 * @param password the user's password 2127 * @param emailAddress1 the user's new email address 2128 * @param emailAddress2 the user's new email address confirmation 2129 * @param serviceContext the service context to be applied. Must set the 2130 portal URL, main path, primary key of the layout, remote address, 2131 remote host, and agent for the user. 2132 * @return the user 2133 */ 2134 public com.liferay.portal.model.User updateEmailAddress(long userId, 2135 java.lang.String password, java.lang.String emailAddress1, 2136 java.lang.String emailAddress2, 2137 com.liferay.portal.service.ServiceContext serviceContext) 2138 throws PortalException; 2139 2140 /** 2141 * Updates whether the user has verified email address. 2142 * 2143 * @param userId the primary key of the user 2144 * @param emailAddressVerified whether the user has verified email address 2145 * @return the user 2146 */ 2147 public com.liferay.portal.model.User updateEmailAddressVerified( 2148 long userId, boolean emailAddressVerified) throws PortalException; 2149 2150 /** 2151 * Updates the user's Facebook ID. 2152 * 2153 * @param userId the primary key of the user 2154 * @param facebookId the user's new Facebook ID 2155 * @return the user 2156 */ 2157 public com.liferay.portal.model.User updateFacebookId(long userId, 2158 long facebookId) throws PortalException; 2159 2160 /** 2161 * Sets the groups the user is in, removing and adding groups as necessary. 2162 * 2163 * @param userId the primary key of the user 2164 * @param newGroupIds the primary keys of the groups 2165 * @param serviceContext the service context to be applied (optionally 2166 <code>null</code>) 2167 */ 2168 public void updateGroups(long userId, long[] newGroupIds, 2169 com.liferay.portal.service.ServiceContext serviceContext) 2170 throws PortalException; 2171 2172 /** 2173 * Updates a user account that was automatically created when a guest user 2174 * participated in an action (e.g. posting a comment) and only provided his 2175 * name and email address. 2176 * 2177 * @param creatorUserId the primary key of the creator 2178 * @param companyId the primary key of the user's company 2179 * @param autoPassword whether a password should be automatically generated 2180 for the user 2181 * @param password1 the user's password 2182 * @param password2 the user's password confirmation 2183 * @param autoScreenName whether a screen name should be automatically 2184 generated for the user 2185 * @param screenName the user's screen name 2186 * @param emailAddress the user's email address 2187 * @param facebookId the user's facebook ID 2188 * @param openId the user's OpenID 2189 * @param locale the user's locale 2190 * @param firstName the user's first name 2191 * @param middleName the user's middle name 2192 * @param lastName the user's last name 2193 * @param prefixId the user's name prefix ID 2194 * @param suffixId the user's name suffix ID 2195 * @param male whether the user is male 2196 * @param birthdayMonth the user's birthday month (0-based, meaning 0 for 2197 January) 2198 * @param birthdayDay the user's birthday day 2199 * @param birthdayYear the user's birthday year 2200 * @param jobTitle the user's job title 2201 * @param updateUserInformation whether to update the user's information 2202 * @param sendEmail whether to send the user an email notification about 2203 their new account 2204 * @param serviceContext the service context to be applied (optionally 2205 <code>null</code>). Can set expando bridge attributes for the 2206 user. 2207 * @return the user 2208 */ 2209 public com.liferay.portal.model.User updateIncompleteUser( 2210 long creatorUserId, long companyId, boolean autoPassword, 2211 java.lang.String password1, java.lang.String password2, 2212 boolean autoScreenName, java.lang.String screenName, 2213 java.lang.String emailAddress, long facebookId, 2214 java.lang.String openId, java.util.Locale locale, 2215 java.lang.String firstName, java.lang.String middleName, 2216 java.lang.String lastName, long prefixId, long suffixId, boolean male, 2217 int birthdayMonth, int birthdayDay, int birthdayYear, 2218 java.lang.String jobTitle, boolean updateUserInformation, 2219 boolean sendEmail, 2220 com.liferay.portal.service.ServiceContext serviceContext) 2221 throws PortalException; 2222 2223 /** 2224 * Updates the user's job title. 2225 * 2226 * @param userId the primary key of the user 2227 * @param jobTitle the user's job title 2228 * @return the user 2229 */ 2230 public com.liferay.portal.model.User updateJobTitle(long userId, 2231 java.lang.String jobTitle) throws PortalException; 2232 2233 /** 2234 * Updates the user's last login with the current time and the IP address. 2235 * 2236 * @param userId the primary key of the user 2237 * @param loginIP the IP address the user logged in from 2238 * @return the user 2239 */ 2240 public com.liferay.portal.model.User updateLastLogin(long userId, 2241 java.lang.String loginIP) throws PortalException; 2242 2243 /** 2244 * Updates whether the user is locked out from logging in. 2245 * 2246 * @param user the user 2247 * @param lockout whether the user is locked out 2248 * @return the user 2249 */ 2250 public com.liferay.portal.model.User updateLockout( 2251 com.liferay.portal.model.User user, boolean lockout) 2252 throws PortalException; 2253 2254 /** 2255 * Updates whether the user is locked out from logging in. 2256 * 2257 * @param companyId the primary key of the user's company 2258 * @param emailAddress the user's email address 2259 * @param lockout whether the user is locked out 2260 * @return the user 2261 */ 2262 public com.liferay.portal.model.User updateLockoutByEmailAddress( 2263 long companyId, java.lang.String emailAddress, boolean lockout) 2264 throws PortalException; 2265 2266 /** 2267 * Updates whether the user is locked out from logging in. 2268 * 2269 * @param userId the primary key of the user 2270 * @param lockout whether the user is locked out 2271 * @return the user 2272 */ 2273 public com.liferay.portal.model.User updateLockoutById(long userId, 2274 boolean lockout) throws PortalException; 2275 2276 /** 2277 * Updates whether the user is locked out from logging in. 2278 * 2279 * @param companyId the primary key of the user's company 2280 * @param screenName the user's screen name 2281 * @param lockout whether the user is locked out 2282 * @return the user 2283 */ 2284 public com.liferay.portal.model.User updateLockoutByScreenName( 2285 long companyId, java.lang.String screenName, boolean lockout) 2286 throws PortalException; 2287 2288 /** 2289 * Updates the user's modified date. 2290 * 2291 * @param userId the primary key of the user 2292 * @param modifiedDate the new modified date 2293 * @return the user 2294 */ 2295 public com.liferay.portal.model.User updateModifiedDate(long userId, 2296 java.util.Date modifiedDate) throws PortalException; 2297 2298 /** 2299 * Updates the user's OpenID. 2300 * 2301 * @param userId the primary key of the user 2302 * @param openId the new OpenID 2303 * @return the user 2304 */ 2305 public com.liferay.portal.model.User updateOpenId(long userId, 2306 java.lang.String openId) throws PortalException; 2307 2308 /** 2309 * Sets the organizations that the user is in, removing and adding 2310 * organizations as necessary. 2311 * 2312 * @param userId the primary key of the user 2313 * @param newOrganizationIds the primary keys of the organizations 2314 * @param serviceContext the service context to be applied. Must set whether 2315 user indexing is enabled. 2316 */ 2317 public void updateOrganizations(long userId, long[] newOrganizationIds, 2318 com.liferay.portal.service.ServiceContext serviceContext) 2319 throws PortalException; 2320 2321 /** 2322 * Updates the user's password without tracking or validation of the change. 2323 * 2324 * @param userId the primary key of the user 2325 * @param password1 the user's new password 2326 * @param password2 the user's new password confirmation 2327 * @param passwordReset whether the user should be asked to reset their 2328 password the next time they log in 2329 * @return the user 2330 */ 2331 public com.liferay.portal.model.User updatePassword(long userId, 2332 java.lang.String password1, java.lang.String password2, 2333 boolean passwordReset) throws PortalException; 2334 2335 /** 2336 * Updates the user's password, optionally with tracking and validation of 2337 * the change. 2338 * 2339 * @param userId the primary key of the user 2340 * @param password1 the user's new password 2341 * @param password2 the user's new password confirmation 2342 * @param passwordReset whether the user should be asked to reset their 2343 password the next time they login 2344 * @param silentUpdate whether the password should be updated without being 2345 tracked, or validated. Primarily used for password imports. 2346 * @return the user 2347 */ 2348 public com.liferay.portal.model.User updatePassword(long userId, 2349 java.lang.String password1, java.lang.String password2, 2350 boolean passwordReset, boolean silentUpdate) throws PortalException; 2351 2352 /** 2353 * Updates the user's password with manually input information. This method 2354 * should only be used when performing maintenance. 2355 * 2356 * @param userId the primary key of the user 2357 * @param password the user's new password 2358 * @param passwordEncrypted the user's new encrypted password 2359 * @param passwordReset whether the user should be asked to reset their 2360 password the next time they login 2361 * @param passwordModifiedDate the new password modified date 2362 * @return the user 2363 */ 2364 public com.liferay.portal.model.User updatePasswordManually(long userId, 2365 java.lang.String password, boolean passwordEncrypted, 2366 boolean passwordReset, java.util.Date passwordModifiedDate) 2367 throws PortalException; 2368 2369 /** 2370 * Updates whether the user should be asked to reset their password the next 2371 * time they login. 2372 * 2373 * @param userId the primary key of the user 2374 * @param passwordReset whether the user should be asked to reset their 2375 password the next time they login 2376 * @return the user 2377 */ 2378 public com.liferay.portal.model.User updatePasswordReset(long userId, 2379 boolean passwordReset) throws PortalException; 2380 2381 /** 2382 * Updates the user's portrait image. 2383 * 2384 * @param userId the primary key of the user 2385 * @param bytes the new portrait image data 2386 * @return the user 2387 */ 2388 public com.liferay.portal.model.User updatePortrait(long userId, 2389 byte[] bytes) throws PortalException; 2390 2391 /** 2392 * Updates the user's password reset question and answer. 2393 * 2394 * @param userId the primary key of the user 2395 * @param question the user's new password reset question 2396 * @param answer the user's new password reset answer 2397 * @return the user 2398 */ 2399 public com.liferay.portal.model.User updateReminderQuery(long userId, 2400 java.lang.String question, java.lang.String answer) 2401 throws PortalException; 2402 2403 /** 2404 * Updates the user's screen name. 2405 * 2406 * @param userId the primary key of the user 2407 * @param screenName the user's new screen name 2408 * @return the user 2409 */ 2410 public com.liferay.portal.model.User updateScreenName(long userId, 2411 java.lang.String screenName) throws PortalException; 2412 2413 /** 2414 * Updates the user's workflow status. 2415 * 2416 * @param userId the primary key of the user 2417 * @param status the user's new workflow status 2418 * @return the user 2419 * @deprecated As of 7.0.0, replaced by {@link #updateStatus(long, int, 2420 ServiceContext)} 2421 */ 2422 @java.lang.Deprecated 2423 public com.liferay.portal.model.User updateStatus(long userId, int status) 2424 throws PortalException; 2425 2426 /** 2427 * Updates the user's workflow status. 2428 * 2429 * @param userId the primary key of the user 2430 * @param status the user's new workflow status 2431 * @param serviceContext the service context to be applied. You can specify 2432 an unencrypted custom password (used by an LDAP listener) for the 2433 user via attribute <code>passwordUnencrypted</code>. 2434 * @return the user 2435 */ 2436 public com.liferay.portal.model.User updateStatus(long userId, int status, 2437 com.liferay.portal.service.ServiceContext serviceContext) 2438 throws PortalException; 2439 2440 /** 2441 * Updates the user in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 2442 * 2443 * @param user the user 2444 * @return the user that was updated 2445 */ 2446 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 2447 public com.liferay.portal.model.User updateUser( 2448 com.liferay.portal.model.User user); 2449 2450 /** 2451 * Updates the user. 2452 * 2453 * @param userId the primary key of the user 2454 * @param oldPassword the user's old password 2455 * @param newPassword1 the user's new password (optionally 2456 <code>null</code>) 2457 * @param newPassword2 the user's new password confirmation (optionally 2458 <code>null</code>) 2459 * @param passwordReset whether the user should be asked to reset their 2460 password the next time they login 2461 * @param reminderQueryQuestion the user's new password reset question 2462 * @param reminderQueryAnswer the user's new password reset answer 2463 * @param screenName the user's new screen name 2464 * @param emailAddress the user's new email address 2465 * @param facebookId the user's new Facebook ID 2466 * @param openId the user's new OpenID 2467 * @param languageId the user's new language ID 2468 * @param timeZoneId the user's new time zone ID 2469 * @param greeting the user's new greeting 2470 * @param comments the user's new comments 2471 * @param firstName the user's new first name 2472 * @param middleName the user's new middle name 2473 * @param lastName the user's new last name 2474 * @param prefixId the user's new name prefix ID 2475 * @param suffixId the user's new name suffix ID 2476 * @param male whether user is male 2477 * @param birthdayMonth the user's new birthday month (0-based, meaning 2478 0 for January) 2479 * @param birthdayDay the user's new birthday day 2480 * @param birthdayYear the user's birthday year 2481 * @param smsSn the user's new SMS screen name 2482 * @param facebookSn the user's new Facebook screen name 2483 * @param jabberSn the user's new Jabber screen name 2484 * @param skypeSn the user's new Skype screen name 2485 * @param twitterSn the user's new Twitter screen name 2486 * @param jobTitle the user's new job title 2487 * @param groupIds the primary keys of the user's groups 2488 * @param organizationIds the primary keys of the user's organizations 2489 * @param roleIds the primary keys of the user's roles 2490 * @param userGroupRoles the user user's group roles 2491 * @param userGroupIds the primary keys of the user's user groups 2492 * @param serviceContext the service context to be applied (optionally 2493 <code>null</code>). Can set the UUID (with the 2494 <code>uuid</code> attribute), asset category IDs, asset tag 2495 names, and expando bridge attributes for the user. 2496 * @return the user 2497 * @deprecated As of 7.0.0, replaced by {@link #updateUser(long, String, 2498 String, String, boolean, String, String, String, String, 2499 long, String, boolean, byte[], String, String, String, 2500 String, String, String, String, int, int, boolean, int, int, 2501 int, String, String, String, String, String, String, String, 2502 String, String, String, String, long[], long[], long[], List, 2503 long[], ServiceContext)} 2504 */ 2505 @java.lang.Deprecated 2506 public com.liferay.portal.model.User updateUser(long userId, 2507 java.lang.String oldPassword, java.lang.String newPassword1, 2508 java.lang.String newPassword2, boolean passwordReset, 2509 java.lang.String reminderQueryQuestion, 2510 java.lang.String reminderQueryAnswer, java.lang.String screenName, 2511 java.lang.String emailAddress, long facebookId, 2512 java.lang.String openId, java.lang.String languageId, 2513 java.lang.String timeZoneId, java.lang.String greeting, 2514 java.lang.String comments, java.lang.String firstName, 2515 java.lang.String middleName, java.lang.String lastName, long prefixId, 2516 long suffixId, boolean male, int birthdayMonth, int birthdayDay, 2517 int birthdayYear, java.lang.String smsSn, java.lang.String facebookSn, 2518 java.lang.String jabberSn, java.lang.String skypeSn, 2519 java.lang.String twitterSn, java.lang.String jobTitle, long[] groupIds, 2520 long[] organizationIds, long[] roleIds, 2521 java.util.List<com.liferay.portal.model.UserGroupRole> userGroupRoles, 2522 long[] userGroupIds, 2523 com.liferay.portal.service.ServiceContext serviceContext) 2524 throws PortalException; 2525 2526 /** 2527 * Updates the user. 2528 * 2529 * @param userId the primary key of the user 2530 * @param oldPassword the user's old password 2531 * @param newPassword1 the user's new password (optionally 2532 <code>null</code>) 2533 * @param newPassword2 the user's new password confirmation (optionally 2534 <code>null</code>) 2535 * @param passwordReset whether the user should be asked to reset their 2536 password the next time they login 2537 * @param reminderQueryQuestion the user's new password reset question 2538 * @param reminderQueryAnswer the user's new password reset answer 2539 * @param screenName the user's new screen name 2540 * @param emailAddress the user's new email address 2541 * @param facebookId the user's new Facebook ID 2542 * @param openId the user's new OpenID 2543 * @param portrait whether to update the user's portrait image 2544 * @param portraitBytes the new portrait image data 2545 * @param languageId the user's new language ID 2546 * @param timeZoneId the user's new time zone ID 2547 * @param greeting the user's new greeting 2548 * @param comments the user's new comments 2549 * @param firstName the user's new first name 2550 * @param middleName the user's new middle name 2551 * @param lastName the user's new last name 2552 * @param prefixId the user's new name prefix ID 2553 * @param suffixId the user's new name suffix ID 2554 * @param male whether user is male 2555 * @param birthdayMonth the user's new birthday month (0-based, meaning 0 2556 for January) 2557 * @param birthdayDay the user's new birthday day 2558 * @param birthdayYear the user's birthday year 2559 * @param smsSn the user's new SMS screen name 2560 * @param facebookSn the user's new Facebook screen name 2561 * @param jabberSn the user's new Jabber screen name 2562 * @param skypeSn the user's new Skype screen name 2563 * @param twitterSn the user's new Twitter screen name 2564 * @param jobTitle the user's new job title 2565 * @param groupIds the primary keys of the user's groups 2566 * @param organizationIds the primary keys of the user's organizations 2567 * @param roleIds the primary keys of the user's roles 2568 * @param userGroupRoles the user user's group roles 2569 * @param userGroupIds the primary keys of the user's user groups 2570 * @param serviceContext the service context to be applied (optionally 2571 <code>null</code>). Can set the UUID (with the <code>uuid</code> 2572 attribute), asset category IDs, asset tag names, and expando 2573 bridge attributes for the user. 2574 * @return the user 2575 */ 2576 public com.liferay.portal.model.User updateUser(long userId, 2577 java.lang.String oldPassword, java.lang.String newPassword1, 2578 java.lang.String newPassword2, boolean passwordReset, 2579 java.lang.String reminderQueryQuestion, 2580 java.lang.String reminderQueryAnswer, java.lang.String screenName, 2581 java.lang.String emailAddress, long facebookId, 2582 java.lang.String openId, boolean portrait, byte[] portraitBytes, 2583 java.lang.String languageId, java.lang.String timeZoneId, 2584 java.lang.String greeting, java.lang.String comments, 2585 java.lang.String firstName, java.lang.String middleName, 2586 java.lang.String lastName, long prefixId, long suffixId, boolean male, 2587 int birthdayMonth, int birthdayDay, int birthdayYear, 2588 java.lang.String smsSn, java.lang.String facebookSn, 2589 java.lang.String jabberSn, java.lang.String skypeSn, 2590 java.lang.String twitterSn, java.lang.String jobTitle, long[] groupIds, 2591 long[] organizationIds, long[] roleIds, 2592 java.util.List<com.liferay.portal.model.UserGroupRole> userGroupRoles, 2593 long[] userGroupIds, 2594 com.liferay.portal.service.ServiceContext serviceContext) 2595 throws PortalException; 2596 2597 /** 2598 * Verifies the email address of the ticket. 2599 * 2600 * @param ticketKey the ticket key 2601 */ 2602 public void verifyEmailAddress(java.lang.String ticketKey) 2603 throws PortalException; 2604 }