001 /** 002 * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portal.service; 016 017 import aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.kernel.exception.PortalException; 020 import com.liferay.portal.kernel.exception.SystemException; 021 import com.liferay.portal.kernel.jsonwebservice.JSONWebService; 022 import com.liferay.portal.kernel.transaction.Isolation; 023 import com.liferay.portal.kernel.transaction.Propagation; 024 import com.liferay.portal.kernel.transaction.Transactional; 025 import com.liferay.portal.security.ac.AccessControlled; 026 027 /** 028 * Provides the remote service interface for User. Methods of this 029 * service are expected to have security checks based on the propagated JAAS 030 * credentials because this service can be accessed remotely. 031 * 032 * @author Brian Wing Shun Chan 033 * @see UserServiceUtil 034 * @see com.liferay.portal.service.base.UserServiceBaseImpl 035 * @see com.liferay.portal.service.impl.UserServiceImpl 036 * @generated 037 */ 038 @ProviderType 039 @AccessControlled 040 @JSONWebService 041 @Transactional(isolation = Isolation.PORTAL, rollbackFor = { 042 PortalException.class, SystemException.class}) 043 public interface UserService extends BaseService { 044 /* 045 * NOTE FOR DEVELOPERS: 046 * 047 * Never modify or reference this interface directly. Always use {@link UserServiceUtil} to access the user remote service. Add custom service methods to {@link com.liferay.portal.service.impl.UserServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. 048 */ 049 050 /** 051 * Returns the Spring bean ID for this bean. 052 * 053 * @return the Spring bean ID for this bean 054 */ 055 public java.lang.String getBeanIdentifier(); 056 057 /** 058 * Sets the Spring bean ID for this bean. 059 * 060 * @param beanIdentifier the Spring bean ID for this bean 061 */ 062 public void setBeanIdentifier(java.lang.String beanIdentifier); 063 064 /** 065 * Adds the users to the group. 066 * 067 * @param groupId the primary key of the group 068 * @param userIds the primary keys of the users 069 * @param serviceContext the service context to be applied (optionally 070 <code>null</code>) 071 * @throws PortalException if a group or user with the primary key could not 072 be found, if the user did not have permission to assign group 073 members, or if the operation was not allowed by the membership 074 policy 075 * @throws SystemException if a system exception occurred 076 */ 077 public void addGroupUsers(long groupId, long[] userIds, 078 com.liferay.portal.service.ServiceContext serviceContext) 079 throws com.liferay.portal.kernel.exception.PortalException, 080 com.liferay.portal.kernel.exception.SystemException; 081 082 /** 083 * Adds the users to the organization. 084 * 085 * @param organizationId the primary key of the organization 086 * @param userIds the primary keys of the users 087 * @throws PortalException if an organization or user with the primary key 088 could not be found, if the user did not have permission to assign 089 organization members, if current user did not have an 090 organization in common with a given user, or if the operation was 091 not allowed by the membership policy 092 * @throws SystemException if a system exception occurred 093 */ 094 public void addOrganizationUsers(long organizationId, long[] userIds) 095 throws com.liferay.portal.kernel.exception.PortalException, 096 com.liferay.portal.kernel.exception.SystemException; 097 098 /** 099 * Assigns the password policy to the users, removing any other currently 100 * assigned password policies. 101 * 102 * @param passwordPolicyId the primary key of the password policy 103 * @param userIds the primary keys of the users 104 * @throws PortalException if the user did not have permission to assign 105 policy members 106 * @throws SystemException if a system exception occurred 107 */ 108 public void addPasswordPolicyUsers(long passwordPolicyId, long[] userIds) 109 throws com.liferay.portal.kernel.exception.PortalException, 110 com.liferay.portal.kernel.exception.SystemException; 111 112 /** 113 * Adds the users to the role. 114 * 115 * @param roleId the primary key of the role 116 * @param userIds the primary keys of the users 117 * @throws PortalException if a role or user with the primary key could not 118 be found, if the user did not have permission to assign role 119 members, or if the operation was not allowed by the membership 120 policy 121 * @throws SystemException if a system exception occurred 122 */ 123 public void addRoleUsers(long roleId, long[] userIds) 124 throws com.liferay.portal.kernel.exception.PortalException, 125 com.liferay.portal.kernel.exception.SystemException; 126 127 /** 128 * Adds the users to the team. 129 * 130 * @param teamId the primary key of the team 131 * @param userIds the primary keys of the users 132 * @throws PortalException if a team or user with the primary key could not 133 be found or if the user did not have permission to assign team 134 members 135 * @throws SystemException if a system exception occurred 136 */ 137 public void addTeamUsers(long teamId, long[] userIds) 138 throws com.liferay.portal.kernel.exception.PortalException, 139 com.liferay.portal.kernel.exception.SystemException; 140 141 /** 142 * Adds a user. 143 * 144 * <p> 145 * This method handles the creation and bookkeeping of the user including 146 * its resources, metadata, and internal data structures. It is not 147 * necessary to make subsequent calls to any methods to setup default 148 * groups, resources, etc. 149 * </p> 150 * 151 * @param companyId the primary key of the user's company 152 * @param autoPassword whether a password should be automatically generated 153 for the user 154 * @param password1 the user's password 155 * @param password2 the user's password confirmation 156 * @param autoScreenName whether a screen name should be automatically 157 generated for the user 158 * @param screenName the user's screen name 159 * @param emailAddress the user's email address 160 * @param facebookId the user's facebook ID 161 * @param openId the user's OpenID 162 * @param locale the user's locale 163 * @param firstName the user's first name 164 * @param middleName the user's middle name 165 * @param lastName the user's last name 166 * @param prefixId the user's name prefix ID 167 * @param suffixId the user's name suffix ID 168 * @param male whether the user is male 169 * @param birthdayMonth the user's birthday month (0-based, meaning 0 for 170 January) 171 * @param birthdayDay the user's birthday day 172 * @param birthdayYear the user's birthday year 173 * @param jobTitle the user's job title 174 * @param groupIds the primary keys of the user's groups 175 * @param organizationIds the primary keys of the user's organizations 176 * @param roleIds the primary keys of the roles this user possesses 177 * @param userGroupIds the primary keys of the user's user groups 178 * @param sendEmail whether to send the user an email notification about 179 their new account 180 * @param serviceContext the service context to be applied (optionally 181 <code>null</code>). Can set the UUID (with the <code>uuid</code> 182 attribute), asset category IDs, asset tag names, and expando 183 bridge attributes for the user. 184 * @return the new user 185 * @throws PortalException if the user's information was invalid, if the 186 operation was not allowed by the membership policy, if the 187 creator did not have permission to add users, or if the email 188 address was reserved 189 * @throws SystemException if a system exception occurred 190 */ 191 public com.liferay.portal.model.User addUser(long companyId, 192 boolean autoPassword, java.lang.String password1, 193 java.lang.String password2, boolean autoScreenName, 194 java.lang.String screenName, java.lang.String emailAddress, 195 long facebookId, java.lang.String openId, java.util.Locale locale, 196 java.lang.String firstName, java.lang.String middleName, 197 java.lang.String lastName, int prefixId, int suffixId, boolean male, 198 int birthdayMonth, int birthdayDay, int birthdayYear, 199 java.lang.String jobTitle, long[] groupIds, long[] organizationIds, 200 long[] roleIds, long[] userGroupIds, boolean sendEmail, 201 com.liferay.portal.service.ServiceContext serviceContext) 202 throws com.liferay.portal.kernel.exception.PortalException, 203 com.liferay.portal.kernel.exception.SystemException; 204 205 /** 206 * Adds a user with additional parameters. 207 * 208 * <p> 209 * This method handles the creation and bookkeeping of the user including 210 * its resources, metadata, and internal data structures. It is not 211 * necessary to make subsequent calls to any methods to setup default 212 * groups, resources, etc. 213 * </p> 214 * 215 * @param companyId the primary key of the user's company 216 * @param autoPassword whether a password should be automatically generated 217 for the user 218 * @param password1 the user's password 219 * @param password2 the user's password confirmation 220 * @param autoScreenName whether a screen name should be automatically 221 generated for the user 222 * @param screenName the user's screen name 223 * @param emailAddress the user's email address 224 * @param facebookId the user's facebook ID 225 * @param openId the user's OpenID 226 * @param locale the user's locale 227 * @param firstName the user's first name 228 * @param middleName the user's middle name 229 * @param lastName the user's last name 230 * @param prefixId the user's name prefix ID 231 * @param suffixId the user's name suffix ID 232 * @param male whether the user is male 233 * @param birthdayMonth the user's birthday month (0-based, meaning 0 for 234 January) 235 * @param birthdayDay the user's birthday day 236 * @param birthdayYear the user's birthday year 237 * @param jobTitle the user's job title 238 * @param groupIds the primary keys of the user's groups 239 * @param organizationIds the primary keys of the user's organizations 240 * @param roleIds the primary keys of the roles this user possesses 241 * @param userGroupIds the primary keys of the user's user groups 242 * @param addresses the user's addresses 243 * @param emailAddresses the user's email addresses 244 * @param phones the user's phone numbers 245 * @param websites the user's websites 246 * @param announcementsDelivers the announcements deliveries 247 * @param sendEmail whether to send the user an email notification about 248 their new account 249 * @param serviceContext the service context to be applied (optionally 250 <code>null</code>). Can set the UUID (with the <code>uuid</code> 251 attribute), asset category IDs, asset tag names, and expando 252 bridge attributes for the user. 253 * @return the new user 254 * @throws PortalException if the user's information was invalid, if the 255 creator did not have permission to add users, if the email 256 address was reserved, if the operation was not allowed by the 257 membership policy, or if some other portal exception occurred 258 * @throws SystemException if a system exception occurred 259 */ 260 public com.liferay.portal.model.User addUser(long companyId, 261 boolean autoPassword, java.lang.String password1, 262 java.lang.String password2, boolean autoScreenName, 263 java.lang.String screenName, java.lang.String emailAddress, 264 long facebookId, java.lang.String openId, java.util.Locale locale, 265 java.lang.String firstName, java.lang.String middleName, 266 java.lang.String lastName, int prefixId, int suffixId, boolean male, 267 int birthdayMonth, int birthdayDay, int birthdayYear, 268 java.lang.String jobTitle, long[] groupIds, long[] organizationIds, 269 long[] roleIds, long[] userGroupIds, 270 java.util.List<com.liferay.portal.model.Address> addresses, 271 java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses, 272 java.util.List<com.liferay.portal.model.Phone> phones, 273 java.util.List<com.liferay.portal.model.Website> websites, 274 java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> announcementsDelivers, 275 boolean sendEmail, 276 com.liferay.portal.service.ServiceContext serviceContext) 277 throws com.liferay.portal.kernel.exception.PortalException, 278 com.liferay.portal.kernel.exception.SystemException; 279 280 /** 281 * Adds the users to the user group. 282 * 283 * @param userGroupId the primary key of the user group 284 * @param userIds the primary keys of the users 285 * @throws PortalException if a user group or user with the primary could 286 could not be found, if the current user did not have permission 287 to assign group members, or if the operation was not allowed by 288 the membership policy 289 * @throws SystemException if a system exception occurred 290 */ 291 public void addUserGroupUsers(long userGroupId, long[] userIds) 292 throws com.liferay.portal.kernel.exception.PortalException, 293 com.liferay.portal.kernel.exception.SystemException; 294 295 /** 296 * Adds a user with workflow. 297 * 298 * <p> 299 * This method handles the creation and bookkeeping of the user including 300 * its resources, metadata, and internal data structures. It is not 301 * necessary to make subsequent calls to any methods to setup default 302 * groups, resources, etc. 303 * </p> 304 * 305 * @param companyId the primary key of the user's company 306 * @param autoPassword whether a password should be automatically generated 307 for the user 308 * @param password1 the user's password 309 * @param password2 the user's password confirmation 310 * @param autoScreenName whether a screen name should be automatically 311 generated for the user 312 * @param screenName the user's screen name 313 * @param emailAddress the user's email address 314 * @param facebookId the user's facebook ID 315 * @param openId the user's OpenID 316 * @param locale the user's locale 317 * @param firstName the user's first name 318 * @param middleName the user's middle name 319 * @param lastName the user's last name 320 * @param prefixId the user's name prefix ID 321 * @param suffixId the user's name suffix ID 322 * @param male whether the user is male 323 * @param birthdayMonth the user's birthday month (0-based, meaning 0 for 324 January) 325 * @param birthdayDay the user's birthday day 326 * @param birthdayYear the user's birthday year 327 * @param jobTitle the user's job title 328 * @param groupIds the primary keys of the user's groups 329 * @param organizationIds the primary keys of the user's organizations 330 * @param roleIds the primary keys of the roles this user possesses 331 * @param userGroupIds the primary keys of the user's user groups 332 * @param sendEmail whether to send the user an email notification about 333 their new account 334 * @param serviceContext the service context to be applied (optionally 335 <code>null</code>). Can set the UUID (with the <code>uuid</code> 336 attribute), asset category IDs, asset tag names, and expando 337 bridge attributes for the user. 338 * @return the new user 339 * @throws PortalException if the user's information was invalid, if the 340 operation was not allowed by the membership policy, if the 341 creator did not have permission to add users, or if the email 342 address was reserved 343 * @throws SystemException if a system exception occurred 344 */ 345 public com.liferay.portal.model.User addUserWithWorkflow(long companyId, 346 boolean autoPassword, java.lang.String password1, 347 java.lang.String password2, boolean autoScreenName, 348 java.lang.String screenName, java.lang.String emailAddress, 349 long facebookId, java.lang.String openId, java.util.Locale locale, 350 java.lang.String firstName, java.lang.String middleName, 351 java.lang.String lastName, int prefixId, int suffixId, boolean male, 352 int birthdayMonth, int birthdayDay, int birthdayYear, 353 java.lang.String jobTitle, long[] groupIds, long[] organizationIds, 354 long[] roleIds, long[] userGroupIds, boolean sendEmail, 355 com.liferay.portal.service.ServiceContext serviceContext) 356 throws com.liferay.portal.kernel.exception.PortalException, 357 com.liferay.portal.kernel.exception.SystemException; 358 359 /** 360 * Adds a user with workflow and additional parameters. 361 * 362 * <p> 363 * This method handles the creation and bookkeeping of the user including 364 * its resources, metadata, and internal data structures. It is not 365 * necessary to make subsequent calls to any methods to setup default 366 * groups, resources, etc. 367 * </p> 368 * 369 * @param companyId the primary key of the user's company 370 * @param autoPassword whether a password should be automatically generated 371 for the user 372 * @param password1 the user's password 373 * @param password2 the user's password confirmation 374 * @param autoScreenName whether a screen name should be automatically 375 generated for the user 376 * @param screenName the user's screen name 377 * @param emailAddress the user's email address 378 * @param facebookId the user's facebook ID 379 * @param openId the user's OpenID 380 * @param locale the user's locale 381 * @param firstName the user's first name 382 * @param middleName the user's middle name 383 * @param lastName the user's last name 384 * @param prefixId the user's name prefix ID 385 * @param suffixId the user's name suffix ID 386 * @param male whether the user is male 387 * @param birthdayMonth the user's birthday month (0-based, meaning 0 for 388 January) 389 * @param birthdayDay the user's birthday day 390 * @param birthdayYear the user's birthday year 391 * @param jobTitle the user's job title 392 * @param groupIds the primary keys of the user's groups 393 * @param organizationIds the primary keys of the user's organizations 394 * @param roleIds the primary keys of the roles this user possesses 395 * @param userGroupIds the primary keys of the user's user groups 396 * @param addresses the user's addresses 397 * @param emailAddresses the user's email addresses 398 * @param phones the user's phone numbers 399 * @param websites the user's websites 400 * @param announcementsDelivers the announcements deliveries 401 * @param sendEmail whether to send the user an email notification about 402 their new account 403 * @param serviceContext the service context to be applied (optionally 404 <code>null</code>). Can set the UUID (with the <code>uuid</code> 405 attribute), asset category IDs, asset tag names, and expando 406 bridge attributes for the user. 407 * @return the new user 408 * @throws PortalException if the user's information was invalid, if the 409 operation was not allowed by the membership policy, if the 410 creator did not have permission to add users, if the email 411 address was reserved, or if some other portal exception occurred 412 * @throws SystemException if a system exception occurred 413 */ 414 public com.liferay.portal.model.User addUserWithWorkflow(long companyId, 415 boolean autoPassword, java.lang.String password1, 416 java.lang.String password2, boolean autoScreenName, 417 java.lang.String screenName, java.lang.String emailAddress, 418 long facebookId, java.lang.String openId, java.util.Locale locale, 419 java.lang.String firstName, java.lang.String middleName, 420 java.lang.String lastName, int prefixId, int suffixId, boolean male, 421 int birthdayMonth, int birthdayDay, int birthdayYear, 422 java.lang.String jobTitle, long[] groupIds, long[] organizationIds, 423 long[] roleIds, long[] userGroupIds, 424 java.util.List<com.liferay.portal.model.Address> addresses, 425 java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses, 426 java.util.List<com.liferay.portal.model.Phone> phones, 427 java.util.List<com.liferay.portal.model.Website> websites, 428 java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> announcementsDelivers, 429 boolean sendEmail, 430 com.liferay.portal.service.ServiceContext serviceContext) 431 throws com.liferay.portal.kernel.exception.PortalException, 432 com.liferay.portal.kernel.exception.SystemException; 433 434 /** 435 * Deletes the user's portrait image. 436 * 437 * @param userId the primary key of the user 438 * @throws PortalException if a user with the primary key could not be 439 found, if the user's portrait could not be found, or if the 440 current user did not have permission to update the user 441 * @throws SystemException if a system exception occurred 442 */ 443 public void deletePortrait(long userId) 444 throws com.liferay.portal.kernel.exception.PortalException, 445 com.liferay.portal.kernel.exception.SystemException; 446 447 /** 448 * Removes the user from the role. 449 * 450 * @param roleId the primary key of the role 451 * @param userId the primary key of the user 452 * @throws PortalException if a role or user with the primary key could not 453 be found, or if the current user did not have permission to 454 assign role members 455 * @throws SystemException if a system exception occurred 456 */ 457 public void deleteRoleUser(long roleId, long userId) 458 throws com.liferay.portal.kernel.exception.PortalException, 459 com.liferay.portal.kernel.exception.SystemException; 460 461 /** 462 * Deletes the user. 463 * 464 * @param userId the primary key of the user 465 * @throws PortalException if a user with the primary key could not be found 466 or if the current user did not have permission to delete the user 467 * @throws SystemException if a system exception occurred 468 */ 469 public void deleteUser(long userId) 470 throws com.liferay.portal.kernel.exception.PortalException, 471 com.liferay.portal.kernel.exception.SystemException; 472 473 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 474 public java.util.List<com.liferay.portal.model.User> getCompanyUsers( 475 long companyId, int start, int end) 476 throws com.liferay.portal.kernel.exception.PortalException, 477 com.liferay.portal.kernel.exception.SystemException; 478 479 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 480 public int getCompanyUsersCount(long companyId) 481 throws com.liferay.portal.kernel.exception.PortalException, 482 com.liferay.portal.kernel.exception.SystemException; 483 484 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 485 public com.liferay.portal.model.User getCurrentUser() 486 throws com.liferay.portal.kernel.exception.PortalException, 487 com.liferay.portal.kernel.exception.SystemException; 488 489 /** 490 * Returns the primary keys of all the users belonging to the group. 491 * 492 * @param groupId the primary key of the group 493 * @return the primary keys of the users belonging to the group 494 * @throws PortalException if the current user did not have permission to 495 view group assignments 496 * @throws SystemException if a system exception occurred 497 */ 498 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 499 public long[] getGroupUserIds(long groupId) 500 throws com.liferay.portal.kernel.exception.PortalException, 501 com.liferay.portal.kernel.exception.SystemException; 502 503 /** 504 * Returns all the users belonging to the group. 505 * 506 * @param groupId the primary key of the group 507 * @return the users belonging to the group 508 * @throws PortalException if the current user did not have permission to 509 view group assignments 510 * @throws SystemException if a system exception occurred 511 */ 512 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 513 public java.util.List<com.liferay.portal.model.User> getGroupUsers( 514 long groupId) 515 throws com.liferay.portal.kernel.exception.PortalException, 516 com.liferay.portal.kernel.exception.SystemException; 517 518 /** 519 * Returns the primary keys of all the users belonging to the organization. 520 * 521 * @param organizationId the primary key of the organization 522 * @return the primary keys of the users belonging to the organization 523 * @throws PortalException if the current user did not have permission to 524 view organization assignments 525 * @throws SystemException if a system exception occurred 526 */ 527 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 528 public long[] getOrganizationUserIds(long organizationId) 529 throws com.liferay.portal.kernel.exception.PortalException, 530 com.liferay.portal.kernel.exception.SystemException; 531 532 /** 533 * Returns all the users belonging to the organization. 534 * 535 * @param organizationId the primary key of the organization 536 * @return users belonging to the organization 537 * @throws PortalException if the current user did not have permission to 538 view organization assignments 539 * @throws SystemException if a system exception occurred 540 */ 541 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 542 public java.util.List<com.liferay.portal.model.User> getOrganizationUsers( 543 long organizationId) 544 throws com.liferay.portal.kernel.exception.PortalException, 545 com.liferay.portal.kernel.exception.SystemException; 546 547 /** 548 * Returns the primary keys of all the users belonging to the role. 549 * 550 * @param roleId the primary key of the role 551 * @return the primary keys of the users belonging to the role 552 * @throws PortalException if the current user did not have permission to 553 view role members 554 * @throws SystemException if a system exception occurred 555 */ 556 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 557 public long[] getRoleUserIds(long roleId) 558 throws com.liferay.portal.kernel.exception.PortalException, 559 com.liferay.portal.kernel.exception.SystemException; 560 561 /** 562 * Returns the user with the email address. 563 * 564 * @param companyId the primary key of the user's company 565 * @param emailAddress the user's email address 566 * @return the user with the email address 567 * @throws PortalException if a user with the email address could not be 568 found or if the current user did not have permission to view the 569 user 570 * @throws SystemException if a system exception occurred 571 */ 572 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 573 public com.liferay.portal.model.User getUserByEmailAddress(long companyId, 574 java.lang.String emailAddress) 575 throws com.liferay.portal.kernel.exception.PortalException, 576 com.liferay.portal.kernel.exception.SystemException; 577 578 /** 579 * Returns the user with the primary key. 580 * 581 * @param userId the primary key of the user 582 * @return the user with the primary key 583 * @throws PortalException if a user with the primary key could not be found 584 or if the current user did not have permission to view the user 585 * @throws SystemException if a system exception occurred 586 */ 587 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 588 public com.liferay.portal.model.User getUserById(long userId) 589 throws com.liferay.portal.kernel.exception.PortalException, 590 com.liferay.portal.kernel.exception.SystemException; 591 592 /** 593 * Returns the user with the screen name. 594 * 595 * @param companyId the primary key of the user's company 596 * @param screenName the user's screen name 597 * @return the user with the screen name 598 * @throws PortalException if a user with the screen name could not be found 599 or if the current user did not have permission to view the user 600 * @throws SystemException if a system exception occurred 601 */ 602 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 603 public com.liferay.portal.model.User getUserByScreenName(long companyId, 604 java.lang.String screenName) 605 throws com.liferay.portal.kernel.exception.PortalException, 606 com.liferay.portal.kernel.exception.SystemException; 607 608 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 609 public java.util.List<com.liferay.portal.model.User> getUserGroupUsers( 610 long userGroupId) 611 throws com.liferay.portal.kernel.exception.PortalException, 612 com.liferay.portal.kernel.exception.SystemException; 613 614 /** 615 * Returns the primary key of the user with the email address. 616 * 617 * @param companyId the primary key of the user's company 618 * @param emailAddress the user's email address 619 * @return the primary key of the user with the email address 620 * @throws PortalException if a user with the email address could not be 621 found 622 * @throws SystemException if a system exception occurred 623 */ 624 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 625 public long getUserIdByEmailAddress(long companyId, 626 java.lang.String emailAddress) 627 throws com.liferay.portal.kernel.exception.PortalException, 628 com.liferay.portal.kernel.exception.SystemException; 629 630 /** 631 * Returns the primary key of the user with the screen name. 632 * 633 * @param companyId the primary key of the user's company 634 * @param screenName the user's screen name 635 * @return the primary key of the user with the screen name 636 * @throws PortalException if a user with the screen name could not be found 637 * @throws SystemException if a system exception occurred 638 */ 639 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 640 public long getUserIdByScreenName(long companyId, 641 java.lang.String screenName) 642 throws com.liferay.portal.kernel.exception.PortalException, 643 com.liferay.portal.kernel.exception.SystemException; 644 645 /** 646 * Returns <code>true</code> if the user is a member of the group. 647 * 648 * @param groupId the primary key of the group 649 * @param userId the primary key of the user 650 * @return <code>true</code> if the user is a member of the group; 651 <code>false</code> otherwise 652 * @throws PortalException if the current user did not have permission to 653 view the user or group members 654 * @throws SystemException if a system exception occurred 655 */ 656 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 657 public boolean hasGroupUser(long groupId, long userId) 658 throws com.liferay.portal.kernel.exception.PortalException, 659 com.liferay.portal.kernel.exception.SystemException; 660 661 /** 662 * Returns <code>true</code> if the user is a member of the role. 663 * 664 * @param roleId the primary key of the role 665 * @param userId the primary key of the user 666 * @return <code>true</code> if the user is a member of the role; 667 <code>false</code> otherwise 668 * @throws PortalException if the current user did not have permission to 669 view the user or role members 670 * @throws SystemException if a system exception occurred 671 */ 672 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 673 public boolean hasRoleUser(long roleId, long userId) 674 throws com.liferay.portal.kernel.exception.PortalException, 675 com.liferay.portal.kernel.exception.SystemException; 676 677 /** 678 * Returns <code>true</code> if the user has the role with the name, 679 * optionally through inheritance. 680 * 681 * @param companyId the primary key of the role's company 682 * @param name the name of the role (must be a regular role, not an 683 organization, site or provider role) 684 * @param userId the primary key of the user 685 * @param inherited whether to include roles inherited from organizations, 686 sites, etc. 687 * @return <code>true</code> if the user has the role; <code>false</code> 688 otherwise 689 * @throws PortalException if a role with the name could not be found 690 * @throws SystemException if a system exception occurred 691 */ 692 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 693 public boolean hasRoleUser(long companyId, java.lang.String name, 694 long userId, boolean inherited) 695 throws com.liferay.portal.kernel.exception.PortalException, 696 com.liferay.portal.kernel.exception.SystemException; 697 698 /** 699 * Sets the users in the role, removing and adding users to the role as 700 * necessary. 701 * 702 * @param roleId the primary key of the role 703 * @param userIds the primary keys of the users 704 * @throws PortalException if the current user did not have permission to 705 assign role members or if the operation was not allowed by the 706 membership policy 707 * @throws SystemException if a system exception occurred 708 */ 709 public void setRoleUsers(long roleId, long[] userIds) 710 throws com.liferay.portal.kernel.exception.PortalException, 711 com.liferay.portal.kernel.exception.SystemException; 712 713 /** 714 * Sets the users in the user group, removing and adding users to the user 715 * group as necessary. 716 * 717 * @param userGroupId the primary key of the user group 718 * @param userIds the primary keys of the users 719 * @throws PortalException if the current user did not have permission to 720 assign group members 721 * @throws SystemException if a system exception occurred 722 */ 723 public void setUserGroupUsers(long userGroupId, long[] userIds) 724 throws com.liferay.portal.kernel.exception.PortalException, 725 com.liferay.portal.kernel.exception.SystemException; 726 727 /** 728 * Removes the users from the teams of a group. 729 * 730 * @param groupId the primary key of the group 731 * @param userIds the primary keys of the users 732 * @throws PortalException if the current user did not have permission to 733 modify user group assignments 734 * @throws SystemException if a system exception occurred 735 */ 736 public void unsetGroupTeamsUsers(long groupId, long[] userIds) 737 throws com.liferay.portal.kernel.exception.PortalException, 738 com.liferay.portal.kernel.exception.SystemException; 739 740 /** 741 * Removes the users from the group. 742 * 743 * @param groupId the primary key of the group 744 * @param userIds the primary keys of the users 745 * @param serviceContext the service context to be applied (optionally 746 <code>null</code>) 747 * @throws PortalException if the current user did not have permission to 748 modify group assignments or if the operation was not allowed by 749 the membership policy 750 * @throws SystemException if a system exception occurred 751 */ 752 public void unsetGroupUsers(long groupId, long[] userIds, 753 com.liferay.portal.service.ServiceContext serviceContext) 754 throws com.liferay.portal.kernel.exception.PortalException, 755 com.liferay.portal.kernel.exception.SystemException; 756 757 /** 758 * Removes the users from the organization. 759 * 760 * @param organizationId the primary key of the organization 761 * @param userIds the primary keys of the users 762 * @throws PortalException if the current user did not have permission to 763 modify organization assignments or if the operation was not 764 allowed by the membership policy 765 * @throws SystemException if a system exception occurred 766 */ 767 public void unsetOrganizationUsers(long organizationId, long[] userIds) 768 throws com.liferay.portal.kernel.exception.PortalException, 769 com.liferay.portal.kernel.exception.SystemException; 770 771 /** 772 * Removes the users from the password policy. 773 * 774 * @param passwordPolicyId the primary key of the password policy 775 * @param userIds the primary keys of the users 776 * @throws PortalException if the current user did not have permission to 777 modify policy assignments 778 * @throws SystemException if a system exception occurred 779 */ 780 public void unsetPasswordPolicyUsers(long passwordPolicyId, long[] userIds) 781 throws com.liferay.portal.kernel.exception.PortalException, 782 com.liferay.portal.kernel.exception.SystemException; 783 784 /** 785 * Removes the users from the role. 786 * 787 * @param roleId the primary key of the role 788 * @param userIds the primary keys of the users 789 * @throws PortalException if the current user did not have permission to 790 modify role assignments or if the operation was not allowed by 791 the membership policy 792 * @throws SystemException if a system exception occurred 793 */ 794 public void unsetRoleUsers(long roleId, long[] userIds) 795 throws com.liferay.portal.kernel.exception.PortalException, 796 com.liferay.portal.kernel.exception.SystemException; 797 798 /** 799 * Removes the users from the team. 800 * 801 * @param teamId the primary key of the team 802 * @param userIds the primary keys of the users 803 * @throws PortalException if the current user did not have permission to 804 modify team assignments 805 * @throws SystemException if a system exception occurred 806 */ 807 public void unsetTeamUsers(long teamId, long[] userIds) 808 throws com.liferay.portal.kernel.exception.PortalException, 809 com.liferay.portal.kernel.exception.SystemException; 810 811 /** 812 * Removes the users from the user group. 813 * 814 * @param userGroupId the primary key of the user group 815 * @param userIds the primary keys of the users 816 * @throws PortalException if the current user did not have permission to 817 modify user group assignments or if the operation was not allowed 818 by the membership policy 819 * @throws SystemException if a system exception occurred 820 */ 821 public void unsetUserGroupUsers(long userGroupId, long[] userIds) 822 throws com.liferay.portal.kernel.exception.PortalException, 823 com.liferay.portal.kernel.exception.SystemException; 824 825 /** 826 * Updates the user's response to the terms of use agreement. 827 * 828 * @param userId the primary key of the user 829 * @param agreedToTermsOfUse whether the user has agree to the terms of use 830 * @return the user 831 * @throws PortalException if the current user did not have permission to 832 update the user's agreement to terms-of-use 833 * @throws SystemException if a system exception occurred 834 */ 835 public com.liferay.portal.model.User updateAgreedToTermsOfUse(long userId, 836 boolean agreedToTermsOfUse) 837 throws com.liferay.portal.kernel.exception.PortalException, 838 com.liferay.portal.kernel.exception.SystemException; 839 840 /** 841 * Updates the user's email address. 842 * 843 * @param userId the primary key of the user 844 * @param password the user's password 845 * @param emailAddress1 the user's new email address 846 * @param emailAddress2 the user's new email address confirmation 847 * @param serviceContext the service context to be applied. Must set the 848 portal URL, main path, primary key of the layout, remote address, 849 remote host, and agent for the user. 850 * @return the user 851 * @throws PortalException if a user with the primary key could not be found 852 or if the current user did not have permission to update the user 853 * @throws SystemException if a system exception occurred 854 */ 855 public com.liferay.portal.model.User updateEmailAddress(long userId, 856 java.lang.String password, java.lang.String emailAddress1, 857 java.lang.String emailAddress2, 858 com.liferay.portal.service.ServiceContext serviceContext) 859 throws com.liferay.portal.kernel.exception.PortalException, 860 com.liferay.portal.kernel.exception.SystemException; 861 862 /** 863 * Updates a user account that was automatically created when a guest user 864 * participated in an action (e.g. posting a comment) and only provided his 865 * name and email address. 866 * 867 * @param companyId the primary key of the user's company 868 * @param autoPassword whether a password should be automatically generated 869 for the user 870 * @param password1 the user's password 871 * @param password2 the user's password confirmation 872 * @param autoScreenName whether a screen name should be automatically 873 generated for the user 874 * @param screenName the user's screen name 875 * @param emailAddress the user's email address 876 * @param facebookId the user's facebook ID 877 * @param openId the user's OpenID 878 * @param locale the user's locale 879 * @param firstName the user's first name 880 * @param middleName the user's middle name 881 * @param lastName the user's last name 882 * @param prefixId the user's name prefix ID 883 * @param suffixId the user's name suffix ID 884 * @param male whether the user is male 885 * @param birthdayMonth the user's birthday month (0-based, meaning 0 for 886 January) 887 * @param birthdayDay the user's birthday day 888 * @param birthdayYear the user's birthday year 889 * @param jobTitle the user's job title 890 * @param updateUserInformation whether to update the user's information 891 * @param sendEmail whether to send the user an email notification about 892 their new account 893 * @param serviceContext the service context to be applied (optionally 894 <code>null</code>). Can set the expando bridge attributes for the 895 user. 896 * @return the user 897 * @throws PortalException if the user's information was invalid or if the 898 email address was reserved 899 * @throws SystemException if a system exception occurred 900 */ 901 public com.liferay.portal.model.User updateIncompleteUser(long companyId, 902 boolean autoPassword, java.lang.String password1, 903 java.lang.String password2, boolean autoScreenName, 904 java.lang.String screenName, java.lang.String emailAddress, 905 long facebookId, java.lang.String openId, java.util.Locale locale, 906 java.lang.String firstName, java.lang.String middleName, 907 java.lang.String lastName, int prefixId, int suffixId, boolean male, 908 int birthdayMonth, int birthdayDay, int birthdayYear, 909 java.lang.String jobTitle, boolean updateUserInformation, 910 boolean sendEmail, 911 com.liferay.portal.service.ServiceContext serviceContext) 912 throws com.liferay.portal.kernel.exception.PortalException, 913 com.liferay.portal.kernel.exception.SystemException; 914 915 /** 916 * Updates whether the user is locked out from logging in. 917 * 918 * @param userId the primary key of the user 919 * @param lockout whether the user is locked out 920 * @return the user 921 * @throws PortalException if the user did not have permission to lock out 922 the user 923 * @throws SystemException if a system exception occurred 924 */ 925 public com.liferay.portal.model.User updateLockoutById(long userId, 926 boolean lockout) 927 throws com.liferay.portal.kernel.exception.PortalException, 928 com.liferay.portal.kernel.exception.SystemException; 929 930 /** 931 * Updates the user's OpenID. 932 * 933 * @param userId the primary key of the user 934 * @param openId the new OpenID 935 * @return the user 936 * @throws PortalException if a user with the primary key could not be found 937 or if the current user did not have permission to update the user 938 * @throws SystemException if a system exception occurred 939 */ 940 public com.liferay.portal.model.User updateOpenId(long userId, 941 java.lang.String openId) 942 throws com.liferay.portal.kernel.exception.PortalException, 943 com.liferay.portal.kernel.exception.SystemException; 944 945 /** 946 * Sets the organizations that the user is in, removing and adding 947 * organizations as necessary. 948 * 949 * @param userId the primary key of the user 950 * @param organizationIds the primary keys of the organizations 951 * @param serviceContext the service context to be applied. Must set 952 whether user indexing is enabled. 953 * @throws PortalException if a user with the primary key could not be found 954 or if the current user did not have permission to update the user 955 * @throws SystemException if a system exception occurred 956 */ 957 public void updateOrganizations(long userId, long[] organizationIds, 958 com.liferay.portal.service.ServiceContext serviceContext) 959 throws com.liferay.portal.kernel.exception.PortalException, 960 com.liferay.portal.kernel.exception.SystemException; 961 962 /** 963 * Updates the user's password without tracking or validation of the change. 964 * 965 * @param userId the primary key of the user 966 * @param password1 the user's new password 967 * @param password2 the user's new password confirmation 968 * @param passwordReset whether the user should be asked to reset their 969 password the next time they log in 970 * @return the user 971 * @throws PortalException if a user with the primary key could not be found 972 or if the current user did not have permission to update the user 973 * @throws SystemException if a system exception occurred 974 */ 975 public com.liferay.portal.model.User updatePassword(long userId, 976 java.lang.String password1, java.lang.String password2, 977 boolean passwordReset) 978 throws com.liferay.portal.kernel.exception.PortalException, 979 com.liferay.portal.kernel.exception.SystemException; 980 981 /** 982 * Updates the user's portrait image. 983 * 984 * @param userId the primary key of the user 985 * @param bytes the new portrait image data 986 * @return the user 987 * @throws PortalException if a user with the primary key could not be 988 found, if the new portrait was invalid, or if the current user 989 did not have permission to update the user 990 * @throws SystemException if a system exception occurred 991 */ 992 public com.liferay.portal.model.User updatePortrait(long userId, 993 byte[] bytes) 994 throws com.liferay.portal.kernel.exception.PortalException, 995 com.liferay.portal.kernel.exception.SystemException; 996 997 /** 998 * Updates the user's password reset question and answer. 999 * 1000 * @param userId the primary key of the user 1001 * @param question the user's new password reset question 1002 * @param answer the user's new password reset answer 1003 * @return the user 1004 * @throws PortalException if a user with the primary key could not be 1005 found, if the new question or answer were invalid, or if the 1006 current user did not have permission to update the user 1007 * @throws SystemException if a system exception occurred 1008 */ 1009 public com.liferay.portal.model.User updateReminderQuery(long userId, 1010 java.lang.String question, java.lang.String answer) 1011 throws com.liferay.portal.kernel.exception.PortalException, 1012 com.liferay.portal.kernel.exception.SystemException; 1013 1014 /** 1015 * Updates the user's screen name. 1016 * 1017 * @param userId the primary key of the user 1018 * @param screenName the user's new screen name 1019 * @return the user 1020 * @throws PortalException if a user with the primary key could not be 1021 found, if the new screen name was invalid, or if the current user 1022 did not have permission to update the user 1023 * @throws SystemException if a system exception occurred 1024 */ 1025 public com.liferay.portal.model.User updateScreenName(long userId, 1026 java.lang.String screenName) 1027 throws com.liferay.portal.kernel.exception.PortalException, 1028 com.liferay.portal.kernel.exception.SystemException; 1029 1030 /** 1031 * Updates the user's workflow status. 1032 * 1033 * @param userId the primary key of the user 1034 * @param status the user's new workflow status 1035 * @return the user 1036 * @throws PortalException if a user with the primary key could not be 1037 found, if the current user was updating her own status to 1038 anything but {@link 1039 com.liferay.portal.kernel.workflow.WorkflowConstants#STATUS_APPROVED}, 1040 or if the current user did not have permission to update the 1041 user's workflow status. 1042 * @throws SystemException if a system exception occurred 1043 * @deprecated As of 7.0.0, replaced by {@link #updateStatus(long, int, 1044 ServiceContext)} 1045 */ 1046 @java.lang.Deprecated 1047 public com.liferay.portal.model.User updateStatus(long userId, int status) 1048 throws com.liferay.portal.kernel.exception.PortalException, 1049 com.liferay.portal.kernel.exception.SystemException; 1050 1051 /** 1052 * Updates the user's workflow status. 1053 * 1054 * @param userId the primary key of the user 1055 * @param status the user's new workflow status 1056 * @param serviceContext the service context to be applied. You can specify 1057 an unencrypted custom password (used by an LDAP listener) for the 1058 user via attribute <code>passwordUnencrypted</code>. 1059 * @return the user 1060 * @throws PortalException if a user with the primary key could not be 1061 found, if the current user was updating her own status to 1062 anything but {@link 1063 com.liferay.portal.kernel.workflow.WorkflowConstants#STATUS_APPROVED}, 1064 or if the current user did not have permission to update the 1065 user's workflow status. 1066 * @throws SystemException if a system exception occurred 1067 */ 1068 public com.liferay.portal.model.User updateStatus(long userId, int status, 1069 com.liferay.portal.service.ServiceContext serviceContext) 1070 throws com.liferay.portal.kernel.exception.PortalException, 1071 com.liferay.portal.kernel.exception.SystemException; 1072 1073 /** 1074 * Updates the user with additional parameters. 1075 * 1076 * @param userId the primary key of the user 1077 * @param oldPassword the user's old password 1078 * @param newPassword1 the user's new password (optionally 1079 <code>null</code>) 1080 * @param newPassword2 the user's new password confirmation (optionally 1081 <code>null</code>) 1082 * @param passwordReset whether the user should be asked to reset their 1083 password the next time they login 1084 * @param reminderQueryQuestion the user's new password reset question 1085 * @param reminderQueryAnswer the user's new password reset answer 1086 * @param screenName the user's new screen name 1087 * @param emailAddress the user's new email address 1088 * @param facebookId the user's new Facebook ID 1089 * @param openId the user's new OpenID 1090 * @param languageId the user's new language ID 1091 * @param timeZoneId the user's new time zone ID 1092 * @param greeting the user's new greeting 1093 * @param comments the user's new comments 1094 * @param firstName the user's new first name 1095 * @param middleName the user's new middle name 1096 * @param lastName the user's new last name 1097 * @param prefixId the user's new name prefix ID 1098 * @param suffixId the user's new name suffix ID 1099 * @param male whether user is male 1100 * @param birthdayMonth the user's new birthday month (0-based, meaning 0 1101 for January) 1102 * @param birthdayDay the user's new birthday day 1103 * @param birthdayYear the user's birthday year 1104 * @param smsSn the user's new SMS screen name 1105 * @param aimSn the user's new AIM screen name 1106 * @param facebookSn the user's new Facebook screen name 1107 * @param icqSn the user's new ICQ screen name 1108 * @param jabberSn the user's new Jabber screen name 1109 * @param msnSn the user's new MSN screen name 1110 * @param mySpaceSn the user's new MySpace screen name 1111 * @param skypeSn the user's new Skype screen name 1112 * @param twitterSn the user's new Twitter screen name 1113 * @param ymSn the user's new Yahoo! Messenger screen name 1114 * @param jobTitle the user's new job title 1115 * @param groupIds the primary keys of the user's groups 1116 * @param organizationIds the primary keys of the user's organizations 1117 * @param roleIds the primary keys of the user's roles 1118 * @param userGroupRoles the user user's group roles 1119 * @param userGroupIds the primary keys of the user's user groups 1120 * @param addresses the user's addresses 1121 * @param emailAddresses the user's email addresses 1122 * @param phones the user's phone numbers 1123 * @param websites the user's websites 1124 * @param announcementsDelivers the announcements deliveries 1125 * @param serviceContext the service context to be applied (optionally 1126 <code>null</code>). Can set the UUID (with the <code>uuid</code> 1127 attribute), asset category IDs, asset tag names, and expando 1128 bridge attributes for the user. 1129 * @return the user 1130 * @throws PortalException if a user with the primary key could not be 1131 found, if the new information was invalid, if the current user 1132 did not have permission to update the user, or if the operation 1133 was not allowed by the membership policy 1134 * @throws SystemException if a system exception occurred 1135 */ 1136 public com.liferay.portal.model.User updateUser(long userId, 1137 java.lang.String oldPassword, java.lang.String newPassword1, 1138 java.lang.String newPassword2, boolean passwordReset, 1139 java.lang.String reminderQueryQuestion, 1140 java.lang.String reminderQueryAnswer, java.lang.String screenName, 1141 java.lang.String emailAddress, long facebookId, 1142 java.lang.String openId, java.lang.String languageId, 1143 java.lang.String timeZoneId, java.lang.String greeting, 1144 java.lang.String comments, java.lang.String firstName, 1145 java.lang.String middleName, java.lang.String lastName, int prefixId, 1146 int suffixId, boolean male, int birthdayMonth, int birthdayDay, 1147 int birthdayYear, java.lang.String smsSn, java.lang.String aimSn, 1148 java.lang.String facebookSn, java.lang.String icqSn, 1149 java.lang.String jabberSn, java.lang.String msnSn, 1150 java.lang.String mySpaceSn, java.lang.String skypeSn, 1151 java.lang.String twitterSn, java.lang.String ymSn, 1152 java.lang.String jobTitle, long[] groupIds, long[] organizationIds, 1153 long[] roleIds, 1154 java.util.List<com.liferay.portal.model.UserGroupRole> userGroupRoles, 1155 long[] userGroupIds, 1156 java.util.List<com.liferay.portal.model.Address> addresses, 1157 java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses, 1158 java.util.List<com.liferay.portal.model.Phone> phones, 1159 java.util.List<com.liferay.portal.model.Website> websites, 1160 java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> announcementsDelivers, 1161 com.liferay.portal.service.ServiceContext serviceContext) 1162 throws com.liferay.portal.kernel.exception.PortalException, 1163 com.liferay.portal.kernel.exception.SystemException; 1164 1165 /** 1166 * Updates the user. 1167 * 1168 * @param userId the primary key of the user 1169 * @param oldPassword the user's old password 1170 * @param newPassword1 the user's new password (optionally 1171 <code>null</code>) 1172 * @param newPassword2 the user's new password confirmation (optionally 1173 <code>null</code>) 1174 * @param passwordReset whether the user should be asked to reset their 1175 password the next time they login 1176 * @param reminderQueryQuestion the user's new password reset question 1177 * @param reminderQueryAnswer the user's new password reset answer 1178 * @param screenName the user's new screen name 1179 * @param emailAddress the user's new email address 1180 * @param facebookId the user's new Facebook ID 1181 * @param openId the user's new OpenID 1182 * @param languageId the user's new language ID 1183 * @param timeZoneId the user's new time zone ID 1184 * @param greeting the user's new greeting 1185 * @param comments the user's new comments 1186 * @param firstName the user's new first name 1187 * @param middleName the user's new middle name 1188 * @param lastName the user's new last name 1189 * @param prefixId the user's new name prefix ID 1190 * @param suffixId the user's new name suffix ID 1191 * @param male whether user is male 1192 * @param birthdayMonth the user's new birthday month (0-based, meaning 0 1193 for January) 1194 * @param birthdayDay the user's new birthday day 1195 * @param birthdayYear the user's birthday year 1196 * @param smsSn the user's new SMS screen name 1197 * @param aimSn the user's new AIM screen name 1198 * @param facebookSn the user's new Facebook screen name 1199 * @param icqSn the user's new ICQ screen name 1200 * @param jabberSn the user's new Jabber screen name 1201 * @param msnSn the user's new MSN screen name 1202 * @param mySpaceSn the user's new MySpace screen name 1203 * @param skypeSn the user's new Skype screen name 1204 * @param twitterSn the user's new Twitter screen name 1205 * @param ymSn the user's new Yahoo! Messenger screen name 1206 * @param jobTitle the user's new job title 1207 * @param groupIds the primary keys of the user's groups 1208 * @param organizationIds the primary keys of the user's organizations 1209 * @param roleIds the primary keys of the user's roles 1210 * @param userGroupRoles the user user's group roles 1211 * @param userGroupIds the primary keys of the user's user groups 1212 * @param serviceContext the service context to be applied (optionally 1213 <code>null</code>). Can set the UUID (with the <code>uuid</code> 1214 attribute), asset category IDs, asset tag names, and expando 1215 bridge attributes for the user. 1216 * @return the user 1217 * @throws PortalException if a user with the primary key could not be 1218 found, if the new information was invalid, if the current user 1219 did not have permission to update the user, or if the operation 1220 was not allowed by the membership policy 1221 * @throws SystemException if a system exception occurred 1222 */ 1223 public com.liferay.portal.model.User updateUser(long userId, 1224 java.lang.String oldPassword, java.lang.String newPassword1, 1225 java.lang.String newPassword2, boolean passwordReset, 1226 java.lang.String reminderQueryQuestion, 1227 java.lang.String reminderQueryAnswer, java.lang.String screenName, 1228 java.lang.String emailAddress, long facebookId, 1229 java.lang.String openId, java.lang.String languageId, 1230 java.lang.String timeZoneId, java.lang.String greeting, 1231 java.lang.String comments, java.lang.String firstName, 1232 java.lang.String middleName, java.lang.String lastName, int prefixId, 1233 int suffixId, boolean male, int birthdayMonth, int birthdayDay, 1234 int birthdayYear, java.lang.String smsSn, java.lang.String aimSn, 1235 java.lang.String facebookSn, java.lang.String icqSn, 1236 java.lang.String jabberSn, java.lang.String msnSn, 1237 java.lang.String mySpaceSn, java.lang.String skypeSn, 1238 java.lang.String twitterSn, java.lang.String ymSn, 1239 java.lang.String jobTitle, long[] groupIds, long[] organizationIds, 1240 long[] roleIds, 1241 java.util.List<com.liferay.portal.model.UserGroupRole> userGroupRoles, 1242 long[] userGroupIds, 1243 com.liferay.portal.service.ServiceContext serviceContext) 1244 throws com.liferay.portal.kernel.exception.PortalException, 1245 com.liferay.portal.kernel.exception.SystemException; 1246 }