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