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