001 /** 002 * Copyright (c) 2000-2011 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.http; 016 017 import com.liferay.portal.kernel.log.Log; 018 import com.liferay.portal.kernel.log.LogFactoryUtil; 019 import com.liferay.portal.kernel.util.LocaleUtil; 020 import com.liferay.portal.service.UserServiceUtil; 021 022 import java.rmi.RemoteException; 023 024 /** 025 * <p> 026 * This class provides a SOAP utility for the 027 * {@link com.liferay.portal.service.UserServiceUtil} service utility. The 028 * static methods of this class calls the same methods of the service utility. 029 * However, the signatures are different because it is difficult for SOAP to 030 * support certain types. 031 * </p> 032 * 033 * <p> 034 * ServiceBuilder follows certain rules in translating the methods. For example, 035 * if the method in the service utility returns a {@link java.util.List}, that 036 * is translated to an array of {@link com.liferay.portal.model.UserSoap}. 037 * If the method in the service utility returns a 038 * {@link com.liferay.portal.model.User}, that is translated to a 039 * {@link com.liferay.portal.model.UserSoap}. Methods that SOAP cannot 040 * safely wire are skipped. 041 * </p> 042 * 043 * <p> 044 * The benefits of using the SOAP utility is that it is cross platform 045 * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and 046 * even Perl, to call the generated services. One drawback of SOAP is that it is 047 * slow because it needs to serialize all calls into a text format (XML). 048 * </p> 049 * 050 * <p> 051 * You can see a list of services at 052 * http://localhost:8080/tunnel-web/secure/axis. Set the property 053 * <b>tunnel.servlet.hosts.allowed</b> in portal.properties to configure 054 * security. 055 * </p> 056 * 057 * <p> 058 * The SOAP utility is only generated for remote services. 059 * </p> 060 * 061 * @author Brian Wing Shun Chan 062 * @see UserServiceHttp 063 * @see com.liferay.portal.model.UserSoap 064 * @see com.liferay.portal.service.UserServiceUtil 065 * @generated 066 */ 067 public class UserServiceSoap { 068 /** 069 * Adds the users to the group. 070 * 071 * @param groupId the primary key of the group 072 * @param userIds the primary keys of the users 073 * @throws PortalException if a group or user with the primary key could 074 not be found, or if the user did not have permission to assign 075 group members 076 * @throws SystemException if a system exception occurred 077 */ 078 public static void addGroupUsers(long groupId, long[] userIds) 079 throws RemoteException { 080 try { 081 UserServiceUtil.addGroupUsers(groupId, userIds); 082 } 083 catch (Exception e) { 084 _log.error(e, e); 085 086 throw new RemoteException(e.getMessage()); 087 } 088 } 089 090 /** 091 * Adds the users to the organization. 092 * 093 * @param organizationId the primary key of the organization 094 * @param userIds the primary keys of the users 095 * @throws PortalException if an organization or user with the primary key 096 could not be found, if the user did not have permission to 097 assign organization members, or if current user did not have an 098 organization in common with a given user 099 * @throws SystemException if a system exception occurred 100 */ 101 public static void addOrganizationUsers(long organizationId, long[] userIds) 102 throws RemoteException { 103 try { 104 UserServiceUtil.addOrganizationUsers(organizationId, userIds); 105 } 106 catch (Exception e) { 107 _log.error(e, e); 108 109 throw new RemoteException(e.getMessage()); 110 } 111 } 112 113 /** 114 * Assigns the password policy to the users, removing any other currently 115 * assigned password policies. 116 * 117 * @param passwordPolicyId the primary key of the password policy 118 * @param userIds the primary keys of the users 119 * @throws PortalException if the user did not have permission to assign 120 policy members 121 * @throws SystemException if a system exception occurred 122 */ 123 public static void addPasswordPolicyUsers(long passwordPolicyId, 124 long[] userIds) throws RemoteException { 125 try { 126 UserServiceUtil.addPasswordPolicyUsers(passwordPolicyId, userIds); 127 } 128 catch (Exception e) { 129 _log.error(e, e); 130 131 throw new RemoteException(e.getMessage()); 132 } 133 } 134 135 /** 136 * Adds the users to the role. 137 * 138 * @param roleId the primary key of the role 139 * @param userIds the primary keys of the users 140 * @throws PortalException if a role or user with the primary key could not 141 be found or if the user did not have permission to assign role 142 members 143 * @throws SystemException if a system exception occurred 144 */ 145 public static void addRoleUsers(long roleId, long[] userIds) 146 throws RemoteException { 147 try { 148 UserServiceUtil.addRoleUsers(roleId, userIds); 149 } 150 catch (Exception e) { 151 _log.error(e, e); 152 153 throw new RemoteException(e.getMessage()); 154 } 155 } 156 157 /** 158 * Adds the users to the team. 159 * 160 * @param teamId the primary key of the team 161 * @param userIds the primary keys of the users 162 * @throws PortalException if a team or user with the primary key could not 163 be found or if the user did not have permission to assign team 164 members 165 * @throws SystemException if a system exception occurred 166 */ 167 public static void addTeamUsers(long teamId, long[] userIds) 168 throws RemoteException { 169 try { 170 UserServiceUtil.addTeamUsers(teamId, userIds); 171 } 172 catch (Exception e) { 173 _log.error(e, e); 174 175 throw new RemoteException(e.getMessage()); 176 } 177 } 178 179 /** 180 * Adds a user with additional parameters. 181 * 182 * <p> 183 * This method handles the creation and bookkeeping of the user including 184 * its resources, metadata, and internal data structures. It is not 185 * necessary to make subsequent calls to any methods to setup default 186 * groups, resources, etc. 187 * </p> 188 * 189 * @param companyId the primary key of the user's company 190 * @param autoPassword whether a password should be automatically 191 generated for the user 192 * @param password1 the user's password 193 * @param password2 the user's password confirmation 194 * @param autoScreenName whether a screen name should be automatically 195 generated for the user 196 * @param screenName the user's screen name 197 * @param emailAddress the user's email address 198 * @param facebookId the user's facebook ID 199 * @param openId the user's OpenID 200 * @param locale the user's locale 201 * @param firstName the user's first name 202 * @param middleName the user's middle name 203 * @param lastName the user's last name 204 * @param prefixId the user's name prefix ID 205 * @param suffixId the user's name suffix ID 206 * @param male whether the user is male 207 * @param birthdayMonth the user's birthday month (0-based, meaning 0 for 208 January) 209 * @param birthdayDay the user's birthday day 210 * @param birthdayYear the user's birthday year 211 * @param jobTitle the user's job title 212 * @param groupIds the primary keys of the user's groups 213 * @param organizationIds the primary keys of the user's organizations 214 * @param roleIds the primary keys of the roles this user possesses 215 * @param userGroupIds the primary keys of the user's user groups 216 * @param addresses the user's addresses 217 * @param emailAddresses the user's email addresses 218 * @param phones the user's phone numbers 219 * @param websites the user's websites 220 * @param announcementsDelivers the announcements deliveries 221 * @param sendEmail whether to send the user an email notification about 222 their new account 223 * @param serviceContext the user's service context (optionally 224 <code>null</code>). Can specify the user's universally unique 225 identifier (with the <code>uuid</code> attribute), asset 226 category IDs, asset tag names, and expando bridge attributes. 227 * @return the new user 228 * @throws PortalException if the user's information was invalid, if the 229 creator did not have permission to add users, if the email 230 address was reserved, or some other portal exception occurred 231 * @throws SystemException if a system exception occurred 232 */ 233 public static com.liferay.portal.model.UserSoap addUser(long companyId, 234 boolean autoPassword, java.lang.String password1, 235 java.lang.String password2, boolean autoScreenName, 236 java.lang.String screenName, java.lang.String emailAddress, 237 long facebookId, java.lang.String openId, String locale, 238 java.lang.String firstName, java.lang.String middleName, 239 java.lang.String lastName, int prefixId, int suffixId, boolean male, 240 int birthdayMonth, int birthdayDay, int birthdayYear, 241 java.lang.String jobTitle, long[] groupIds, long[] organizationIds, 242 long[] roleIds, long[] userGroupIds, 243 com.liferay.portal.model.AddressSoap[] addresses, 244 com.liferay.portal.model.EmailAddressSoap[] emailAddresses, 245 com.liferay.portal.model.PhoneSoap[] phones, 246 com.liferay.portal.model.WebsiteSoap[] websites, 247 com.liferay.portlet.announcements.model.AnnouncementsDeliverySoap[] announcementsDelivers, 248 boolean sendEmail, 249 com.liferay.portal.service.ServiceContext serviceContext) 250 throws RemoteException { 251 try { 252 com.liferay.portal.model.User returnValue = UserServiceUtil.addUser(companyId, 253 autoPassword, password1, password2, autoScreenName, 254 screenName, emailAddress, facebookId, openId, 255 LocaleUtil.fromLanguageId(locale), firstName, middleName, 256 lastName, prefixId, suffixId, male, birthdayMonth, 257 birthdayDay, birthdayYear, jobTitle, groupIds, 258 organizationIds, roleIds, userGroupIds, 259 com.liferay.portal.model.impl.AddressModelImpl.toModels( 260 addresses), 261 com.liferay.portal.model.impl.EmailAddressModelImpl.toModels( 262 emailAddresses), 263 com.liferay.portal.model.impl.PhoneModelImpl.toModels( 264 phones), 265 com.liferay.portal.model.impl.WebsiteModelImpl.toModels( 266 websites), 267 com.liferay.portlet.announcements.model.impl.AnnouncementsDeliveryModelImpl.toModels( 268 announcementsDelivers), sendEmail, serviceContext); 269 270 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue); 271 } 272 catch (Exception e) { 273 _log.error(e, e); 274 275 throw new RemoteException(e.getMessage()); 276 } 277 } 278 279 /** 280 * Adds a user. 281 * 282 * <p> 283 * This method handles the creation and bookkeeping of the user including 284 * its resources, metadata, and internal data structures. It is not 285 * necessary to make subsequent calls to any methods to setup default 286 * groups, resources, etc. 287 * </p> 288 * 289 * @param companyId the primary key of the user's company 290 * @param autoPassword whether a password should be automatically 291 generated for the user 292 * @param password1 the user's password 293 * @param password2 the user's password confirmation 294 * @param autoScreenName whether a screen name should be automatically 295 generated for the user 296 * @param screenName the user's screen name 297 * @param emailAddress the user's email address 298 * @param facebookId the user's facebook ID 299 * @param openId the user's OpenID 300 * @param locale the user's locale 301 * @param firstName the user's first name 302 * @param middleName the user's middle name 303 * @param lastName the user's last name 304 * @param prefixId the user's name prefix ID 305 * @param suffixId the user's name suffix ID 306 * @param male whether the user is male 307 * @param birthdayMonth the user's birthday month (0-based, meaning 0 for 308 January) 309 * @param birthdayDay the user's birthday day 310 * @param birthdayYear the user's birthday year 311 * @param jobTitle the user's job title 312 * @param groupIds the primary keys of the user's groups 313 * @param organizationIds the primary keys of the user's organizations 314 * @param roleIds the primary keys of the roles this user possesses 315 * @param userGroupIds the primary keys of the user's user groups 316 * @param sendEmail whether to send the user an email notification about 317 their new account 318 * @param serviceContext the user's service context (optionally 319 <code>null</code>). Can specify the user's universally unique 320 identifier (with the <code>uuid</code> attribute), asset 321 category IDs, asset tag names, and expando bridge attributes. 322 * @return the new user 323 * @throws PortalException if the user's information was invalid, if the 324 creator did not have permission to add users, or if the email 325 address was reserved 326 * @throws SystemException if a system exception occurred 327 */ 328 public static com.liferay.portal.model.UserSoap addUser(long companyId, 329 boolean autoPassword, java.lang.String password1, 330 java.lang.String password2, boolean autoScreenName, 331 java.lang.String screenName, java.lang.String emailAddress, 332 long facebookId, java.lang.String openId, String locale, 333 java.lang.String firstName, java.lang.String middleName, 334 java.lang.String lastName, int prefixId, int suffixId, boolean male, 335 int birthdayMonth, int birthdayDay, int birthdayYear, 336 java.lang.String jobTitle, long[] groupIds, long[] organizationIds, 337 long[] roleIds, long[] userGroupIds, boolean sendEmail, 338 com.liferay.portal.service.ServiceContext serviceContext) 339 throws RemoteException { 340 try { 341 com.liferay.portal.model.User returnValue = UserServiceUtil.addUser(companyId, 342 autoPassword, password1, password2, autoScreenName, 343 screenName, emailAddress, facebookId, openId, 344 LocaleUtil.fromLanguageId(locale), firstName, middleName, 345 lastName, prefixId, suffixId, male, birthdayMonth, 346 birthdayDay, birthdayYear, jobTitle, groupIds, 347 organizationIds, roleIds, userGroupIds, sendEmail, 348 serviceContext); 349 350 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue); 351 } 352 catch (Exception e) { 353 _log.error(e, e); 354 355 throw new RemoteException(e.getMessage()); 356 } 357 } 358 359 /** 360 * Adds a user with workflow and additional parameters. 361 * 362 * <p> 363 * This method handles the creation and bookkeeping of the user including 364 * its resources, metadata, and internal data structures. It is not 365 * necessary to make subsequent calls to any methods to setup default 366 * groups, resources, etc. 367 * </p> 368 * 369 * @param companyId the primary key of the user's company 370 * @param autoPassword whether a password should be automatically 371 generated for the user 372 * @param password1 the user's password 373 * @param password2 the user's password confirmation 374 * @param autoScreenName whether a screen name should be automatically 375 generated for the user 376 * @param screenName the user's screen name 377 * @param emailAddress the user's email address 378 * @param facebookId the user's facebook ID 379 * @param openId the user's OpenID 380 * @param locale the user's locale 381 * @param firstName the user's first name 382 * @param middleName the user's middle name 383 * @param lastName the user's last name 384 * @param prefixId the user's name prefix ID 385 * @param suffixId the user's name suffix ID 386 * @param male whether the user is male 387 * @param birthdayMonth the user's birthday month (0-based, meaning 0 for 388 January) 389 * @param birthdayDay the user's birthday day 390 * @param birthdayYear the user's birthday year 391 * @param jobTitle the user's job title 392 * @param groupIds the primary keys of the user's groups 393 * @param organizationIds the primary keys of the user's organizations 394 * @param roleIds the primary keys of the roles this user possesses 395 * @param userGroupIds the primary keys of the user's user groups 396 * @param addresses the user's addresses 397 * @param emailAddresses the user's email addresses 398 * @param phones the user's phone numbers 399 * @param websites the user's websites 400 * @param announcementsDelivers the announcements deliveries 401 * @param sendEmail whether to send the user an email notification about 402 their new account 403 * @param serviceContext the user's service context (optionally 404 <code>null</code>). Can specify the user's universally unique 405 identifier (with the <code>uuid</code> attribute), asset 406 category IDs, asset tag names, and expando bridge attributes. 407 * @return the new user 408 * @throws PortalException if the user's information was invalid, if the 409 creator did not have permission to add users, if the email 410 address was reserved, or some other portal exception occurred 411 * @throws SystemException if a system exception occurred 412 */ 413 public static com.liferay.portal.model.UserSoap addUserWithWorkflow( 414 long companyId, boolean autoPassword, java.lang.String password1, 415 java.lang.String password2, boolean autoScreenName, 416 java.lang.String screenName, java.lang.String emailAddress, 417 long facebookId, java.lang.String openId, String locale, 418 java.lang.String firstName, java.lang.String middleName, 419 java.lang.String lastName, int prefixId, int suffixId, boolean male, 420 int birthdayMonth, int birthdayDay, int birthdayYear, 421 java.lang.String jobTitle, long[] groupIds, long[] organizationIds, 422 long[] roleIds, long[] userGroupIds, 423 com.liferay.portal.model.AddressSoap[] addresses, 424 com.liferay.portal.model.EmailAddressSoap[] emailAddresses, 425 com.liferay.portal.model.PhoneSoap[] phones, 426 com.liferay.portal.model.WebsiteSoap[] websites, 427 com.liferay.portlet.announcements.model.AnnouncementsDeliverySoap[] announcementsDelivers, 428 boolean sendEmail, 429 com.liferay.portal.service.ServiceContext serviceContext) 430 throws RemoteException { 431 try { 432 com.liferay.portal.model.User returnValue = UserServiceUtil.addUserWithWorkflow(companyId, 433 autoPassword, password1, password2, autoScreenName, 434 screenName, emailAddress, facebookId, openId, 435 LocaleUtil.fromLanguageId(locale), firstName, middleName, 436 lastName, prefixId, suffixId, male, birthdayMonth, 437 birthdayDay, birthdayYear, jobTitle, groupIds, 438 organizationIds, roleIds, userGroupIds, 439 com.liferay.portal.model.impl.AddressModelImpl.toModels( 440 addresses), 441 com.liferay.portal.model.impl.EmailAddressModelImpl.toModels( 442 emailAddresses), 443 com.liferay.portal.model.impl.PhoneModelImpl.toModels( 444 phones), 445 com.liferay.portal.model.impl.WebsiteModelImpl.toModels( 446 websites), 447 com.liferay.portlet.announcements.model.impl.AnnouncementsDeliveryModelImpl.toModels( 448 announcementsDelivers), sendEmail, serviceContext); 449 450 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue); 451 } 452 catch (Exception e) { 453 _log.error(e, e); 454 455 throw new RemoteException(e.getMessage()); 456 } 457 } 458 459 /** 460 * Adds a user with workflow. 461 * 462 * <p> 463 * This method handles the creation and bookkeeping of the user including 464 * its resources, metadata, and internal data structures. It is not 465 * necessary to make subsequent calls to any methods to setup default 466 * groups, resources, etc. 467 * </p> 468 * 469 * @param companyId the primary key of the user's company 470 * @param autoPassword whether a password should be automatically 471 generated for the user 472 * @param password1 the user's password 473 * @param password2 the user's password confirmation 474 * @param autoScreenName whether a screen name should be automatically 475 generated for the user 476 * @param screenName the user's screen name 477 * @param emailAddress the user's email address 478 * @param facebookId the user's facebook ID 479 * @param openId the user's OpenID 480 * @param locale the user's locale 481 * @param firstName the user's first name 482 * @param middleName the user's middle name 483 * @param lastName the user's last name 484 * @param prefixId the user's name prefix ID 485 * @param suffixId the user's name suffix ID 486 * @param male whether the user is male 487 * @param birthdayMonth the user's birthday month (0-based, meaning 0 for 488 January) 489 * @param birthdayDay the user's birthday day 490 * @param birthdayYear the user's birthday year 491 * @param jobTitle the user's job title 492 * @param groupIds the primary keys of the user's groups 493 * @param organizationIds the primary keys of the user's organizations 494 * @param roleIds the primary keys of the roles this user possesses 495 * @param userGroupIds the primary keys of the user's user groups 496 * @param sendEmail whether to send the user an email notification about 497 their new account 498 * @param serviceContext the user's service context (optionally 499 <code>null</code>). Can specify the user's universally unique 500 identifier (with the <code>uuid</code> attribute), asset 501 category IDs, asset tag names, and expando bridge attributes. 502 * @return the new user 503 * @throws PortalException if the user's information was invalid, if the 504 creator did not have permission to add users, or if the email 505 address was reserved 506 * @throws SystemException if a system exception occurred 507 */ 508 public static com.liferay.portal.model.UserSoap addUserWithWorkflow( 509 long companyId, boolean autoPassword, java.lang.String password1, 510 java.lang.String password2, boolean autoScreenName, 511 java.lang.String screenName, java.lang.String emailAddress, 512 long facebookId, java.lang.String openId, String locale, 513 java.lang.String firstName, java.lang.String middleName, 514 java.lang.String lastName, int prefixId, int suffixId, boolean male, 515 int birthdayMonth, int birthdayDay, int birthdayYear, 516 java.lang.String jobTitle, long[] groupIds, long[] organizationIds, 517 long[] roleIds, long[] userGroupIds, boolean sendEmail, 518 com.liferay.portal.service.ServiceContext serviceContext) 519 throws RemoteException { 520 try { 521 com.liferay.portal.model.User returnValue = UserServiceUtil.addUserWithWorkflow(companyId, 522 autoPassword, password1, password2, autoScreenName, 523 screenName, emailAddress, facebookId, openId, 524 LocaleUtil.fromLanguageId(locale), firstName, middleName, 525 lastName, prefixId, suffixId, male, birthdayMonth, 526 birthdayDay, birthdayYear, jobTitle, groupIds, 527 organizationIds, roleIds, userGroupIds, sendEmail, 528 serviceContext); 529 530 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue); 531 } 532 catch (Exception e) { 533 _log.error(e, e); 534 535 throw new RemoteException(e.getMessage()); 536 } 537 } 538 539 /** 540 * Adds the users to the user group. 541 * 542 * @param userGroupId the primary key of the user group 543 * @param userIds the primary keys of the users 544 * @throws PortalException if a user group or user with the primary could 545 could not be found, or if the current user did not have 546 permission to assign group members 547 * @throws SystemException if a system exception occurred 548 */ 549 public static void addUserGroupUsers(long userGroupId, long[] userIds) 550 throws RemoteException { 551 try { 552 UserServiceUtil.addUserGroupUsers(userGroupId, userIds); 553 } 554 catch (Exception e) { 555 _log.error(e, e); 556 557 throw new RemoteException(e.getMessage()); 558 } 559 } 560 561 /** 562 * Deletes the user's portrait image. 563 * 564 * @param userId the primary key of the user 565 * @throws PortalException if a user with the primary key could not be 566 found, if the user's portrait could not be found, or if the 567 current user did not have permission to update the user 568 * @throws SystemException if a system exception occurred 569 */ 570 public static void deletePortrait(long userId) throws RemoteException { 571 try { 572 UserServiceUtil.deletePortrait(userId); 573 } 574 catch (Exception e) { 575 _log.error(e, e); 576 577 throw new RemoteException(e.getMessage()); 578 } 579 } 580 581 /** 582 * Removes the user from the role. 583 * 584 * @param roleId the primary key of the role 585 * @param userId the primary key of the user 586 * @throws PortalException if a role or user with the primary key could not 587 be found, or if the current user did not have permission to 588 assign role members 589 * @throws SystemException if a system exception occurred 590 */ 591 public static void deleteRoleUser(long roleId, long userId) 592 throws RemoteException { 593 try { 594 UserServiceUtil.deleteRoleUser(roleId, userId); 595 } 596 catch (Exception e) { 597 _log.error(e, e); 598 599 throw new RemoteException(e.getMessage()); 600 } 601 } 602 603 /** 604 * Deletes the user. 605 * 606 * @param userId the primary key of the user 607 * @throws PortalException if a user with the primary key could not be 608 found or if the current user did not have permission to delete 609 the user 610 * @throws SystemException if a system exception occurred 611 */ 612 public static void deleteUser(long userId) throws RemoteException { 613 try { 614 UserServiceUtil.deleteUser(userId); 615 } 616 catch (Exception e) { 617 _log.error(e, e); 618 619 throw new RemoteException(e.getMessage()); 620 } 621 } 622 623 /** 624 * Returns the primary key of the default user for the company. 625 * 626 * @param companyId the primary key of the company 627 * @return the primary key of the default user for the company 628 * @throws PortalException if a default user for the company could not be 629 found 630 * @throws SystemException if a system exception occurred 631 */ 632 public static long getDefaultUserId(long companyId) 633 throws RemoteException { 634 try { 635 long returnValue = UserServiceUtil.getDefaultUserId(companyId); 636 637 return returnValue; 638 } 639 catch (Exception e) { 640 _log.error(e, e); 641 642 throw new RemoteException(e.getMessage()); 643 } 644 } 645 646 /** 647 * Returns the primary keys of all the users belonging to the group. 648 * 649 * @param groupId the primary key of the group 650 * @return the primary keys of the users belonging to the group 651 * @throws PortalException if the current user did not have permission to 652 view group assignments 653 * @throws SystemException if a system exception occurred 654 */ 655 public static long[] getGroupUserIds(long groupId) 656 throws RemoteException { 657 try { 658 long[] returnValue = UserServiceUtil.getGroupUserIds(groupId); 659 660 return returnValue; 661 } 662 catch (Exception e) { 663 _log.error(e, e); 664 665 throw new RemoteException(e.getMessage()); 666 } 667 } 668 669 /** 670 * Returns the primary keys of all the users belonging to the organization. 671 * 672 * @param organizationId the primary key of the organization 673 * @return the primary keys of the users belonging to the organization 674 * @throws PortalException if the current user did not have permission to 675 view organization assignments 676 * @throws SystemException if a system exception occurred 677 */ 678 public static long[] getOrganizationUserIds(long organizationId) 679 throws RemoteException { 680 try { 681 long[] returnValue = UserServiceUtil.getOrganizationUserIds(organizationId); 682 683 return returnValue; 684 } 685 catch (Exception e) { 686 _log.error(e, e); 687 688 throw new RemoteException(e.getMessage()); 689 } 690 } 691 692 /** 693 * Returns the primary keys of all the users belonging to the role. 694 * 695 * @param roleId the primary key of the role 696 * @return the primary keys of the users belonging to the role 697 * @throws PortalException if the current user did not have permission to 698 view role members 699 * @throws SystemException if a system exception occurred 700 */ 701 public static long[] getRoleUserIds(long roleId) throws RemoteException { 702 try { 703 long[] returnValue = UserServiceUtil.getRoleUserIds(roleId); 704 705 return returnValue; 706 } 707 catch (Exception e) { 708 _log.error(e, e); 709 710 throw new RemoteException(e.getMessage()); 711 } 712 } 713 714 /** 715 * Returns the user with the email address. 716 * 717 * @param companyId the primary key of the user's company 718 * @param emailAddress the user's email address 719 * @return the user with the email address 720 * @throws PortalException if a user with the email address could not be 721 found or if the current user did not have permission to view the 722 user 723 * @throws SystemException if a system exception occurred 724 */ 725 public static com.liferay.portal.model.UserSoap getUserByEmailAddress( 726 long companyId, java.lang.String emailAddress) 727 throws RemoteException { 728 try { 729 com.liferay.portal.model.User returnValue = UserServiceUtil.getUserByEmailAddress(companyId, 730 emailAddress); 731 732 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue); 733 } 734 catch (Exception e) { 735 _log.error(e, e); 736 737 throw new RemoteException(e.getMessage()); 738 } 739 } 740 741 /** 742 * Returns the user with the primary key. 743 * 744 * @param userId the primary key of the user 745 * @return the user with the primary key 746 * @throws PortalException if a user with the primary key could not be 747 found or if the current user did not have permission to view the 748 user 749 * @throws SystemException if a system exception occurred 750 */ 751 public static com.liferay.portal.model.UserSoap getUserById(long userId) 752 throws RemoteException { 753 try { 754 com.liferay.portal.model.User returnValue = UserServiceUtil.getUserById(userId); 755 756 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue); 757 } 758 catch (Exception e) { 759 _log.error(e, e); 760 761 throw new RemoteException(e.getMessage()); 762 } 763 } 764 765 /** 766 * Returns the user with the screen name. 767 * 768 * @param companyId the primary key of the user's company 769 * @param screenName the user's screen name 770 * @return the user with the screen name 771 * @throws PortalException if a user with the screen name could not be 772 found or if the current user did not have permission to veiw the 773 user 774 * @throws SystemException if a system exception occurred 775 */ 776 public static com.liferay.portal.model.UserSoap getUserByScreenName( 777 long companyId, java.lang.String screenName) throws RemoteException { 778 try { 779 com.liferay.portal.model.User returnValue = UserServiceUtil.getUserByScreenName(companyId, 780 screenName); 781 782 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue); 783 } 784 catch (Exception e) { 785 _log.error(e, e); 786 787 throw new RemoteException(e.getMessage()); 788 } 789 } 790 791 /** 792 * Returns the primary key of the user with the email address. 793 * 794 * @param companyId the primary key of the user's company 795 * @param emailAddress the user's email address 796 * @return the primary key of the user with the email address 797 * @throws PortalException if a user with the email address could not be 798 found 799 * @throws SystemException if a system exception occurred 800 */ 801 public static long getUserIdByEmailAddress(long companyId, 802 java.lang.String emailAddress) throws RemoteException { 803 try { 804 long returnValue = UserServiceUtil.getUserIdByEmailAddress(companyId, 805 emailAddress); 806 807 return returnValue; 808 } 809 catch (Exception e) { 810 _log.error(e, e); 811 812 throw new RemoteException(e.getMessage()); 813 } 814 } 815 816 /** 817 * Returns the primary key of the user with the screen name. 818 * 819 * @param companyId the primary key of the user's company 820 * @param screenName the user's screen name 821 * @return the primary key of the user with the screen name 822 * @throws PortalException if a user with the screen name could not be 823 found 824 * @throws SystemException if a system exception occurred 825 */ 826 public static long getUserIdByScreenName(long companyId, 827 java.lang.String screenName) throws RemoteException { 828 try { 829 long returnValue = UserServiceUtil.getUserIdByScreenName(companyId, 830 screenName); 831 832 return returnValue; 833 } 834 catch (Exception e) { 835 _log.error(e, e); 836 837 throw new RemoteException(e.getMessage()); 838 } 839 } 840 841 /** 842 * Returns <code>true</code> if the user is a member of the group. 843 * 844 * @param groupId the primary key of the group 845 * @param userId the primary key of the user 846 * @return <code>true</code> if the user is a member of the group; 847 <code>false</code> otherwise 848 * @throws SystemException if a system exception occurred 849 */ 850 public static boolean hasGroupUser(long groupId, long userId) 851 throws RemoteException { 852 try { 853 boolean returnValue = UserServiceUtil.hasGroupUser(groupId, userId); 854 855 return returnValue; 856 } 857 catch (Exception e) { 858 _log.error(e, e); 859 860 throw new RemoteException(e.getMessage()); 861 } 862 } 863 864 /** 865 * Returns <code>true</code> if the user is a member of the role. 866 * 867 * @param roleId the primary key of the role 868 * @param userId the primary key of the user 869 * @return <code>true</code> if the user is a member of the role; 870 <code>false</code> otherwise 871 * @throws SystemException if a system exception occurred 872 */ 873 public static boolean hasRoleUser(long roleId, long userId) 874 throws RemoteException { 875 try { 876 boolean returnValue = UserServiceUtil.hasRoleUser(roleId, userId); 877 878 return returnValue; 879 } 880 catch (Exception e) { 881 _log.error(e, e); 882 883 throw new RemoteException(e.getMessage()); 884 } 885 } 886 887 /** 888 * Returns <code>true</code> if the user has the role with the name, 889 * optionally through inheritance. 890 * 891 * @param companyId the primary key of the role's company 892 * @param name the name of the role (must be a regular role, not an 893 organization, site or provider role) 894 * @param userId the primary key of the user 895 * @param inherited whether to include roles inherited from organizations, 896 sites, etc. 897 * @return <code>true</code> if the user has the role; <code>false</code> 898 otherwise 899 * @throws PortalException if a role with the name could not be found 900 * @throws SystemException if a system exception occurred 901 */ 902 public static boolean hasRoleUser(long companyId, java.lang.String name, 903 long userId, boolean inherited) throws RemoteException { 904 try { 905 boolean returnValue = UserServiceUtil.hasRoleUser(companyId, name, 906 userId, inherited); 907 908 return returnValue; 909 } 910 catch (Exception e) { 911 _log.error(e, e); 912 913 throw new RemoteException(e.getMessage()); 914 } 915 } 916 917 /** 918 * Updates a user account that was automatically created when a guest user 919 * participated in an action (e.g. posting a comment) and only provided his 920 * name and email address. 921 * 922 * @param companyId the primary key of the user's company 923 * @param autoPassword whether a password should be automatically 924 generated for the user 925 * @param password1 the user's password 926 * @param password2 the user's password confirmation 927 * @param autoScreenName whether a screen name should be automatically 928 generated for the user 929 * @param screenName the user's screen name 930 * @param emailAddress the user's email address 931 * @param facebookId the user's facebook ID 932 * @param openId the user's OpenID 933 * @param locale the user's locale 934 * @param firstName the user's first name 935 * @param middleName the user's middle name 936 * @param lastName the user's last name 937 * @param prefixId the user's name prefix ID 938 * @param suffixId the user's name suffix ID 939 * @param male whether the user is male 940 * @param birthdayMonth the user's birthday month (0-based, meaning 0 for 941 January) 942 * @param birthdayDay the user's birthday day 943 * @param birthdayYear the user's birthday year 944 * @param jobTitle the user's job title 945 * @param updateUserInformation whether to update the user's information 946 * @param sendEmail whether to send the user an email notification about 947 their new account 948 * @param serviceContext the user's service context (optionally 949 <code>null</code>). Can specify the user's expando bridge 950 attributes. 951 * @return the user 952 * @throws PortalException if the user's information was invalid or if the 953 email address was reserved 954 * @throws SystemException if a system exception occurred 955 */ 956 public static com.liferay.portal.model.UserSoap updateIncompleteUser( 957 long companyId, boolean autoPassword, java.lang.String password1, 958 java.lang.String password2, boolean autoScreenName, 959 java.lang.String screenName, java.lang.String emailAddress, 960 long facebookId, java.lang.String openId, String locale, 961 java.lang.String firstName, java.lang.String middleName, 962 java.lang.String lastName, int prefixId, int suffixId, boolean male, 963 int birthdayMonth, int birthdayDay, int birthdayYear, 964 java.lang.String jobTitle, boolean updateUserInformation, 965 boolean sendEmail, 966 com.liferay.portal.service.ServiceContext serviceContext) 967 throws RemoteException { 968 try { 969 com.liferay.portal.model.User returnValue = UserServiceUtil.updateIncompleteUser(companyId, 970 autoPassword, password1, password2, autoScreenName, 971 screenName, emailAddress, facebookId, openId, 972 LocaleUtil.fromLanguageId(locale), firstName, middleName, 973 lastName, prefixId, suffixId, male, birthdayMonth, 974 birthdayDay, birthdayYear, jobTitle, updateUserInformation, 975 sendEmail, serviceContext); 976 977 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue); 978 } 979 catch (Exception e) { 980 _log.error(e, e); 981 982 throw new RemoteException(e.getMessage()); 983 } 984 } 985 986 /** 987 * Sets the users in the role, removing and adding users to the role as 988 * necessary. 989 * 990 * @param roleId the primary key of the role 991 * @param userIds the primary keys of the users 992 * @throws PortalException if the current user did not have permission to 993 assign role members 994 * @throws SystemException if a system exception occurred 995 */ 996 public static void setRoleUsers(long roleId, long[] userIds) 997 throws RemoteException { 998 try { 999 UserServiceUtil.setRoleUsers(roleId, userIds); 1000 } 1001 catch (Exception e) { 1002 _log.error(e, e); 1003 1004 throw new RemoteException(e.getMessage()); 1005 } 1006 } 1007 1008 /** 1009 * Sets the users in the user group, removing and adding users to the user 1010 * group as necessary. 1011 * 1012 * @param userGroupId the primary key of the user group 1013 * @param userIds the primary keys of the users 1014 * @throws PortalException if the current user did not have permission to 1015 assign group members 1016 * @throws SystemException if a system exception occurred 1017 */ 1018 public static void setUserGroupUsers(long userGroupId, long[] userIds) 1019 throws RemoteException { 1020 try { 1021 UserServiceUtil.setUserGroupUsers(userGroupId, userIds); 1022 } 1023 catch (Exception e) { 1024 _log.error(e, e); 1025 1026 throw new RemoteException(e.getMessage()); 1027 } 1028 } 1029 1030 /** 1031 * Removes the users from the group. 1032 * 1033 * @param groupId the primary key of the group 1034 * @param userIds the primary keys of the users 1035 * @throws PortalException if the current user did not have permission to 1036 modify group assignments 1037 * @throws SystemException if a system exception occurred 1038 */ 1039 public static void unsetGroupUsers(long groupId, long[] userIds) 1040 throws RemoteException { 1041 try { 1042 UserServiceUtil.unsetGroupUsers(groupId, userIds); 1043 } 1044 catch (Exception e) { 1045 _log.error(e, e); 1046 1047 throw new RemoteException(e.getMessage()); 1048 } 1049 } 1050 1051 /** 1052 * Removes the users from the organization. 1053 * 1054 * @param organizationId the primary key of the organization 1055 * @param userIds the primary keys of the users 1056 * @throws PortalException if the current user did not have permission to 1057 modify organization assignments 1058 * @throws SystemException if a system exception occurred 1059 */ 1060 public static void unsetOrganizationUsers(long organizationId, 1061 long[] userIds) throws RemoteException { 1062 try { 1063 UserServiceUtil.unsetOrganizationUsers(organizationId, userIds); 1064 } 1065 catch (Exception e) { 1066 _log.error(e, e); 1067 1068 throw new RemoteException(e.getMessage()); 1069 } 1070 } 1071 1072 /** 1073 * Removes the users from the password policy. 1074 * 1075 * @param passwordPolicyId the primary key of the password policy 1076 * @param userIds the primary keys of the users 1077 * @throws PortalException if the current user did not have permission to 1078 modify policy assignments 1079 * @throws SystemException if a system exception occurred 1080 */ 1081 public static void unsetPasswordPolicyUsers(long passwordPolicyId, 1082 long[] userIds) throws RemoteException { 1083 try { 1084 UserServiceUtil.unsetPasswordPolicyUsers(passwordPolicyId, userIds); 1085 } 1086 catch (Exception e) { 1087 _log.error(e, e); 1088 1089 throw new RemoteException(e.getMessage()); 1090 } 1091 } 1092 1093 /** 1094 * Removes the users from the role. 1095 * 1096 * @param roleId the primary key of the role 1097 * @param userIds the primary keys of the users 1098 * @throws PortalException if the current user did not have permission to 1099 modify role assignments 1100 * @throws SystemException if a system exception occurred 1101 */ 1102 public static void unsetRoleUsers(long roleId, long[] userIds) 1103 throws RemoteException { 1104 try { 1105 UserServiceUtil.unsetRoleUsers(roleId, userIds); 1106 } 1107 catch (Exception e) { 1108 _log.error(e, e); 1109 1110 throw new RemoteException(e.getMessage()); 1111 } 1112 } 1113 1114 /** 1115 * Removes the users from the team. 1116 * 1117 * @param teamId the primary key of the team 1118 * @param userIds the primary keys of the users 1119 * @throws PortalException if the current user did not have permission to 1120 modify team assignments 1121 * @throws SystemException if a system exception occurred 1122 */ 1123 public static void unsetTeamUsers(long teamId, long[] userIds) 1124 throws RemoteException { 1125 try { 1126 UserServiceUtil.unsetTeamUsers(teamId, userIds); 1127 } 1128 catch (Exception e) { 1129 _log.error(e, e); 1130 1131 throw new RemoteException(e.getMessage()); 1132 } 1133 } 1134 1135 /** 1136 * Removes the users from the user group. 1137 * 1138 * @param userGroupId the primary key of the user group 1139 * @param userIds the primary keys of the users 1140 * @throws PortalException if the current user did not have permission to 1141 modify user group assignments 1142 * @throws SystemException if a system exception occurred 1143 */ 1144 public static void unsetUserGroupUsers(long userGroupId, long[] userIds) 1145 throws RemoteException { 1146 try { 1147 UserServiceUtil.unsetUserGroupUsers(userGroupId, userIds); 1148 } 1149 catch (Exception e) { 1150 _log.error(e, e); 1151 1152 throw new RemoteException(e.getMessage()); 1153 } 1154 } 1155 1156 /** 1157 * Updates the user's response to the terms of use agreement. 1158 * 1159 * @param userId the primary key of the user 1160 * @param agreedToTermsOfUse whether the user has agree to the terms of 1161 use 1162 * @return the user 1163 * @throws PortalException if the current user did not have permission to 1164 update the user's agreement to terms-of-use 1165 * @throws SystemException if a system exception occurred 1166 */ 1167 public static com.liferay.portal.model.UserSoap updateAgreedToTermsOfUse( 1168 long userId, boolean agreedToTermsOfUse) throws RemoteException { 1169 try { 1170 com.liferay.portal.model.User returnValue = UserServiceUtil.updateAgreedToTermsOfUse(userId, 1171 agreedToTermsOfUse); 1172 1173 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue); 1174 } 1175 catch (Exception e) { 1176 _log.error(e, e); 1177 1178 throw new RemoteException(e.getMessage()); 1179 } 1180 } 1181 1182 /** 1183 * Updates the user's email address. 1184 * 1185 * @param userId the primary key of the user 1186 * @param password the user's password 1187 * @param emailAddress1 the user's new email address 1188 * @param emailAddress2 the user's new email address confirmation 1189 * @return the user 1190 * @throws PortalException if a user with the primary key could not be 1191 found or if the current user did not have permission to update 1192 the user 1193 * @throws SystemException if a system exception occurred 1194 */ 1195 public static com.liferay.portal.model.UserSoap updateEmailAddress( 1196 long userId, java.lang.String password, java.lang.String emailAddress1, 1197 java.lang.String emailAddress2) throws RemoteException { 1198 try { 1199 com.liferay.portal.model.User returnValue = UserServiceUtil.updateEmailAddress(userId, 1200 password, emailAddress1, emailAddress2); 1201 1202 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue); 1203 } 1204 catch (Exception e) { 1205 _log.error(e, e); 1206 1207 throw new RemoteException(e.getMessage()); 1208 } 1209 } 1210 1211 /** 1212 * Updates whether the user is locked out from logging in. 1213 * 1214 * @param userId the primary key of the user 1215 * @param lockout whether the user is locked out 1216 * @return the user 1217 * @throws PortalException if the user did not have permission to lock out 1218 the user 1219 * @throws SystemException if a system exception occurred 1220 */ 1221 public static com.liferay.portal.model.UserSoap updateLockoutById( 1222 long userId, boolean lockout) throws RemoteException { 1223 try { 1224 com.liferay.portal.model.User returnValue = UserServiceUtil.updateLockoutById(userId, 1225 lockout); 1226 1227 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue); 1228 } 1229 catch (Exception e) { 1230 _log.error(e, e); 1231 1232 throw new RemoteException(e.getMessage()); 1233 } 1234 } 1235 1236 /** 1237 * Updates the user's OpenID. 1238 * 1239 * @param userId the primary key of the user 1240 * @param openId the new OpenID 1241 * @return the user 1242 * @throws PortalException if a user with the primary key could not be 1243 found or if the current user did not have permission to update 1244 the user 1245 * @throws SystemException if a system exception occurred 1246 */ 1247 public static com.liferay.portal.model.UserSoap updateOpenId(long userId, 1248 java.lang.String openId) throws RemoteException { 1249 try { 1250 com.liferay.portal.model.User returnValue = UserServiceUtil.updateOpenId(userId, 1251 openId); 1252 1253 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue); 1254 } 1255 catch (Exception e) { 1256 _log.error(e, e); 1257 1258 throw new RemoteException(e.getMessage()); 1259 } 1260 } 1261 1262 /** 1263 * Sets the organizations that the user is in, removing and adding 1264 * organizations as necessary. 1265 * 1266 * @param userId the primary key of the user 1267 * @param organizationIds the primary keys of the organizations 1268 * @throws PortalException if a user with the primary key could not be 1269 found or if the current user did not have permission to update 1270 the user 1271 * @throws SystemException if a system exception occurred 1272 */ 1273 public static void updateOrganizations(long userId, long[] organizationIds, 1274 com.liferay.portal.service.ServiceContext serviceContext) 1275 throws RemoteException { 1276 try { 1277 UserServiceUtil.updateOrganizations(userId, organizationIds, 1278 serviceContext); 1279 } 1280 catch (Exception e) { 1281 _log.error(e, e); 1282 1283 throw new RemoteException(e.getMessage()); 1284 } 1285 } 1286 1287 /** 1288 * Updates the user's password without tracking or validation of the 1289 * change. 1290 * 1291 * @param userId the primary key of the user 1292 * @param password1 the user's new password 1293 * @param password2 the user's new password confirmation 1294 * @param passwordReset whether the user should be asked to reset their 1295 password the next time they log in 1296 * @return the user 1297 * @throws PortalException if a user with the primary key could not be 1298 found or if the current user did not have permission to update 1299 the user 1300 * @throws SystemException if a system exception occurred 1301 */ 1302 public static com.liferay.portal.model.UserSoap updatePassword( 1303 long userId, java.lang.String password1, java.lang.String password2, 1304 boolean passwordReset) throws RemoteException { 1305 try { 1306 com.liferay.portal.model.User returnValue = UserServiceUtil.updatePassword(userId, 1307 password1, password2, passwordReset); 1308 1309 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue); 1310 } 1311 catch (Exception e) { 1312 _log.error(e, e); 1313 1314 throw new RemoteException(e.getMessage()); 1315 } 1316 } 1317 1318 /** 1319 * Updates the user's portrait image. 1320 * 1321 * @param userId the primary key of the user 1322 * @param bytes the new portrait image data 1323 * @return the user 1324 * @throws PortalException if a user with the primary key could not be 1325 found, if the new portrait was invalid, or if the current user 1326 did not have permission to update the user 1327 * @throws SystemException if a system exception occurred 1328 */ 1329 public static com.liferay.portal.model.UserSoap updatePortrait( 1330 long userId, byte[] bytes) throws RemoteException { 1331 try { 1332 com.liferay.portal.model.User returnValue = UserServiceUtil.updatePortrait(userId, 1333 bytes); 1334 1335 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue); 1336 } 1337 catch (Exception e) { 1338 _log.error(e, e); 1339 1340 throw new RemoteException(e.getMessage()); 1341 } 1342 } 1343 1344 /** 1345 * Updates the user's password reset question and answer. 1346 * 1347 * @param userId the primary key of the user 1348 * @param question the user's new password reset question 1349 * @param answer the user's new password reset answer 1350 * @return the user 1351 * @throws PortalException if a user with the primary key could not be 1352 found, if the new question or answer were invalid, or if the 1353 current user did not have permission to update the user 1354 * @throws SystemException if a system exception occurred 1355 */ 1356 public static com.liferay.portal.model.UserSoap updateReminderQuery( 1357 long userId, java.lang.String question, java.lang.String answer) 1358 throws RemoteException { 1359 try { 1360 com.liferay.portal.model.User returnValue = UserServiceUtil.updateReminderQuery(userId, 1361 question, answer); 1362 1363 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue); 1364 } 1365 catch (Exception e) { 1366 _log.error(e, e); 1367 1368 throw new RemoteException(e.getMessage()); 1369 } 1370 } 1371 1372 /** 1373 * Updates the user's screen name. 1374 * 1375 * @param userId the primary key of the user 1376 * @param screenName the user's new screen name 1377 * @return the user 1378 * @throws PortalException if a user with the primary key could not be 1379 found, if the new screen name was invalid, or if the current 1380 user did not have permission to update the user 1381 * @throws SystemException if a system exception occurred 1382 */ 1383 public static com.liferay.portal.model.UserSoap updateScreenName( 1384 long userId, java.lang.String screenName) throws RemoteException { 1385 try { 1386 com.liferay.portal.model.User returnValue = UserServiceUtil.updateScreenName(userId, 1387 screenName); 1388 1389 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue); 1390 } 1391 catch (Exception e) { 1392 _log.error(e, e); 1393 1394 throw new RemoteException(e.getMessage()); 1395 } 1396 } 1397 1398 /** 1399 * Updates the user's workflow status. 1400 * 1401 * @param userId the primary key of the user 1402 * @param status the user's new workflow status 1403 * @return the user 1404 * @throws PortalException if a user with the primary key could not be 1405 found, if the current user was updating her own status to 1406 anything but {@link WorkflowConstants.STATUS_APPROVED}, or if 1407 the current user did not have permission to update the user's 1408 workflow status. 1409 * @throws SystemException if a system exception occurred 1410 */ 1411 public static com.liferay.portal.model.UserSoap updateStatus(long userId, 1412 int status) throws RemoteException { 1413 try { 1414 com.liferay.portal.model.User returnValue = UserServiceUtil.updateStatus(userId, 1415 status); 1416 1417 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue); 1418 } 1419 catch (Exception e) { 1420 _log.error(e, e); 1421 1422 throw new RemoteException(e.getMessage()); 1423 } 1424 } 1425 1426 /** 1427 * Updates the user with additional parameters. 1428 * 1429 * @param userId the primary key of the user 1430 * @param oldPassword the user's old password 1431 * @param newPassword1 the user's new password (optionally 1432 <code>null</code>) 1433 * @param newPassword2 the user's new password confirmation (optionally 1434 <code>null</code>) 1435 * @param passwordReset whether the user should be asked to reset their 1436 password the next time they login 1437 * @param reminderQueryQuestion the user's new password reset question 1438 * @param reminderQueryAnswer the user's new password reset answer 1439 * @param screenName the user's new screen name 1440 * @param emailAddress the user's new email address 1441 * @param facebookId the user's new Facebook ID 1442 * @param openId the user's new OpenID 1443 * @param languageId the user's new language ID 1444 * @param timeZoneId the user's new time zone ID 1445 * @param greeting the user's new greeting 1446 * @param comments the user's new comments 1447 * @param firstName the user's new first name 1448 * @param middleName the user's new middle name 1449 * @param lastName the user's new last name 1450 * @param prefixId the user's new name prefix ID 1451 * @param suffixId the user's new name suffix ID 1452 * @param male whether user is male 1453 * @param birthdayMonth the user's new birthday month (0-based, meaning 0 1454 for January) 1455 * @param birthdayDay the user's new birthday day 1456 * @param birthdayYear the user's birthday year 1457 * @param smsSn the user's new SMS screen name 1458 * @param aimSn the user's new AIM screen name 1459 * @param facebookSn the user's new Facebook screen name 1460 * @param icqSn the user's new ICQ screen name 1461 * @param jabberSn the user's new Jabber screen name 1462 * @param msnSn the user's new MSN screen name 1463 * @param mySpaceSn the user's new MySpace screen name 1464 * @param skypeSn the user's new Skype screen name 1465 * @param twitterSn the user's new Twitter screen name 1466 * @param ymSn the user's new Yahoo! Messenger screen name 1467 * @param jobTitle the user's new job title 1468 * @param groupIds the primary keys of the user's groups 1469 * @param organizationIds the primary keys of the user's organizations 1470 * @param roleIds the primary keys of the user's roles 1471 * @param userGroupRoles the user user's group roles 1472 * @param userGroupIds the primary keys of the user's user groups 1473 * @param addresses the user's addresses 1474 * @param emailAddresses the user's email addresses 1475 * @param phones the user's phone numbers 1476 * @param websites the user's websites 1477 * @param announcementsDelivers the announcements deliveries 1478 * @param serviceContext the user's service context (optionally 1479 <code>null</code>). Can specify the user's universally unique 1480 identifier (with the <code>uuid</code> attribute), replacement 1481 asset category IDs, replacement asset tag names, and new expando 1482 bridge attributes. 1483 * @return the user 1484 * @throws PortalException if a user with the primary key could not be 1485 found, if the new information was invalid, or if the current 1486 user did not have permission to update the user 1487 * @throws SystemException if a system exception occurred 1488 */ 1489 public static com.liferay.portal.model.UserSoap updateUser(long userId, 1490 java.lang.String oldPassword, java.lang.String newPassword1, 1491 java.lang.String newPassword2, boolean passwordReset, 1492 java.lang.String reminderQueryQuestion, 1493 java.lang.String reminderQueryAnswer, java.lang.String screenName, 1494 java.lang.String emailAddress, long facebookId, 1495 java.lang.String openId, java.lang.String languageId, 1496 java.lang.String timeZoneId, java.lang.String greeting, 1497 java.lang.String comments, java.lang.String firstName, 1498 java.lang.String middleName, java.lang.String lastName, int prefixId, 1499 int suffixId, boolean male, int birthdayMonth, int birthdayDay, 1500 int birthdayYear, java.lang.String smsSn, java.lang.String aimSn, 1501 java.lang.String facebookSn, java.lang.String icqSn, 1502 java.lang.String jabberSn, java.lang.String msnSn, 1503 java.lang.String mySpaceSn, java.lang.String skypeSn, 1504 java.lang.String twitterSn, java.lang.String ymSn, 1505 java.lang.String jobTitle, long[] groupIds, long[] organizationIds, 1506 long[] roleIds, 1507 com.liferay.portal.model.UserGroupRoleSoap[] userGroupRoles, 1508 long[] userGroupIds, com.liferay.portal.model.AddressSoap[] addresses, 1509 com.liferay.portal.model.EmailAddressSoap[] emailAddresses, 1510 com.liferay.portal.model.PhoneSoap[] phones, 1511 com.liferay.portal.model.WebsiteSoap[] websites, 1512 com.liferay.portlet.announcements.model.AnnouncementsDeliverySoap[] announcementsDelivers, 1513 com.liferay.portal.service.ServiceContext serviceContext) 1514 throws RemoteException { 1515 try { 1516 com.liferay.portal.model.User returnValue = UserServiceUtil.updateUser(userId, 1517 oldPassword, newPassword1, newPassword2, passwordReset, 1518 reminderQueryQuestion, reminderQueryAnswer, screenName, 1519 emailAddress, facebookId, openId, languageId, timeZoneId, 1520 greeting, comments, firstName, middleName, lastName, 1521 prefixId, suffixId, male, birthdayMonth, birthdayDay, 1522 birthdayYear, smsSn, aimSn, facebookSn, icqSn, jabberSn, 1523 msnSn, mySpaceSn, skypeSn, twitterSn, ymSn, jobTitle, 1524 groupIds, organizationIds, roleIds, 1525 com.liferay.portal.model.impl.UserGroupRoleModelImpl.toModels( 1526 userGroupRoles), userGroupIds, 1527 com.liferay.portal.model.impl.AddressModelImpl.toModels( 1528 addresses), 1529 com.liferay.portal.model.impl.EmailAddressModelImpl.toModels( 1530 emailAddresses), 1531 com.liferay.portal.model.impl.PhoneModelImpl.toModels( 1532 phones), 1533 com.liferay.portal.model.impl.WebsiteModelImpl.toModels( 1534 websites), 1535 com.liferay.portlet.announcements.model.impl.AnnouncementsDeliveryModelImpl.toModels( 1536 announcementsDelivers), serviceContext); 1537 1538 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue); 1539 } 1540 catch (Exception e) { 1541 _log.error(e, e); 1542 1543 throw new RemoteException(e.getMessage()); 1544 } 1545 } 1546 1547 /** 1548 * Updates the user. 1549 * 1550 * @param userId the primary key of the user 1551 * @param oldPassword the user's old password 1552 * @param newPassword1 the user's new password (optionally 1553 <code>null</code>) 1554 * @param newPassword2 the user's new password confirmation (optionally 1555 <code>null</code>) 1556 * @param passwordReset whether the user should be asked to reset their 1557 password the next time they login 1558 * @param reminderQueryQuestion the user's new password reset question 1559 * @param reminderQueryAnswer the user's new password reset answer 1560 * @param screenName the user's new screen name 1561 * @param emailAddress the user's new email address 1562 * @param facebookId the user's new Facebook ID 1563 * @param openId the user's new OpenID 1564 * @param languageId the user's new language ID 1565 * @param timeZoneId the user's new time zone ID 1566 * @param greeting the user's new greeting 1567 * @param comments the user's new comments 1568 * @param firstName the user's new first name 1569 * @param middleName the user's new middle name 1570 * @param lastName the user's new last name 1571 * @param prefixId the user's new name prefix ID 1572 * @param suffixId the user's new name suffix ID 1573 * @param male whether user is male 1574 * @param birthdayMonth the user's new birthday month (0-based, meaning 0 1575 for January) 1576 * @param birthdayDay the user's new birthday day 1577 * @param birthdayYear the user's birthday year 1578 * @param smsSn the user's new SMS screen name 1579 * @param aimSn the user's new AIM screen name 1580 * @param facebookSn the user's new Facebook screen name 1581 * @param icqSn the user's new ICQ screen name 1582 * @param jabberSn the user's new Jabber screen name 1583 * @param msnSn the user's new MSN screen name 1584 * @param mySpaceSn the user's new MySpace screen name 1585 * @param skypeSn the user's new Skype screen name 1586 * @param twitterSn the user's new Twitter screen name 1587 * @param ymSn the user's new Yahoo! Messenger screen name 1588 * @param jobTitle the user's new job title 1589 * @param groupIds the primary keys of the user's groups 1590 * @param organizationIds the primary keys of the user's organizations 1591 * @param roleIds the primary keys of the user's roles 1592 * @param userGroupRoles the user user's group roles 1593 * @param userGroupIds the primary keys of the user's user groups 1594 * @param serviceContext the user's service context (optionally 1595 <code>null</code>). Can specify the user's universally unique 1596 identifier (with the <code>uuid</code> attribute), replacement 1597 asset category IDs, replacement asset tag names, and new expando 1598 bridge attributes. 1599 * @return the user 1600 * @throws PortalException if a user with the primary key could not be 1601 found, if the new information was invalid, or if the current 1602 user did not have permission to update the user 1603 * @throws SystemException if a system exception occurred 1604 */ 1605 public static com.liferay.portal.model.UserSoap updateUser(long userId, 1606 java.lang.String oldPassword, java.lang.String newPassword1, 1607 java.lang.String newPassword2, boolean passwordReset, 1608 java.lang.String reminderQueryQuestion, 1609 java.lang.String reminderQueryAnswer, java.lang.String screenName, 1610 java.lang.String emailAddress, long facebookId, 1611 java.lang.String openId, java.lang.String languageId, 1612 java.lang.String timeZoneId, java.lang.String greeting, 1613 java.lang.String comments, java.lang.String firstName, 1614 java.lang.String middleName, java.lang.String lastName, int prefixId, 1615 int suffixId, boolean male, int birthdayMonth, int birthdayDay, 1616 int birthdayYear, java.lang.String smsSn, java.lang.String aimSn, 1617 java.lang.String facebookSn, java.lang.String icqSn, 1618 java.lang.String jabberSn, java.lang.String msnSn, 1619 java.lang.String mySpaceSn, java.lang.String skypeSn, 1620 java.lang.String twitterSn, java.lang.String ymSn, 1621 java.lang.String jobTitle, long[] groupIds, long[] organizationIds, 1622 long[] roleIds, 1623 com.liferay.portal.model.UserGroupRoleSoap[] userGroupRoles, 1624 long[] userGroupIds, 1625 com.liferay.portal.service.ServiceContext serviceContext) 1626 throws RemoteException { 1627 try { 1628 com.liferay.portal.model.User returnValue = UserServiceUtil.updateUser(userId, 1629 oldPassword, newPassword1, newPassword2, passwordReset, 1630 reminderQueryQuestion, reminderQueryAnswer, screenName, 1631 emailAddress, facebookId, openId, languageId, timeZoneId, 1632 greeting, comments, firstName, middleName, lastName, 1633 prefixId, suffixId, male, birthdayMonth, birthdayDay, 1634 birthdayYear, smsSn, aimSn, facebookSn, icqSn, jabberSn, 1635 msnSn, mySpaceSn, skypeSn, twitterSn, ymSn, jobTitle, 1636 groupIds, organizationIds, roleIds, 1637 com.liferay.portal.model.impl.UserGroupRoleModelImpl.toModels( 1638 userGroupRoles), userGroupIds, serviceContext); 1639 1640 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue); 1641 } 1642 catch (Exception e) { 1643 _log.error(e, e); 1644 1645 throw new RemoteException(e.getMessage()); 1646 } 1647 } 1648 1649 private static Log _log = LogFactoryUtil.getLog(UserServiceSoap.class); 1650 }