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