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