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