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