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