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.http; 016 017 import com.liferay.portal.kernel.log.Log; 018 import com.liferay.portal.kernel.log.LogFactoryUtil; 019 import com.liferay.portal.service.GroupServiceUtil; 020 021 import java.rmi.RemoteException; 022 023 /** 024 * <p> 025 * This class provides a SOAP utility for the 026 * {@link com.liferay.portal.service.GroupServiceUtil} service utility. The 027 * static methods of this class calls the same methods of the service utility. 028 * However, the signatures are different because it is difficult for SOAP to 029 * support certain types. 030 * </p> 031 * 032 * <p> 033 * ServiceBuilder follows certain rules in translating the methods. For example, 034 * if the method in the service utility returns a {@link java.util.List}, that 035 * is translated to an array of {@link com.liferay.portal.model.GroupSoap}. 036 * If the method in the service utility returns a 037 * {@link com.liferay.portal.model.Group}, that is translated to a 038 * {@link com.liferay.portal.model.GroupSoap}. Methods that SOAP cannot 039 * safely wire are skipped. 040 * </p> 041 * 042 * <p> 043 * The benefits of using the SOAP utility is that it is cross platform 044 * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and 045 * even Perl, to call the generated services. One drawback of SOAP is that it is 046 * slow because it needs to serialize all calls into a text format (XML). 047 * </p> 048 * 049 * <p> 050 * You can see a list of services at http://localhost:8080/api/axis. Set the 051 * property <b>axis.servlet.hosts.allowed</b> in portal.properties to configure 052 * security. 053 * </p> 054 * 055 * <p> 056 * The SOAP utility is only generated for remote services. 057 * </p> 058 * 059 * @author Brian Wing Shun Chan 060 * @see GroupServiceHttp 061 * @see com.liferay.portal.model.GroupSoap 062 * @see com.liferay.portal.service.GroupServiceUtil 063 * @generated 064 */ 065 public class GroupServiceSoap { 066 /** 067 * Adds a group. 068 * 069 * @param parentGroupId the primary key of the parent group 070 * @param liveGroupId the primary key of the live group 071 * @param name the entity's name 072 * @param description the group's description (optionally 073 <code>null</code>) 074 * @param type the group's type. For more information see {@link 075 com.liferay.portal.model.GroupConstants} 076 * @param friendlyURL the group's friendlyURL (optionally 077 <code>null</code>) 078 * @param site whether the group is to be associated with a main site 079 * @param active whether the group is active 080 * @param serviceContext the service context to be applied (optionally 081 <code>null</code>). Can set the asset category IDs and asset tag 082 names for the group, and can set whether the group is for staging 083 * @return the group 084 * @throws PortalException if the user did not have permission to add the 085 group, if a creator could not be found, if the group's 086 information was invalid, if a layout could not be found, or if a 087 valid friendly URL could not be created for the group 088 * @throws SystemException if a system exception occurred 089 */ 090 public static com.liferay.portal.model.GroupSoap addGroup( 091 long parentGroupId, long liveGroupId, java.lang.String name, 092 java.lang.String description, int type, java.lang.String friendlyURL, 093 boolean site, boolean active, 094 com.liferay.portal.service.ServiceContext serviceContext) 095 throws RemoteException { 096 try { 097 com.liferay.portal.model.Group returnValue = GroupServiceUtil.addGroup(parentGroupId, 098 liveGroupId, name, description, type, friendlyURL, site, 099 active, serviceContext); 100 101 return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue); 102 } 103 catch (Exception e) { 104 _log.error(e, e); 105 106 throw new RemoteException(e.getMessage()); 107 } 108 } 109 110 /** 111 * Adds the group using the group default live group ID. 112 * 113 * @param parentGroupId the primary key of the parent group 114 * @param name the entity's name 115 * @param description the group's description (optionally 116 <code>null</code>) 117 * @param type the group's type. For more information see {@link 118 com.liferay.portal.model.GroupConstants} 119 * @param friendlyURL the group's friendlyURL 120 * @param site whether the group is to be associated with a main site 121 * @param active whether the group is active 122 * @param serviceContext the service context to be applied (optionally 123 <code>null</code>). Can set asset category IDs and asset tag 124 names for the group, and can set whether the group is for 125 staging 126 * @return the group 127 * @throws PortalException if the user did not have permission to add 128 the group, if a creator could not be found, if the group's 129 information was invalid, if a layout could not be found, or 130 if a valid friendly URL could not be created for the group 131 * @throws SystemException if a system exception occurred 132 * @deprecated {@link #addGroup(long, long, String, String, int, String, 133 boolean, boolean, ServiceContext)} 134 */ 135 public static com.liferay.portal.model.GroupSoap addGroup( 136 long parentGroupId, java.lang.String name, 137 java.lang.String description, int type, java.lang.String friendlyURL, 138 boolean site, boolean active, 139 com.liferay.portal.service.ServiceContext serviceContext) 140 throws RemoteException { 141 try { 142 com.liferay.portal.model.Group returnValue = GroupServiceUtil.addGroup(parentGroupId, 143 name, description, type, friendlyURL, site, active, 144 serviceContext); 145 146 return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue); 147 } 148 catch (Exception e) { 149 _log.error(e, e); 150 151 throw new RemoteException(e.getMessage()); 152 } 153 } 154 155 /** 156 * @deprecated {@link #addGroup(long, String, String, int, String, boolean, 157 boolean, ServiceContext)} 158 */ 159 public static com.liferay.portal.model.GroupSoap addGroup( 160 java.lang.String name, java.lang.String description, int type, 161 java.lang.String friendlyURL, boolean site, boolean active, 162 com.liferay.portal.service.ServiceContext serviceContext) 163 throws RemoteException { 164 try { 165 com.liferay.portal.model.Group returnValue = GroupServiceUtil.addGroup(name, 166 description, type, friendlyURL, site, active, serviceContext); 167 168 return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue); 169 } 170 catch (Exception e) { 171 _log.error(e, e); 172 173 throw new RemoteException(e.getMessage()); 174 } 175 } 176 177 /** 178 * Adds the groups to the role. 179 * 180 * @param roleId the primary key of the role 181 * @param groupIds the primary keys of the groups 182 * @throws PortalException if the user did not have permission to update the 183 role 184 * @throws SystemException if a system exception occurred 185 */ 186 public static void addRoleGroups(long roleId, long[] groupIds) 187 throws RemoteException { 188 try { 189 GroupServiceUtil.addRoleGroups(roleId, groupIds); 190 } 191 catch (Exception e) { 192 _log.error(e, e); 193 194 throw new RemoteException(e.getMessage()); 195 } 196 } 197 198 /** 199 * Deletes the group. 200 * 201 * <p> 202 * The group is unstaged and its assets and resources including layouts, 203 * membership requests, subscriptions, teams, blogs, bookmarks, calendar 204 * events, image gallery, journals, message boards, polls, shopping related 205 * entities, software catalog, and wikis are also deleted. 206 * </p> 207 * 208 * @param groupId the primary key of the group 209 * @throws PortalException if the user did not have permission to delete the 210 group or its assets or resources, if a group with the primary key 211 could not be found, or if the group was a system group 212 * @throws SystemException if a system exception occurred 213 */ 214 public static void deleteGroup(long groupId) throws RemoteException { 215 try { 216 GroupServiceUtil.deleteGroup(groupId); 217 } 218 catch (Exception e) { 219 _log.error(e, e); 220 221 throw new RemoteException(e.getMessage()); 222 } 223 } 224 225 /** 226 * Returns the group with the primary key. 227 * 228 * @param groupId the primary key of the group 229 * @return the group with the primary key 230 * @throws PortalException if a group with the primary key could not be 231 found or if the current user did not have permission to view the 232 group 233 * @throws SystemException if a system exception occurred 234 */ 235 public static com.liferay.portal.model.GroupSoap getGroup(long groupId) 236 throws RemoteException { 237 try { 238 com.liferay.portal.model.Group returnValue = GroupServiceUtil.getGroup(groupId); 239 240 return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue); 241 } 242 catch (Exception e) { 243 _log.error(e, e); 244 245 throw new RemoteException(e.getMessage()); 246 } 247 } 248 249 /** 250 * Returns the group with the name. 251 * 252 * @param companyId the primary key of the company 253 * @param name the group's name 254 * @return the group with the name 255 * @throws PortalException if a matching group could not be found or if the 256 current user did not have permission to view the group 257 * @throws SystemException if a system exception occurred 258 */ 259 public static com.liferay.portal.model.GroupSoap getGroup(long companyId, 260 java.lang.String name) throws RemoteException { 261 try { 262 com.liferay.portal.model.Group returnValue = GroupServiceUtil.getGroup(companyId, 263 name); 264 265 return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue); 266 } 267 catch (Exception e) { 268 _log.error(e, e); 269 270 throw new RemoteException(e.getMessage()); 271 } 272 } 273 274 /** 275 * Returns a range of all the site groups for which the user has control 276 * panel access. 277 * 278 * @param portlets the portlets to manage 279 * @param max the upper bound of the range of groups to consider (not 280 inclusive) 281 * @return the range of site groups for which the user has Control Panel 282 access 283 * @throws PortalException if a portal exception occurred 284 * @throws SystemException if a system exception occurred 285 */ 286 public static com.liferay.portal.model.GroupSoap[] getManageableSites( 287 java.util.Collection<com.liferay.portal.model.Portlet> portlets, int max) 288 throws RemoteException { 289 try { 290 java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getManageableSites(portlets, 291 max); 292 293 return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue); 294 } 295 catch (Exception e) { 296 _log.error(e, e); 297 298 throw new RemoteException(e.getMessage()); 299 } 300 } 301 302 /** 303 * Returns the groups associated with the organizations. 304 * 305 * @param organizations the organizations 306 * @return the groups associated with the organizations 307 * @throws PortalException if a portal exception occurred 308 * @throws SystemException if a system exception occurred 309 */ 310 public static com.liferay.portal.model.GroupSoap[] getOrganizationsGroups( 311 com.liferay.portal.model.OrganizationSoap[] organizations) 312 throws RemoteException { 313 try { 314 java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getOrganizationsGroups(com.liferay.portal.model.impl.OrganizationModelImpl.toModels( 315 organizations)); 316 317 return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue); 318 } 319 catch (Exception e) { 320 _log.error(e, e); 321 322 throw new RemoteException(e.getMessage()); 323 } 324 } 325 326 /** 327 * Returns the group associated with the user. 328 * 329 * @param companyId the primary key of the company 330 * @param userId the primary key of the user 331 * @return the group associated with the user 332 * @throws PortalException if a matching group could not be found or if the 333 current user did not have permission to view the group 334 * @throws SystemException if a system exception occurred 335 */ 336 public static com.liferay.portal.model.GroupSoap getUserGroup( 337 long companyId, long userId) throws RemoteException { 338 try { 339 com.liferay.portal.model.Group returnValue = GroupServiceUtil.getUserGroup(companyId, 340 userId); 341 342 return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue); 343 } 344 catch (Exception e) { 345 _log.error(e, e); 346 347 throw new RemoteException(e.getMessage()); 348 } 349 } 350 351 /** 352 * Returns the groups associated with the user groups. 353 * 354 * @param userGroups the user groups 355 * @return the groups associated with the user groups 356 * @throws PortalException if any one of the user group's group could not be 357 found 358 * @throws SystemException if a system exception occurred 359 */ 360 public static com.liferay.portal.model.GroupSoap[] getUserGroupsGroups( 361 com.liferay.portal.model.UserGroupSoap[] userGroups) 362 throws RemoteException { 363 try { 364 java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserGroupsGroups(com.liferay.portal.model.impl.UserGroupModelImpl.toModels( 365 userGroups)); 366 367 return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue); 368 } 369 catch (Exception e) { 370 _log.error(e, e); 371 372 throw new RemoteException(e.getMessage()); 373 } 374 } 375 376 /** 377 * Returns the range of all groups associated with the user's organization 378 * groups, including the ancestors of the organization groups, unless portal 379 * property <code>organizations.membership.strict</code> is set to 380 * <code>true</code>. 381 * 382 * <p> 383 * Useful when paginating results. Returns a maximum of <code>end - 384 * start</code> instances. <code>start</code> and <code>end</code> are not 385 * primary keys, they are indexes in the result set. Thus, <code>0</code> 386 * refers to the first result in the set. Setting both <code>start</code> 387 * and <code>end</code> to {@link 388 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 389 * result set. 390 * </p> 391 * 392 * @param userId the primary key of the user 393 * @param start the lower bound of the range of groups to consider 394 * @param end the upper bound of the range of groups to consider (not 395 inclusive) 396 * @return the range of groups associated with the user's organizations 397 * @throws PortalException if a user with the primary key could not be found 398 or if another portal exception occurred 399 * @throws SystemException if a system exception occurred 400 */ 401 public static com.liferay.portal.model.GroupSoap[] getUserOrganizationsGroups( 402 long userId, int start, int end) throws RemoteException { 403 try { 404 java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserOrganizationsGroups(userId, 405 start, end); 406 407 return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue); 408 } 409 catch (Exception e) { 410 _log.error(e, e); 411 412 throw new RemoteException(e.getMessage()); 413 } 414 } 415 416 public static com.liferay.portal.model.GroupSoap[] getUserPlaces( 417 long userId, java.lang.String[] classNames, 418 boolean includeControlPanel, int max) throws RemoteException { 419 try { 420 java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserPlaces(userId, 421 classNames, includeControlPanel, max); 422 423 return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue); 424 } 425 catch (Exception e) { 426 _log.error(e, e); 427 428 throw new RemoteException(e.getMessage()); 429 } 430 } 431 432 /** 433 * Returns the user's group "places" associated with the group 434 * entity class names, including the Control Panel group if the user is 435 * permitted to view the Control Panel. 436 * 437 * <ul> 438 * <li> 439 * Class name "User" includes the user's layout set 440 * group. 441 * </li> 442 * <li> 443 * Class name "Organization" includes the user's 444 * immediate organization groups and inherited organization groups. 445 * </li> 446 * <li> 447 * Class name "Group" includes the user's immediate 448 * organization groups and site groups. 449 * </li> 450 * <li> 451 * A <code>classNames</code> 452 * value of <code>null</code> includes the user's layout set group, 453 * organization groups, inherited organization groups, and site groups. 454 * </li> 455 * </ul> 456 * 457 * @param userId the primary key of the user 458 * @param classNames the group entity class names (optionally 459 <code>null</code>). For more information see {@link 460 #getUserPlaces(long, String[], int)} 461 * @param max the maximum number of groups to return 462 * @return the user's group "places" 463 * @throws PortalException if a portal exception occurred 464 * @throws SystemException if a system exception occurred 465 */ 466 public static com.liferay.portal.model.GroupSoap[] getUserPlaces( 467 long userId, java.lang.String[] classNames, int max) 468 throws RemoteException { 469 try { 470 java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserPlaces(userId, 471 classNames, max); 472 473 return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue); 474 } 475 catch (Exception e) { 476 _log.error(e, e); 477 478 throw new RemoteException(e.getMessage()); 479 } 480 } 481 482 public static com.liferay.portal.model.GroupSoap[] getUserPlaces( 483 long userId, java.lang.String[] classNames, java.lang.String name, 484 boolean active, boolean includeControlPanel, int start, int end) 485 throws RemoteException { 486 try { 487 java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserPlaces(userId, 488 classNames, name, active, includeControlPanel, start, end); 489 490 return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue); 491 } 492 catch (Exception e) { 493 _log.error(e, e); 494 495 throw new RemoteException(e.getMessage()); 496 } 497 } 498 499 /** 500 * Returns the guest or current user's group "places" associated 501 * with the group entity class names, including the Control Panel group if 502 * the user is permitted to view the Control Panel. 503 * 504 * <ul> 505 * <li> 506 * Class name "User" includes the user's layout set 507 * group. 508 * </li> 509 * <li> 510 * Class name "Organization" includes the user's 511 * immediate organization groups and inherited organization groups. 512 * </li> 513 * <li> 514 * Class name "Group" includes the user's immediate 515 * organization groups and site groups. 516 * </li> 517 * <li> 518 * A <code>classNames</code> 519 * value of <code>null</code> includes the user's layout set group, 520 * organization groups, inherited organization groups, and site groups. 521 * </li> 522 * </ul> 523 * 524 * @param classNames the group entity class names (optionally 525 <code>null</code>). For more information see {@link 526 #getUserPlaces(String[], int)} 527 * @param max the maximum number of groups to return 528 * @return the user's group "places" 529 * @throws PortalException if a portal exception occurred 530 * @throws SystemException if a system exception occurred 531 */ 532 public static com.liferay.portal.model.GroupSoap[] getUserPlaces( 533 java.lang.String[] classNames, int max) throws RemoteException { 534 try { 535 java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserPlaces(classNames, 536 max); 537 538 return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue); 539 } 540 catch (Exception e) { 541 _log.error(e, e); 542 543 throw new RemoteException(e.getMessage()); 544 } 545 } 546 547 /** 548 * Returns the number of the guest or current user's group 549 * "places" associated with the group entity class names, 550 * including the Control Panel group if the user is permitted to view the 551 * Control Panel. 552 * 553 * @return the number of user's group "places" 554 * @throws PortalException if a portal exception occurred 555 * @throws SystemException if a system exception occurred 556 */ 557 public static int getUserPlacesCount() throws RemoteException { 558 try { 559 int returnValue = GroupServiceUtil.getUserPlacesCount(); 560 561 return returnValue; 562 } 563 catch (Exception e) { 564 _log.error(e, e); 565 566 throw new RemoteException(e.getMessage()); 567 } 568 } 569 570 /** 571 * Returns the guest or current user's layout set group, organization 572 * groups, inherited organization groups, and site groups. 573 * 574 * @return the user's layout set group, organization groups, and inherited 575 organization groups, and site groups 576 * @throws PortalException if a portal exception occurred 577 * @throws SystemException if a system exception occurred 578 */ 579 public static com.liferay.portal.model.GroupSoap[] getUserSites() 580 throws RemoteException { 581 try { 582 java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserSites(); 583 584 return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue); 585 } 586 catch (Exception e) { 587 _log.error(e, e); 588 589 throw new RemoteException(e.getMessage()); 590 } 591 } 592 593 /** 594 * Returns <code>true</code> if the user is associated with the group, 595 * including the user's inherited organizations and user groups. System and 596 * staged groups are not included. 597 * 598 * @param userId the primary key of the user 599 * @param groupId the primary key of the group 600 * @return <code>true</code> if the user is associated with the group; 601 <code>false</code> otherwise 602 * @throws PortalException if the current user did not have permission to 603 view the user or group members 604 * @throws SystemException if a system exception occurred 605 */ 606 public static boolean hasUserGroup(long userId, long groupId) 607 throws RemoteException { 608 try { 609 boolean returnValue = GroupServiceUtil.hasUserGroup(userId, groupId); 610 611 return returnValue; 612 } 613 catch (Exception e) { 614 _log.error(e, e); 615 616 throw new RemoteException(e.getMessage()); 617 } 618 } 619 620 /** 621 * Returns an ordered range of all the site groups and organization groups 622 * that match the name and description, optionally including the user's 623 * inherited organization groups and user groups. System and staged groups 624 * are not included. 625 * 626 * <p> 627 * Useful when paginating results. Returns a maximum of <code>end - 628 * start</code> instances. <code>start</code> and <code>end</code> are not 629 * primary keys, they are indexes in the result set. Thus, <code>0</code> 630 * refers to the first result in the set. Setting both <code>start</code> 631 * and <code>end</code> to {@link 632 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 633 * result set. 634 * </p> 635 * 636 * @param companyId the primary key of the company 637 * @param name the group's name (optionally <code>null</code>) 638 * @param description the group's description (optionally 639 <code>null</code>) 640 * @param params the finder params (optionally <code>null</code>). To 641 include the user's inherited organizations and user groups in the 642 search, add entries having "usersGroups" and 643 "inherit" as keys mapped to the the user's ID. For more 644 information see {@link 645 com.liferay.portal.service.persistence.GroupFinder} 646 * @param start the lower bound of the range of groups to return 647 * @param end the upper bound of the range of groups to return (not 648 inclusive) 649 * @return the matching groups ordered by name 650 * @throws PortalException if a portal exception occurred 651 * @throws SystemException if a system exception occurred 652 */ 653 public static com.liferay.portal.model.GroupSoap[] search(long companyId, 654 java.lang.String name, java.lang.String description, 655 java.lang.String[] params, int start, int end) 656 throws RemoteException { 657 try { 658 java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.search(companyId, 659 name, description, params, start, end); 660 661 return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue); 662 } 663 catch (Exception e) { 664 _log.error(e, e); 665 666 throw new RemoteException(e.getMessage()); 667 } 668 } 669 670 /** 671 * Returns the number of groups and organization groups that match the name 672 * and description, optionally including the user's inherited organizations 673 * and user groups. System and staged groups are not included. 674 * 675 * @param companyId the primary key of the company 676 * @param name the group's name (optionally <code>null</code>) 677 * @param description the group's description (optionally 678 <code>null</code>) 679 * @param params the finder params (optionally <code>null</code>). To 680 include the user's inherited organizations and user groups in the 681 search, add entries having "usersGroups" and 682 "inherit" as keys mapped to the the user's ID. For more 683 information see {@link 684 com.liferay.portal.service.persistence.GroupFinder} 685 * @return the number of matching groups 686 * @throws SystemException if a system exception occurred 687 */ 688 public static int searchCount(long companyId, java.lang.String name, 689 java.lang.String description, java.lang.String[] params) 690 throws RemoteException { 691 try { 692 int returnValue = GroupServiceUtil.searchCount(companyId, name, 693 description, params); 694 695 return returnValue; 696 } 697 catch (Exception e) { 698 _log.error(e, e); 699 700 throw new RemoteException(e.getMessage()); 701 } 702 } 703 704 /** 705 * Sets the groups associated with the role, removing and adding 706 * associations as necessary. 707 * 708 * @param roleId the primary key of the role 709 * @param groupIds the primary keys of the groups 710 * @throws PortalException if the user did not have permission to update 711 update the role 712 * @throws SystemException if a system exception occurred 713 */ 714 public static void setRoleGroups(long roleId, long[] groupIds) 715 throws RemoteException { 716 try { 717 GroupServiceUtil.setRoleGroups(roleId, groupIds); 718 } 719 catch (Exception e) { 720 _log.error(e, e); 721 722 throw new RemoteException(e.getMessage()); 723 } 724 } 725 726 /** 727 * Removes the groups from the role. 728 * 729 * @param roleId the primary key of the role 730 * @param groupIds the primary keys of the groups 731 * @throws PortalException if the user did not have permission to update the 732 role 733 * @throws SystemException if a system exception occurred 734 */ 735 public static void unsetRoleGroups(long roleId, long[] groupIds) 736 throws RemoteException { 737 try { 738 GroupServiceUtil.unsetRoleGroups(roleId, groupIds); 739 } 740 catch (Exception e) { 741 _log.error(e, e); 742 743 throw new RemoteException(e.getMessage()); 744 } 745 } 746 747 /** 748 * Updates the group's friendly URL. 749 * 750 * @param groupId the primary key of the group 751 * @param friendlyURL the group's new friendlyURL (optionally 752 <code>null</code>) 753 * @return the group 754 * @throws PortalException if the user did not have permission to update the 755 group, if a group with the primary key could not be found, or if 756 a valid friendly URL could not be created for the group 757 * @throws SystemException if a system exception occurred 758 */ 759 public static com.liferay.portal.model.GroupSoap updateFriendlyURL( 760 long groupId, java.lang.String friendlyURL) throws RemoteException { 761 try { 762 com.liferay.portal.model.Group returnValue = GroupServiceUtil.updateFriendlyURL(groupId, 763 friendlyURL); 764 765 return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue); 766 } 767 catch (Exception e) { 768 _log.error(e, e); 769 770 throw new RemoteException(e.getMessage()); 771 } 772 } 773 774 /** 775 * Updates the group. 776 * 777 * @param groupId the primary key of the group 778 * @param parentGroupId the primary key of the parent group 779 * @param name the group's new name 780 * @param description the group's new description (optionally 781 <code>null</code>) 782 * @param type the group's new type. For more information see {@link 783 com.liferay.portal.model.GroupConstants} 784 * @param friendlyURL the group's new friendlyURL (optionally 785 <code>null</code>) 786 * @param active whether the group is active 787 * @param serviceContext the service context to be applied (optionally 788 <code>null</code>). Can set the asset category IDs and asset tag 789 names for the group. 790 * @return the group 791 * @throws PortalException if the user did not have permission to update the 792 group, if a group with the primary key could not be found, if the 793 friendly URL was invalid or could one not be created 794 * @throws SystemException if a system exception occurred 795 */ 796 public static com.liferay.portal.model.GroupSoap updateGroup(long groupId, 797 long parentGroupId, java.lang.String name, 798 java.lang.String description, int type, java.lang.String friendlyURL, 799 boolean active, com.liferay.portal.service.ServiceContext serviceContext) 800 throws RemoteException { 801 try { 802 com.liferay.portal.model.Group returnValue = GroupServiceUtil.updateGroup(groupId, 803 parentGroupId, name, description, type, friendlyURL, 804 active, serviceContext); 805 806 return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue); 807 } 808 catch (Exception e) { 809 _log.error(e, e); 810 811 throw new RemoteException(e.getMessage()); 812 } 813 } 814 815 /** 816 * Updates the group's type settings. 817 * 818 * @param groupId the primary key of the group 819 * @param typeSettings the group's new type settings (optionally 820 <code>null</code>) 821 * @return the group 822 * @throws PortalException if the user did not have permission to update the 823 group or if a group with the primary key could not be found 824 * @throws SystemException if a system exception occurred 825 */ 826 public static com.liferay.portal.model.GroupSoap updateGroup(long groupId, 827 java.lang.String typeSettings) throws RemoteException { 828 try { 829 com.liferay.portal.model.Group returnValue = GroupServiceUtil.updateGroup(groupId, 830 typeSettings); 831 832 return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue); 833 } 834 catch (Exception e) { 835 _log.error(e, e); 836 837 throw new RemoteException(e.getMessage()); 838 } 839 } 840 841 private static Log _log = LogFactoryUtil.getLog(GroupServiceSoap.class); 842 }