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