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 matching UUID and company. 1405 * 1406 * @param uuid the user's UUID 1407 * @param companyId the primary key of the company 1408 * @return the matching user 1409 * @throws PortalException if a matching user could not be found 1410 */ 1411 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1412 public com.liferay.portal.model.User getUserByUuidAndCompanyId( 1413 java.lang.String uuid, long companyId) throws PortalException; 1414 1415 /** 1416 * Returns the userGroupIds of the user groups associated with the user. 1417 * 1418 * @param userId the userId of the user 1419 * @return long[] the userGroupIds of user groups associated with the user 1420 */ 1421 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1422 public long[] getUserGroupPrimaryKeys(long userId); 1423 1424 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1425 public java.util.List<com.liferay.portal.model.User> getUserGroupUsers( 1426 long userGroupId); 1427 1428 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1429 public java.util.List<com.liferay.portal.model.User> getUserGroupUsers( 1430 long userGroupId, int start, int end); 1431 1432 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1433 public java.util.List<com.liferay.portal.model.User> getUserGroupUsers( 1434 long userGroupId, int start, int end, 1435 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.User> orderByComparator); 1436 1437 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1438 public int getUserGroupUsersCount(long userGroupId); 1439 1440 /** 1441 * Returns the number of users with the status belonging to the user group. 1442 * 1443 * @param userGroupId the primary key of the user group 1444 * @param status the workflow status 1445 * @return the number of users with the status belonging to the user group 1446 */ 1447 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1448 public int getUserGroupUsersCount(long userGroupId, int status) 1449 throws PortalException; 1450 1451 /** 1452 * Returns the primary key of the user with the email address. 1453 * 1454 * @param companyId the primary key of the user's company 1455 * @param emailAddress the user's email address 1456 * @return the primary key of the user with the email address 1457 */ 1458 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1459 public long getUserIdByEmailAddress(long companyId, 1460 java.lang.String emailAddress) throws PortalException; 1461 1462 /** 1463 * Returns the primary key of the user with the screen name. 1464 * 1465 * @param companyId the primary key of the user's company 1466 * @param screenName the user's screen name 1467 * @return the primary key of the user with the screen name 1468 */ 1469 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1470 public long getUserIdByScreenName(long companyId, 1471 java.lang.String screenName) throws PortalException; 1472 1473 /** 1474 * Returns a range of all the users. 1475 * 1476 * <p> 1477 * 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. 1478 * </p> 1479 * 1480 * @param start the lower bound of the range of users 1481 * @param end the upper bound of the range of users (not inclusive) 1482 * @return the range of users 1483 */ 1484 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1485 public java.util.List<com.liferay.portal.model.User> getUsers(int start, 1486 int end); 1487 1488 /** 1489 * Returns the number of users. 1490 * 1491 * @return the number of users 1492 */ 1493 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1494 public int getUsersCount(); 1495 1496 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1497 public boolean hasGroupUser(long groupId, long userId); 1498 1499 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1500 public boolean hasGroupUsers(long groupId); 1501 1502 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1503 public boolean hasOrganizationUser(long organizationId, long userId); 1504 1505 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1506 public boolean hasOrganizationUsers(long organizationId); 1507 1508 /** 1509 * Returns <code>true</code> if the password policy has been assigned to the 1510 * user. 1511 * 1512 * @param passwordPolicyId the primary key of the password policy 1513 * @param userId the primary key of the user 1514 * @return <code>true</code> if the password policy is assigned to the user; 1515 <code>false</code> otherwise 1516 */ 1517 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1518 public boolean hasPasswordPolicyUser(long passwordPolicyId, long userId); 1519 1520 /** 1521 * Returns <code>true</code> if the user has the role with the name, 1522 * optionally through inheritance. 1523 * 1524 * @param companyId the primary key of the role's company 1525 * @param name the name of the role (must be a regular role, not an 1526 organization, site or provider role) 1527 * @param userId the primary key of the user 1528 * @param inherited whether to include roles inherited from organizations, 1529 sites, etc. 1530 * @return <code>true</code> if the user has the role; <code>false</code> 1531 otherwise 1532 */ 1533 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1534 public boolean hasRoleUser(long companyId, java.lang.String name, 1535 long userId, boolean inherited) throws PortalException; 1536 1537 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1538 public boolean hasRoleUser(long roleId, long userId); 1539 1540 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1541 public boolean hasRoleUsers(long roleId); 1542 1543 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1544 public boolean hasTeamUser(long teamId, long userId); 1545 1546 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1547 public boolean hasTeamUsers(long teamId); 1548 1549 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1550 public boolean hasUserGroupUser(long userGroupId, long userId); 1551 1552 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1553 public boolean hasUserGroupUsers(long userGroupId); 1554 1555 /** 1556 * Returns <code>true</code> if the user's password is expired. 1557 * 1558 * @param user the user 1559 * @return <code>true</code> if the user's password is expired; 1560 <code>false</code> otherwise 1561 */ 1562 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1563 public boolean isPasswordExpired(com.liferay.portal.model.User user) 1564 throws PortalException; 1565 1566 /** 1567 * Returns <code>true</code> if the password policy is configured to warn 1568 * the user that his password is expiring and the remaining time until 1569 * expiration is equal or less than the configured warning time. 1570 * 1571 * @param user the user 1572 * @return <code>true</code> if the user's password is expiring soon; 1573 <code>false</code> otherwise 1574 */ 1575 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1576 public boolean isPasswordExpiringSoon(com.liferay.portal.model.User user) 1577 throws PortalException; 1578 1579 /** 1580 * Returns the default user for the company. 1581 * 1582 * @param companyId the primary key of the company 1583 * @return the default user for the company 1584 */ 1585 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1586 public com.liferay.portal.model.User loadGetDefaultUser(long companyId) 1587 throws PortalException; 1588 1589 /** 1590 * Returns an ordered range of all the users with the status, and whose 1591 * first name, middle name, last name, screen name, and email address match 1592 * the keywords specified for them, without using the indexer. It is 1593 * preferable to use the indexed version {@link #search(long, String, 1594 * String, String, String, String, int, LinkedHashMap, boolean, int, int, 1595 * Sort)} instead of this method wherever possible for performance reasons. 1596 * 1597 * <p> 1598 * Useful when paginating results. Returns a maximum of <code>end - 1599 * start</code> instances. <code>start</code> and <code>end</code> are not 1600 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1601 * refers to the first result in the set. Setting both <code>start</code> 1602 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1603 * result set. 1604 * </p> 1605 * 1606 * @param companyId the primary key of the user's company 1607 * @param firstName the first name keywords (space separated) 1608 * @param middleName the middle name keywords 1609 * @param lastName the last name keywords 1610 * @param screenName the screen name keywords 1611 * @param emailAddress the email address keywords 1612 * @param status the workflow status 1613 * @param params the finder parameters (optionally <code>null</code>). For 1614 more information see {@link 1615 com.liferay.portal.service.persistence.UserFinder}. 1616 * @param andSearch whether every field must match its keywords, or just 1617 one field. For example, "users with the first name 'bob' and 1618 last name 'smith'" vs "users with the first name 'bob' 1619 or the last name 'smith'". 1620 * @param start the lower bound of the range of users 1621 * @param end the upper bound of the range of users (not inclusive) 1622 * @param obc the comparator to order the users by (optionally 1623 <code>null</code>) 1624 * @return the matching users 1625 * @see com.liferay.portal.service.persistence.UserFinder 1626 */ 1627 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1628 public java.util.List<com.liferay.portal.model.User> search( 1629 long companyId, java.lang.String firstName, 1630 java.lang.String middleName, java.lang.String lastName, 1631 java.lang.String screenName, java.lang.String emailAddress, int status, 1632 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1633 boolean andSearch, int start, int end, 1634 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.User> obc); 1635 1636 /** 1637 * Returns an ordered range of all the users with the status, and whose 1638 * first name, middle name, last name, screen name, and email address match 1639 * the keywords specified for them, using the indexer. It is preferable to 1640 * use this method instead of the non-indexed version whenever possible for 1641 * performance reasons. 1642 * 1643 * <p> 1644 * Useful when paginating results. Returns a maximum of <code>end - 1645 * start</code> instances. <code>start</code> and <code>end</code> are not 1646 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1647 * refers to the first result in the set. Setting both <code>start</code> 1648 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1649 * result set. 1650 * </p> 1651 * 1652 * @param companyId the primary key of the user's company 1653 * @param firstName the first name keywords (space separated) 1654 * @param middleName the middle name keywords 1655 * @param lastName the last name keywords 1656 * @param screenName the screen name keywords 1657 * @param emailAddress the email address keywords 1658 * @param status the workflow status 1659 * @param params the indexer parameters (optionally <code>null</code>). For 1660 more information see {@link 1661 com.liferay.portlet.usersadmin.util.UserIndexer}. 1662 * @param andSearch whether every field must match its keywords, or just 1663 one field. For example, "users with the first name 'bob' and 1664 last name 'smith'" vs "users with the first name 'bob' 1665 or the last name 'smith'". 1666 * @param start the lower bound of the range of users 1667 * @param end the upper bound of the range of users (not inclusive) 1668 * @param sort the field and direction to sort by (optionally 1669 <code>null</code>) 1670 * @return the matching users 1671 * @see com.liferay.portlet.usersadmin.util.UserIndexer 1672 */ 1673 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1674 public com.liferay.portal.kernel.search.Hits search(long companyId, 1675 java.lang.String firstName, java.lang.String middleName, 1676 java.lang.String lastName, java.lang.String screenName, 1677 java.lang.String emailAddress, int status, 1678 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1679 boolean andSearch, int start, int end, 1680 com.liferay.portal.kernel.search.Sort sort); 1681 1682 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1683 public com.liferay.portal.kernel.search.Hits search(long companyId, 1684 java.lang.String firstName, java.lang.String middleName, 1685 java.lang.String lastName, java.lang.String screenName, 1686 java.lang.String emailAddress, int status, 1687 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1688 boolean andSearch, int start, int end, 1689 com.liferay.portal.kernel.search.Sort[] sorts); 1690 1691 /** 1692 * Returns an ordered range of all the users who match the keywords and 1693 * status, without using the indexer. It is preferable to use the indexed 1694 * version {@link #search(long, String, int, LinkedHashMap, int, int, Sort)} 1695 * instead of this method wherever possible for performance reasons. 1696 * 1697 * <p> 1698 * Useful when paginating results. Returns a maximum of <code>end - 1699 * start</code> instances. <code>start</code> and <code>end</code> are not 1700 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1701 * refers to the first result in the set. Setting both <code>start</code> 1702 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1703 * result set. 1704 * </p> 1705 * 1706 * @param companyId the primary key of the user's company 1707 * @param keywords the keywords (space separated), which may occur in the 1708 user's first name, middle name, last name, screen name, or email 1709 address 1710 * @param status the workflow status 1711 * @param params the finder parameters (optionally <code>null</code>). For 1712 more information see {@link 1713 com.liferay.portal.service.persistence.UserFinder}. 1714 * @param start the lower bound of the range of users 1715 * @param end the upper bound of the range of users (not inclusive) 1716 * @param obc the comparator to order the users by (optionally 1717 <code>null</code>) 1718 * @return the matching users 1719 * @see com.liferay.portal.service.persistence.UserFinder 1720 */ 1721 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1722 public java.util.List<com.liferay.portal.model.User> search( 1723 long companyId, java.lang.String keywords, int status, 1724 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1725 int start, int end, 1726 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.User> obc); 1727 1728 /** 1729 * Returns an ordered range of all the users who match the keywords and 1730 * status, using the indexer. It is preferable to use this method instead of 1731 * the non-indexed version whenever possible for performance reasons. 1732 * 1733 * <p> 1734 * Useful when paginating results. Returns a maximum of <code>end - 1735 * start</code> instances. <code>start</code> and <code>end</code> are not 1736 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1737 * refers to the first result in the set. Setting both <code>start</code> 1738 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1739 * result set. 1740 * </p> 1741 * 1742 * @param companyId the primary key of the user's company 1743 * @param keywords the keywords (space separated), which may occur in the 1744 user's first name, middle name, last name, screen name, or email 1745 address 1746 * @param status the workflow status 1747 * @param params the indexer parameters (optionally <code>null</code>). For 1748 more information see {@link 1749 com.liferay.portlet.usersadmin.util.UserIndexer}. 1750 * @param start the lower bound of the range of users 1751 * @param end the upper bound of the range of users (not inclusive) 1752 * @param sort the field and direction to sort by (optionally 1753 <code>null</code>) 1754 * @return the matching users 1755 * @see com.liferay.portlet.usersadmin.util.UserIndexer 1756 */ 1757 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1758 public com.liferay.portal.kernel.search.Hits search(long companyId, 1759 java.lang.String keywords, int status, 1760 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1761 int start, int end, com.liferay.portal.kernel.search.Sort sort); 1762 1763 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1764 public com.liferay.portal.kernel.search.Hits search(long companyId, 1765 java.lang.String keywords, int status, 1766 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1767 int start, int end, com.liferay.portal.kernel.search.Sort[] sorts); 1768 1769 /** 1770 * Returns the number of users with the status, and whose first name, middle 1771 * name, last name, screen name, and email address match the keywords 1772 * specified for them. 1773 * 1774 * @param companyId the primary key of the user's company 1775 * @param firstName the first name keywords (space separated) 1776 * @param middleName the middle name keywords 1777 * @param lastName the last name keywords 1778 * @param screenName the screen name keywords 1779 * @param emailAddress the email address keywords 1780 * @param status the workflow status 1781 * @param params the finder parameters (optionally <code>null</code>). For 1782 more information see {@link 1783 com.liferay.portal.service.persistence.UserFinder}. 1784 * @param andSearch whether every field must match its keywords, or just 1785 one field. For example, "users with the first name 'bob' and 1786 last name 'smith'" vs "users with the first name 'bob' 1787 or the last name 'smith'". 1788 * @return the number of matching users 1789 */ 1790 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1791 public int searchCount(long companyId, java.lang.String firstName, 1792 java.lang.String middleName, java.lang.String lastName, 1793 java.lang.String screenName, java.lang.String emailAddress, int status, 1794 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1795 boolean andSearch); 1796 1797 /** 1798 * Returns the number of users who match the keywords and status. 1799 * 1800 * @param companyId the primary key of the user's company 1801 * @param keywords the keywords (space separated), which may occur in the 1802 user's first name, middle name, last name, screen name, or email 1803 address 1804 * @param status the workflow status 1805 * @param params the finder parameters (optionally <code>null</code>). For 1806 more information see {@link 1807 com.liferay.portal.service.persistence.UserFinder}. 1808 * @return the number matching users 1809 */ 1810 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1811 public int searchCount(long companyId, java.lang.String keywords, 1812 int status, 1813 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params); 1814 1815 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1816 public java.util.Map<java.lang.Long, java.lang.Integer> searchCounts( 1817 long companyId, int status, long[] groupIds); 1818 1819 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1820 public java.util.List<com.liferay.portal.model.User> searchSocial( 1821 long companyId, long[] groupIds, java.lang.String keywords, int start, 1822 int end); 1823 1824 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1825 public java.util.List<com.liferay.portal.model.User> searchSocial( 1826 long[] groupIds, long userId, int[] socialRelationTypes, 1827 java.lang.String keywords, int start, int end) 1828 throws PortalException; 1829 1830 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1831 public java.util.List<com.liferay.portal.model.User> searchSocial( 1832 long userId, int[] socialRelationTypes, java.lang.String keywords, 1833 int start, int end) throws PortalException; 1834 1835 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1836 public com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.model.User> searchUsers( 1837 long companyId, java.lang.String firstName, 1838 java.lang.String middleName, java.lang.String lastName, 1839 java.lang.String screenName, java.lang.String emailAddress, int status, 1840 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1841 boolean andSearch, int start, int end, 1842 com.liferay.portal.kernel.search.Sort sort) throws PortalException; 1843 1844 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1845 public com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.model.User> searchUsers( 1846 long companyId, java.lang.String firstName, 1847 java.lang.String middleName, java.lang.String lastName, 1848 java.lang.String screenName, java.lang.String emailAddress, int status, 1849 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1850 boolean andSearch, int start, int end, 1851 com.liferay.portal.kernel.search.Sort[] sorts) 1852 throws PortalException; 1853 1854 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1855 public com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.model.User> searchUsers( 1856 long companyId, java.lang.String keywords, int status, 1857 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1858 int start, int end, com.liferay.portal.kernel.search.Sort sort) 1859 throws PortalException; 1860 1861 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1862 public com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.model.User> searchUsers( 1863 long companyId, java.lang.String keywords, int status, 1864 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1865 int start, int end, com.liferay.portal.kernel.search.Sort[] sorts) 1866 throws PortalException; 1867 1868 /** 1869 * Sends an email address verification to the user. 1870 * 1871 * @param user the verification email recipient 1872 * @param emailAddress the recipient's email address 1873 * @param serviceContext the service context to be applied. Must set the 1874 portal URL, main path, primary key of the layout, remote address, 1875 remote host, and agent for the user. 1876 */ 1877 public void sendEmailAddressVerification( 1878 com.liferay.portal.model.User user, java.lang.String emailAddress, 1879 com.liferay.portal.service.ServiceContext serviceContext) 1880 throws PortalException; 1881 1882 /** 1883 * Sends the password email to the user with the email address. The content 1884 * of this email can be specified in <code>portal.properties</code> with the 1885 * <code>admin.email.password</code> keys. 1886 * 1887 * @param companyId the primary key of the user's company 1888 * @param emailAddress the user's email address 1889 * @param fromName the name of the individual that the email should be from 1890 * @param fromAddress the address of the individual that the email should be 1891 from 1892 * @param subject the email subject. If <code>null</code>, the subject 1893 specified in <code>portal.properties</code> will be used. 1894 * @param body the email body. If <code>null</code>, the body specified in 1895 <code>portal.properties</code> will be used. 1896 * @param serviceContext the service context to be applied 1897 */ 1898 public boolean sendPassword(long companyId, java.lang.String emailAddress, 1899 java.lang.String fromName, java.lang.String fromAddress, 1900 java.lang.String subject, java.lang.String body, 1901 com.liferay.portal.service.ServiceContext serviceContext) 1902 throws PortalException; 1903 1904 /** 1905 * Sends a password notification email to the user matching the email 1906 * address. The portal's settings determine whether a password is sent 1907 * explicitly or whether a link for resetting the user's password is sent. 1908 * The method sends the email asynchronously and returns before the email is 1909 * sent. 1910 * 1911 * <p> 1912 * The content of the notification email is specified with the 1913 * <code>admin.email.password</code> portal property keys. They can be 1914 * overridden via a <code>portal-ext.properties</code> file or modified 1915 * through the Portal Settings UI. 1916 * </p> 1917 * 1918 * @param companyId the primary key of the user's company 1919 * @param emailAddress the user's email address 1920 * @return <code>true</code> if the notification email includes a new 1921 password; <code>false</code> if the notification email only 1922 contains a reset link 1923 */ 1924 public boolean sendPasswordByEmailAddress(long companyId, 1925 java.lang.String emailAddress) throws PortalException; 1926 1927 /** 1928 * Sends a password notification email to the user matching the screen name. 1929 * The portal's settings determine whether a password is sent explicitly or 1930 * whether a link for resetting the user's password is sent. The method 1931 * sends the email asynchronously and returns before the email is sent. 1932 * 1933 * <p> 1934 * The content of the notification email is specified with the 1935 * <code>admin.email.password</code> portal property keys. They can be 1936 * overridden via a <code>portal-ext.properties</code> file or modified 1937 * through the Portal Settings UI. 1938 * </p> 1939 * 1940 * @param companyId the primary key of the user's company 1941 * @param screenName the user's screen name 1942 * @return <code>true</code> if the notification email includes a new 1943 password; <code>false</code> if the notification email only 1944 contains a reset link 1945 */ 1946 public boolean sendPasswordByScreenName(long companyId, 1947 java.lang.String screenName) throws PortalException; 1948 1949 /** 1950 * Sends a password notification email to the user matching the ID. The 1951 * portal's settings determine whether a password is sent explicitly or 1952 * whether a link for resetting the user's password is sent. The method 1953 * sends the email asynchronously and returns before the email is sent. 1954 * 1955 * <p> 1956 * The content of the notification email is specified with the 1957 * <code>admin.email.password</code> portal property keys. They can be 1958 * overridden via a <code>portal-ext.properties</code> file or modified 1959 * through the Portal Settings UI. 1960 * </p> 1961 * 1962 * @param userId the user's primary key 1963 * @return <code>true</code> if the notification email includes a new 1964 password; <code>false</code> if the notification email only 1965 contains a reset link 1966 */ 1967 public boolean sendPasswordByUserId(long userId) throws PortalException; 1968 1969 public void setGroupUsers(long groupId, long[] userIds); 1970 1971 public void setOrganizationUsers(long organizationId, long[] userIds); 1972 1973 /** 1974 * @throws PortalException 1975 */ 1976 public void setRoleUsers(long roleId, long[] userIds) 1977 throws PortalException; 1978 1979 public void setTeamUsers(long teamId, long[] userIds); 1980 1981 /** 1982 * @throws PortalException 1983 */ 1984 public void setUserGroupUsers(long userGroupId, long[] userIds) 1985 throws PortalException; 1986 1987 /** 1988 * Removes the users from the teams of a group. 1989 * 1990 * @param groupId the primary key of the group 1991 * @param userIds the primary keys of the users 1992 */ 1993 public void unsetGroupTeamsUsers(long groupId, long[] userIds) 1994 throws PortalException; 1995 1996 /** 1997 * Removes the users from the group. 1998 * 1999 * @param groupId the primary key of the group 2000 * @param userIds the primary keys of the users 2001 * @param serviceContext the service context to be applied (optionally 2002 <code>null</code>) 2003 */ 2004 public void unsetGroupUsers(long groupId, long[] userIds, 2005 com.liferay.portal.service.ServiceContext serviceContext) 2006 throws PortalException; 2007 2008 /** 2009 * Removes the users from the organization. 2010 * 2011 * @param organizationId the primary key of the organization 2012 * @param userIds the primary keys of the users 2013 */ 2014 public void unsetOrganizationUsers(long organizationId, long[] userIds) 2015 throws PortalException; 2016 2017 /** 2018 * Removes the users from the password policy. 2019 * 2020 * @param passwordPolicyId the primary key of the password policy 2021 * @param userIds the primary keys of the users 2022 */ 2023 public void unsetPasswordPolicyUsers(long passwordPolicyId, long[] userIds); 2024 2025 /** 2026 * Removes the users from the role. 2027 * 2028 * @param roleId the primary key of the role 2029 * @param userIds the primary keys of the users 2030 */ 2031 public void unsetRoleUsers(long roleId, long[] userIds) 2032 throws PortalException; 2033 2034 /** 2035 * Removes the users from the role. 2036 * 2037 * @param roleId the primary key of the role 2038 * @param users the users 2039 */ 2040 public void unsetRoleUsers(long roleId, 2041 java.util.List<com.liferay.portal.model.User> users) 2042 throws PortalException; 2043 2044 /** 2045 * Removes the users from the team. 2046 * 2047 * @param teamId the primary key of the team 2048 * @param userIds the primary keys of the users 2049 */ 2050 public void unsetTeamUsers(long teamId, long[] userIds) 2051 throws PortalException; 2052 2053 /** 2054 * Removes the users from the user group. 2055 * 2056 * @param userGroupId the primary key of the user group 2057 * @param userIds the primary keys of the users 2058 */ 2059 public void unsetUserGroupUsers(long userGroupId, long[] userIds) 2060 throws PortalException; 2061 2062 /** 2063 * Updates whether the user has agreed to the terms of use. 2064 * 2065 * @param userId the primary key of the user 2066 * @param agreedToTermsOfUse whether the user has agreet to the terms of 2067 use 2068 * @return the user 2069 */ 2070 public com.liferay.portal.model.User updateAgreedToTermsOfUse(long userId, 2071 boolean agreedToTermsOfUse) throws PortalException; 2072 2073 /** 2074 * Updates the user's asset with the new asset categories and tag names, 2075 * removing and adding asset categories and tag names as necessary. 2076 * 2077 * @param userId the primary key of the user 2078 * @param user ID the primary key of the user 2079 * @param assetCategoryIds the primary key's of the new asset categories 2080 * @param assetTagNames the new asset tag names 2081 */ 2082 public void updateAsset(long userId, com.liferay.portal.model.User user, 2083 long[] assetCategoryIds, java.lang.String[] assetTagNames) 2084 throws PortalException; 2085 2086 /** 2087 * Updates the user's creation date. 2088 * 2089 * @param userId the primary key of the user 2090 * @param createDate the new creation date 2091 * @return the user 2092 */ 2093 public com.liferay.portal.model.User updateCreateDate(long userId, 2094 java.util.Date createDate) throws PortalException; 2095 2096 /** 2097 * Updates the user's email address. 2098 * 2099 * @param userId the primary key of the user 2100 * @param password the user's password 2101 * @param emailAddress1 the user's new email address 2102 * @param emailAddress2 the user's new email address confirmation 2103 * @return the user 2104 */ 2105 public com.liferay.portal.model.User updateEmailAddress(long userId, 2106 java.lang.String password, java.lang.String emailAddress1, 2107 java.lang.String emailAddress2) throws PortalException; 2108 2109 /** 2110 * Updates the user's email address or sends verification email. 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 * @param serviceContext the service context to be applied. Must set the 2117 portal URL, main path, primary key of the layout, remote address, 2118 remote host, and agent for the user. 2119 * @return the user 2120 */ 2121 public com.liferay.portal.model.User updateEmailAddress(long userId, 2122 java.lang.String password, java.lang.String emailAddress1, 2123 java.lang.String emailAddress2, 2124 com.liferay.portal.service.ServiceContext serviceContext) 2125 throws PortalException; 2126 2127 /** 2128 * Updates whether the user has verified email address. 2129 * 2130 * @param userId the primary key of the user 2131 * @param emailAddressVerified whether the user has verified email address 2132 * @return the user 2133 */ 2134 public com.liferay.portal.model.User updateEmailAddressVerified( 2135 long userId, boolean emailAddressVerified) throws PortalException; 2136 2137 /** 2138 * Updates the user's Facebook ID. 2139 * 2140 * @param userId the primary key of the user 2141 * @param facebookId the user's new Facebook ID 2142 * @return the user 2143 */ 2144 public com.liferay.portal.model.User updateFacebookId(long userId, 2145 long facebookId) throws PortalException; 2146 2147 /** 2148 * Sets the groups the user is in, removing and adding groups as necessary. 2149 * 2150 * @param userId the primary key of the user 2151 * @param newGroupIds the primary keys of the groups 2152 * @param serviceContext the service context to be applied (optionally 2153 <code>null</code>) 2154 */ 2155 public void updateGroups(long userId, long[] newGroupIds, 2156 com.liferay.portal.service.ServiceContext serviceContext) 2157 throws PortalException; 2158 2159 /** 2160 * Updates a user account that was automatically created when a guest user 2161 * participated in an action (e.g. posting a comment) and only provided his 2162 * name and email address. 2163 * 2164 * @param creatorUserId the primary key of the creator 2165 * @param companyId the primary key of the user's company 2166 * @param autoPassword whether a password should be automatically generated 2167 for the user 2168 * @param password1 the user's password 2169 * @param password2 the user's password confirmation 2170 * @param autoScreenName whether a screen name should be automatically 2171 generated for the user 2172 * @param screenName the user's screen name 2173 * @param emailAddress the user's email address 2174 * @param facebookId the user's facebook ID 2175 * @param openId the user's OpenID 2176 * @param locale the user's locale 2177 * @param firstName the user's first name 2178 * @param middleName the user's middle name 2179 * @param lastName the user's last name 2180 * @param prefixId the user's name prefix ID 2181 * @param suffixId the user's name suffix ID 2182 * @param male whether the user is male 2183 * @param birthdayMonth the user's birthday month (0-based, meaning 0 for 2184 January) 2185 * @param birthdayDay the user's birthday day 2186 * @param birthdayYear the user's birthday year 2187 * @param jobTitle the user's job title 2188 * @param updateUserInformation whether to update the user's information 2189 * @param sendEmail whether to send the user an email notification about 2190 their new account 2191 * @param serviceContext the service context to be applied (optionally 2192 <code>null</code>). Can set expando bridge attributes for the 2193 user. 2194 * @return the user 2195 */ 2196 public com.liferay.portal.model.User updateIncompleteUser( 2197 long creatorUserId, long companyId, boolean autoPassword, 2198 java.lang.String password1, java.lang.String password2, 2199 boolean autoScreenName, java.lang.String screenName, 2200 java.lang.String emailAddress, long facebookId, 2201 java.lang.String openId, java.util.Locale locale, 2202 java.lang.String firstName, java.lang.String middleName, 2203 java.lang.String lastName, long prefixId, long suffixId, boolean male, 2204 int birthdayMonth, int birthdayDay, int birthdayYear, 2205 java.lang.String jobTitle, boolean updateUserInformation, 2206 boolean sendEmail, 2207 com.liferay.portal.service.ServiceContext serviceContext) 2208 throws PortalException; 2209 2210 /** 2211 * Updates the user's job title. 2212 * 2213 * @param userId the primary key of the user 2214 * @param jobTitle the user's job title 2215 * @return the user 2216 */ 2217 public com.liferay.portal.model.User updateJobTitle(long userId, 2218 java.lang.String jobTitle) throws PortalException; 2219 2220 /** 2221 * Updates the user's last login with the current time and the IP address. 2222 * 2223 * @param userId the primary key of the user 2224 * @param loginIP the IP address the user logged in from 2225 * @return the user 2226 */ 2227 public com.liferay.portal.model.User updateLastLogin(long userId, 2228 java.lang.String loginIP) throws PortalException; 2229 2230 /** 2231 * Updates whether the user is locked out from logging in. 2232 * 2233 * @param user the user 2234 * @param lockout whether the user is locked out 2235 * @return the user 2236 */ 2237 public com.liferay.portal.model.User updateLockout( 2238 com.liferay.portal.model.User user, boolean lockout) 2239 throws PortalException; 2240 2241 /** 2242 * Updates whether the user is locked out from logging in. 2243 * 2244 * @param companyId the primary key of the user's company 2245 * @param emailAddress the user's email address 2246 * @param lockout whether the user is locked out 2247 * @return the user 2248 */ 2249 public com.liferay.portal.model.User updateLockoutByEmailAddress( 2250 long companyId, java.lang.String emailAddress, boolean lockout) 2251 throws PortalException; 2252 2253 /** 2254 * Updates whether the user is locked out from logging in. 2255 * 2256 * @param userId the primary key of the user 2257 * @param lockout whether the user is locked out 2258 * @return the user 2259 */ 2260 public com.liferay.portal.model.User updateLockoutById(long userId, 2261 boolean lockout) throws PortalException; 2262 2263 /** 2264 * Updates whether the user is locked out from logging in. 2265 * 2266 * @param companyId the primary key of the user's company 2267 * @param screenName the user's screen name 2268 * @param lockout whether the user is locked out 2269 * @return the user 2270 */ 2271 public com.liferay.portal.model.User updateLockoutByScreenName( 2272 long companyId, java.lang.String screenName, boolean lockout) 2273 throws PortalException; 2274 2275 /** 2276 * Updates the user's modified date. 2277 * 2278 * @param userId the primary key of the user 2279 * @param modifiedDate the new modified date 2280 * @return the user 2281 */ 2282 public com.liferay.portal.model.User updateModifiedDate(long userId, 2283 java.util.Date modifiedDate) throws PortalException; 2284 2285 /** 2286 * Updates the user's OpenID. 2287 * 2288 * @param userId the primary key of the user 2289 * @param openId the new OpenID 2290 * @return the user 2291 */ 2292 public com.liferay.portal.model.User updateOpenId(long userId, 2293 java.lang.String openId) throws PortalException; 2294 2295 /** 2296 * Sets the organizations that the user is in, removing and adding 2297 * organizations as necessary. 2298 * 2299 * @param userId the primary key of the user 2300 * @param newOrganizationIds the primary keys of the organizations 2301 * @param serviceContext the service context to be applied. Must set whether 2302 user indexing is enabled. 2303 */ 2304 public void updateOrganizations(long userId, long[] newOrganizationIds, 2305 com.liferay.portal.service.ServiceContext serviceContext) 2306 throws PortalException; 2307 2308 /** 2309 * Updates the user's password without tracking or validation of the change. 2310 * 2311 * @param userId the primary key of the user 2312 * @param password1 the user's new password 2313 * @param password2 the user's new password confirmation 2314 * @param passwordReset whether the user should be asked to reset their 2315 password the next time they log in 2316 * @return the user 2317 */ 2318 public com.liferay.portal.model.User updatePassword(long userId, 2319 java.lang.String password1, java.lang.String password2, 2320 boolean passwordReset) throws PortalException; 2321 2322 /** 2323 * Updates the user's password, optionally with tracking and validation of 2324 * the change. 2325 * 2326 * @param userId the primary key of the user 2327 * @param password1 the user's new password 2328 * @param password2 the user's new password confirmation 2329 * @param passwordReset whether the user should be asked to reset their 2330 password the next time they login 2331 * @param silentUpdate whether the password should be updated without being 2332 tracked, or validated. Primarily used for password imports. 2333 * @return the user 2334 */ 2335 public com.liferay.portal.model.User updatePassword(long userId, 2336 java.lang.String password1, java.lang.String password2, 2337 boolean passwordReset, boolean silentUpdate) throws PortalException; 2338 2339 /** 2340 * Updates the user's password with manually input information. This method 2341 * should only be used when performing maintenance. 2342 * 2343 * @param userId the primary key of the user 2344 * @param password the user's new password 2345 * @param passwordEncrypted the user's new encrypted password 2346 * @param passwordReset whether the user should be asked to reset their 2347 password the next time they login 2348 * @param passwordModifiedDate the new password modified date 2349 * @return the user 2350 */ 2351 public com.liferay.portal.model.User updatePasswordManually(long userId, 2352 java.lang.String password, boolean passwordEncrypted, 2353 boolean passwordReset, java.util.Date passwordModifiedDate) 2354 throws PortalException; 2355 2356 /** 2357 * Updates whether the user should be asked to reset their password the next 2358 * time they login. 2359 * 2360 * @param userId the primary key of the user 2361 * @param passwordReset whether the user should be asked to reset their 2362 password the next time they login 2363 * @return the user 2364 */ 2365 public com.liferay.portal.model.User updatePasswordReset(long userId, 2366 boolean passwordReset) throws PortalException; 2367 2368 /** 2369 * Updates the user's portrait image. 2370 * 2371 * @param userId the primary key of the user 2372 * @param bytes the new portrait image data 2373 * @return the user 2374 */ 2375 public com.liferay.portal.model.User updatePortrait(long userId, 2376 byte[] bytes) throws PortalException; 2377 2378 /** 2379 * Updates the user's password reset question and answer. 2380 * 2381 * @param userId the primary key of the user 2382 * @param question the user's new password reset question 2383 * @param answer the user's new password reset answer 2384 * @return the user 2385 */ 2386 public com.liferay.portal.model.User updateReminderQuery(long userId, 2387 java.lang.String question, java.lang.String answer) 2388 throws PortalException; 2389 2390 /** 2391 * Updates the user's screen name. 2392 * 2393 * @param userId the primary key of the user 2394 * @param screenName the user's new screen name 2395 * @return the user 2396 */ 2397 public com.liferay.portal.model.User updateScreenName(long userId, 2398 java.lang.String screenName) throws PortalException; 2399 2400 /** 2401 * Updates the user's workflow status. 2402 * 2403 * @param userId the primary key of the user 2404 * @param status the user's new workflow status 2405 * @return the user 2406 * @deprecated As of 7.0.0, replaced by {@link #updateStatus(long, int, 2407 ServiceContext)} 2408 */ 2409 @java.lang.Deprecated 2410 public com.liferay.portal.model.User updateStatus(long userId, int status) 2411 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 * @param serviceContext the service context to be applied. You can specify 2419 an unencrypted custom password (used by an LDAP listener) for the 2420 user via attribute <code>passwordUnencrypted</code>. 2421 * @return the user 2422 */ 2423 public com.liferay.portal.model.User updateStatus(long userId, int status, 2424 com.liferay.portal.service.ServiceContext serviceContext) 2425 throws PortalException; 2426 2427 /** 2428 * Updates the user in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 2429 * 2430 * @param user the user 2431 * @return the user that was updated 2432 */ 2433 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 2434 public com.liferay.portal.model.User updateUser( 2435 com.liferay.portal.model.User user); 2436 2437 /** 2438 * Updates the user. 2439 * 2440 * @param userId the primary key of the user 2441 * @param oldPassword the user's old password 2442 * @param newPassword1 the user's new password (optionally 2443 <code>null</code>) 2444 * @param newPassword2 the user's new password confirmation (optionally 2445 <code>null</code>) 2446 * @param passwordReset whether the user should be asked to reset their 2447 password the next time they login 2448 * @param reminderQueryQuestion the user's new password reset question 2449 * @param reminderQueryAnswer the user's new password reset answer 2450 * @param screenName the user's new screen name 2451 * @param emailAddress the user's new email address 2452 * @param facebookId the user's new Facebook ID 2453 * @param openId the user's new OpenID 2454 * @param languageId the user's new language ID 2455 * @param timeZoneId the user's new time zone ID 2456 * @param greeting the user's new greeting 2457 * @param comments the user's new comments 2458 * @param firstName the user's new first name 2459 * @param middleName the user's new middle name 2460 * @param lastName the user's new last name 2461 * @param prefixId the user's new name prefix ID 2462 * @param suffixId the user's new name suffix ID 2463 * @param male whether user is male 2464 * @param birthdayMonth the user's new birthday month (0-based, meaning 2465 0 for January) 2466 * @param birthdayDay the user's new birthday day 2467 * @param birthdayYear the user's birthday year 2468 * @param smsSn the user's new SMS screen name 2469 * @param facebookSn the user's new Facebook screen name 2470 * @param jabberSn the user's new Jabber screen name 2471 * @param skypeSn the user's new Skype screen name 2472 * @param twitterSn the user's new Twitter screen name 2473 * @param jobTitle the user's new job title 2474 * @param groupIds the primary keys of the user's groups 2475 * @param organizationIds the primary keys of the user's organizations 2476 * @param roleIds the primary keys of the user's roles 2477 * @param userGroupRoles the user user's group roles 2478 * @param userGroupIds the primary keys of the user's user groups 2479 * @param serviceContext the service context to be applied (optionally 2480 <code>null</code>). Can set the UUID (with the 2481 <code>uuid</code> attribute), asset category IDs, asset tag 2482 names, and expando bridge attributes for the user. 2483 * @return the user 2484 * @deprecated As of 7.0.0, replaced by {@link #updateUser(long, String, 2485 String, String, boolean, String, String, String, String, 2486 long, String, boolean, byte[], String, String, String, 2487 String, String, String, String, long, long, boolean, int, 2488 int, int, String, String, String, String, String, String, 2489 long[], long[], long[], List, long[], ServiceContext)} 2490 */ 2491 @java.lang.Deprecated 2492 public com.liferay.portal.model.User updateUser(long userId, 2493 java.lang.String oldPassword, java.lang.String newPassword1, 2494 java.lang.String newPassword2, boolean passwordReset, 2495 java.lang.String reminderQueryQuestion, 2496 java.lang.String reminderQueryAnswer, java.lang.String screenName, 2497 java.lang.String emailAddress, long facebookId, 2498 java.lang.String openId, java.lang.String languageId, 2499 java.lang.String timeZoneId, java.lang.String greeting, 2500 java.lang.String comments, java.lang.String firstName, 2501 java.lang.String middleName, java.lang.String lastName, long prefixId, 2502 long suffixId, boolean male, int birthdayMonth, int birthdayDay, 2503 int birthdayYear, java.lang.String smsSn, java.lang.String facebookSn, 2504 java.lang.String jabberSn, java.lang.String skypeSn, 2505 java.lang.String twitterSn, java.lang.String jobTitle, long[] groupIds, 2506 long[] organizationIds, long[] roleIds, 2507 java.util.List<com.liferay.portal.model.UserGroupRole> userGroupRoles, 2508 long[] userGroupIds, 2509 com.liferay.portal.service.ServiceContext serviceContext) 2510 throws PortalException; 2511 2512 /** 2513 * Updates the user. 2514 * 2515 * @param userId the primary key of the user 2516 * @param oldPassword the user's old password 2517 * @param newPassword1 the user's new password (optionally 2518 <code>null</code>) 2519 * @param newPassword2 the user's new password confirmation (optionally 2520 <code>null</code>) 2521 * @param passwordReset whether the user should be asked to reset their 2522 password the next time they login 2523 * @param reminderQueryQuestion the user's new password reset question 2524 * @param reminderQueryAnswer the user's new password reset answer 2525 * @param screenName the user's new screen name 2526 * @param emailAddress the user's new email address 2527 * @param facebookId the user's new Facebook ID 2528 * @param openId the user's new OpenID 2529 * @param portrait whether to update the user's portrait image 2530 * @param portraitBytes the new portrait image data 2531 * @param languageId the user's new language ID 2532 * @param timeZoneId the user's new time zone ID 2533 * @param greeting the user's new greeting 2534 * @param comments the user's new comments 2535 * @param firstName the user's new first name 2536 * @param middleName the user's new middle name 2537 * @param lastName the user's new last name 2538 * @param prefixId the user's new name prefix ID 2539 * @param suffixId the user's new name suffix ID 2540 * @param male whether user is male 2541 * @param birthdayMonth the user's new birthday month (0-based, meaning 0 2542 for January) 2543 * @param birthdayDay the user's new birthday day 2544 * @param birthdayYear the user's birthday year 2545 * @param smsSn the user's new SMS screen name 2546 * @param facebookSn the user's new Facebook screen name 2547 * @param jabberSn the user's new Jabber screen name 2548 * @param skypeSn the user's new Skype screen name 2549 * @param twitterSn the user's new Twitter screen name 2550 * @param jobTitle the user's new job title 2551 * @param groupIds the primary keys of the user's groups 2552 * @param organizationIds the primary keys of the user's organizations 2553 * @param roleIds the primary keys of the user's roles 2554 * @param userGroupRoles the user user's group roles 2555 * @param userGroupIds the primary keys of the user's user groups 2556 * @param serviceContext the service context to be applied (optionally 2557 <code>null</code>). Can set the UUID (with the <code>uuid</code> 2558 attribute), asset category IDs, asset tag names, and expando 2559 bridge attributes for the user. 2560 * @return the user 2561 */ 2562 public com.liferay.portal.model.User updateUser(long userId, 2563 java.lang.String oldPassword, java.lang.String newPassword1, 2564 java.lang.String newPassword2, boolean passwordReset, 2565 java.lang.String reminderQueryQuestion, 2566 java.lang.String reminderQueryAnswer, java.lang.String screenName, 2567 java.lang.String emailAddress, long facebookId, 2568 java.lang.String openId, boolean portrait, byte[] portraitBytes, 2569 java.lang.String languageId, java.lang.String timeZoneId, 2570 java.lang.String greeting, java.lang.String comments, 2571 java.lang.String firstName, java.lang.String middleName, 2572 java.lang.String lastName, long prefixId, long suffixId, boolean male, 2573 int birthdayMonth, int birthdayDay, int birthdayYear, 2574 java.lang.String smsSn, java.lang.String facebookSn, 2575 java.lang.String jabberSn, java.lang.String skypeSn, 2576 java.lang.String twitterSn, java.lang.String jobTitle, long[] groupIds, 2577 long[] organizationIds, long[] roleIds, 2578 java.util.List<com.liferay.portal.model.UserGroupRole> userGroupRoles, 2579 long[] userGroupIds, 2580 com.liferay.portal.service.ServiceContext serviceContext) 2581 throws PortalException; 2582 2583 /** 2584 * Verifies the email address of the ticket. 2585 * 2586 * @param ticketKey the ticket key 2587 */ 2588 public void verifyEmailAddress(java.lang.String ticketKey) 2589 throws PortalException; 2590 }