001 /** 002 * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portal.service.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 As of 6.2.0, replaced by {@link #addGroup(long, long, String, 133 String, int, String, 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 As of 6.2.0, replaced by {@link #addGroup(long, String, 157 String, int, String, boolean, 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 * Checks that the current user is permitted to use the group for Remote 200 * Staging. 201 * 202 * @param groupId the primary key of the group 203 * @throws PortalException if a group with the primary key could not be 204 found, if the current user did not have permission to view the 205 group, or if the group's company was different from the current 206 user's company 207 * @throws SystemException if a system exception occurred 208 */ 209 public static void checkRemoteStagingGroup(long groupId) 210 throws RemoteException { 211 try { 212 GroupServiceUtil.checkRemoteStagingGroup(groupId); 213 } 214 catch (Exception e) { 215 _log.error(e, e); 216 217 throw new RemoteException(e.getMessage()); 218 } 219 } 220 221 /** 222 * Deletes the group. 223 * 224 * <p> 225 * The group is unstaged and its assets and resources including layouts, 226 * membership requests, subscriptions, teams, blogs, bookmarks, calendar 227 * events, image gallery, journals, message boards, polls, shopping related 228 * entities, software catalog, and wikis are also deleted. 229 * </p> 230 * 231 * @param groupId the primary key of the group 232 * @throws PortalException if the user did not have permission to delete the 233 group or its assets or resources, if a group with the primary key 234 could not be found, or if the group was a system group 235 * @throws SystemException if a system exception occurred 236 */ 237 public static void deleteGroup(long groupId) throws RemoteException { 238 try { 239 GroupServiceUtil.deleteGroup(groupId); 240 } 241 catch (Exception e) { 242 _log.error(e, e); 243 244 throw new RemoteException(e.getMessage()); 245 } 246 } 247 248 /** 249 * Returns the group with the primary key. 250 * 251 * @param groupId the primary key of the group 252 * @return the group with the primary key 253 * @throws PortalException if a group with the primary key could not be 254 found or if the current user did not have permission to view the 255 group 256 * @throws SystemException if a system exception occurred 257 */ 258 public static com.liferay.portal.model.GroupSoap getGroup(long groupId) 259 throws RemoteException { 260 try { 261 com.liferay.portal.model.Group returnValue = GroupServiceUtil.getGroup(groupId); 262 263 return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue); 264 } 265 catch (Exception e) { 266 _log.error(e, e); 267 268 throw new RemoteException(e.getMessage()); 269 } 270 } 271 272 /** 273 * Returns the group with the name. 274 * 275 * @param companyId the primary key of the company 276 * @param name the group's name 277 * @return the group with the name 278 * @throws PortalException if a matching group could not be found or if the 279 current user did not have permission to view the group 280 * @throws SystemException if a system exception occurred 281 */ 282 public static com.liferay.portal.model.GroupSoap getGroup(long companyId, 283 java.lang.String name) throws RemoteException { 284 try { 285 com.liferay.portal.model.Group returnValue = GroupServiceUtil.getGroup(companyId, 286 name); 287 288 return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue); 289 } 290 catch (Exception e) { 291 _log.error(e, e); 292 293 throw new RemoteException(e.getMessage()); 294 } 295 } 296 297 /** 298 * Returns a range of all the site groups for which the user has control 299 * panel access. 300 * 301 * @param portlets the portlets to manage 302 * @param max the upper bound of the range of groups to consider (not 303 inclusive) 304 * @return the range of site groups for which the user has Control Panel 305 access 306 * @throws PortalException if a portal exception occurred 307 * @throws SystemException if a system exception occurred 308 */ 309 public static com.liferay.portal.model.GroupSoap[] getManageableSites( 310 java.util.Collection<com.liferay.portal.model.Portlet> portlets, int max) 311 throws RemoteException { 312 try { 313 java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getManageableSites(portlets, 314 max); 315 316 return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue); 317 } 318 catch (Exception e) { 319 _log.error(e, e); 320 321 throw new RemoteException(e.getMessage()); 322 } 323 } 324 325 /** 326 * Returns the groups associated with the organizations. 327 * 328 * @param organizations the organizations 329 * @return the groups associated with the organizations 330 * @throws PortalException if a portal exception occurred 331 * @throws SystemException if a system exception occurred 332 */ 333 public static com.liferay.portal.model.GroupSoap[] getOrganizationsGroups( 334 com.liferay.portal.model.OrganizationSoap[] organizations) 335 throws RemoteException { 336 try { 337 java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getOrganizationsGroups(com.liferay.portal.model.impl.OrganizationModelImpl.toModels( 338 organizations)); 339 340 return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue); 341 } 342 catch (Exception e) { 343 _log.error(e, e); 344 345 throw new RemoteException(e.getMessage()); 346 } 347 } 348 349 /** 350 * Returns the group associated with the user. 351 * 352 * @param companyId the primary key of the company 353 * @param userId the primary key of the user 354 * @return the group associated with the user 355 * @throws PortalException if a matching group could not be found or if the 356 current user did not have permission to view the group 357 * @throws SystemException if a system exception occurred 358 */ 359 public static com.liferay.portal.model.GroupSoap getUserGroup( 360 long companyId, long userId) throws RemoteException { 361 try { 362 com.liferay.portal.model.Group returnValue = GroupServiceUtil.getUserGroup(companyId, 363 userId); 364 365 return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue); 366 } 367 catch (Exception e) { 368 _log.error(e, e); 369 370 throw new RemoteException(e.getMessage()); 371 } 372 } 373 374 /** 375 * Returns the groups associated with the user groups. 376 * 377 * @param userGroups the user groups 378 * @return the groups associated with the user groups 379 * @throws PortalException if any one of the user group's group could not be 380 found 381 * @throws SystemException if a system exception occurred 382 */ 383 public static com.liferay.portal.model.GroupSoap[] getUserGroupsGroups( 384 com.liferay.portal.model.UserGroupSoap[] userGroups) 385 throws RemoteException { 386 try { 387 java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserGroupsGroups(com.liferay.portal.model.impl.UserGroupModelImpl.toModels( 388 userGroups)); 389 390 return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue); 391 } 392 catch (Exception e) { 393 _log.error(e, e); 394 395 throw new RemoteException(e.getMessage()); 396 } 397 } 398 399 /** 400 * Returns the range of all groups associated with the user's organization 401 * groups, including the ancestors of the organization groups, unless portal 402 * property <code>organizations.membership.strict</code> is set to 403 * <code>true</code>. 404 * 405 * <p> 406 * Useful when paginating results. Returns a maximum of <code>end - 407 * start</code> instances. <code>start</code> and <code>end</code> are not 408 * primary keys, they are indexes in the result set. Thus, <code>0</code> 409 * refers to the first result in the set. Setting both <code>start</code> 410 * and <code>end</code> to {@link 411 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 412 * result set. 413 * </p> 414 * 415 * @param userId the primary key of the user 416 * @param start the lower bound of the range of groups to consider 417 * @param end the upper bound of the range of groups to consider (not 418 inclusive) 419 * @return the range of groups associated with the user's organizations 420 * @throws PortalException if a user with the primary key could not be found 421 or if another portal exception occurred 422 * @throws SystemException if a system exception occurred 423 */ 424 public static com.liferay.portal.model.GroupSoap[] getUserOrganizationsGroups( 425 long userId, int start, int end) throws RemoteException { 426 try { 427 java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserOrganizationsGroups(userId, 428 start, end); 429 430 return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue); 431 } 432 catch (Exception e) { 433 _log.error(e, e); 434 435 throw new RemoteException(e.getMessage()); 436 } 437 } 438 439 public static com.liferay.portal.model.GroupSoap[] getUserPlaces( 440 long userId, java.lang.String[] classNames, 441 boolean includeControlPanel, int max) throws RemoteException { 442 try { 443 java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserPlaces(userId, 444 classNames, includeControlPanel, max); 445 446 return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue); 447 } 448 catch (Exception e) { 449 _log.error(e, e); 450 451 throw new RemoteException(e.getMessage()); 452 } 453 } 454 455 /** 456 * Returns the user's group "places" associated with the group 457 * entity class names, including the Control Panel group if the user is 458 * permitted to view the Control Panel. 459 * 460 * <ul> 461 * <li> 462 * Class name "User" includes the user's layout set 463 * group. 464 * </li> 465 * <li> 466 * Class name "Organization" includes the user's 467 * immediate organization groups and inherited organization groups. 468 * </li> 469 * <li> 470 * Class name "Group" includes the user's immediate 471 * organization groups and site groups. 472 * </li> 473 * <li> 474 * A <code>classNames</code> 475 * value of <code>null</code> includes the user's layout set group, 476 * organization groups, inherited organization groups, and site groups. 477 * </li> 478 * </ul> 479 * 480 * @param userId the primary key of the user 481 * @param classNames the group entity class names (optionally 482 <code>null</code>). For more information see {@link 483 #getUserPlaces(long, String[], int)} 484 * @param max the maximum number of groups to return 485 * @return the user's group "places" 486 * @throws PortalException if a portal exception occurred 487 * @throws SystemException if a system exception occurred 488 */ 489 public static com.liferay.portal.model.GroupSoap[] getUserPlaces( 490 long userId, java.lang.String[] classNames, int max) 491 throws RemoteException { 492 try { 493 java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserPlaces(userId, 494 classNames, max); 495 496 return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue); 497 } 498 catch (Exception e) { 499 _log.error(e, e); 500 501 throw new RemoteException(e.getMessage()); 502 } 503 } 504 505 public static com.liferay.portal.model.GroupSoap[] getUserPlaces( 506 long userId, java.lang.String[] classNames, java.lang.String name, 507 boolean active, boolean includeControlPanel, int start, int end) 508 throws RemoteException { 509 try { 510 java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserPlaces(userId, 511 classNames, name, active, includeControlPanel, start, end); 512 513 return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue); 514 } 515 catch (Exception e) { 516 _log.error(e, e); 517 518 throw new RemoteException(e.getMessage()); 519 } 520 } 521 522 /** 523 * Returns the guest or current user's group "places" associated 524 * with the group entity class names, including the Control Panel group if 525 * the user is permitted to view the Control Panel. 526 * 527 * <ul> 528 * <li> 529 * Class name "User" includes the user's layout set 530 * group. 531 * </li> 532 * <li> 533 * Class name "Organization" includes the user's 534 * immediate organization groups and inherited organization groups. 535 * </li> 536 * <li> 537 * Class name "Group" includes the user's immediate 538 * organization groups and site groups. 539 * </li> 540 * <li> 541 * A <code>classNames</code> 542 * value of <code>null</code> includes the user's layout set group, 543 * organization groups, inherited organization groups, and site groups. 544 * </li> 545 * </ul> 546 * 547 * @param classNames the group entity class names (optionally 548 <code>null</code>). For more information see {@link 549 #getUserPlaces(String[], int)} 550 * @param max the maximum number of groups to return 551 * @return the user's group "places" 552 * @throws PortalException if a portal exception occurred 553 * @throws SystemException if a system exception occurred 554 */ 555 public static com.liferay.portal.model.GroupSoap[] getUserPlaces( 556 java.lang.String[] classNames, int max) throws RemoteException { 557 try { 558 java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserPlaces(classNames, 559 max); 560 561 return com.liferay.portal.model.GroupSoap.toSoapModels(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 number of the guest or current user's group 572 * "places" associated with the group entity class names, 573 * including the Control Panel group if the user is permitted to view the 574 * Control Panel. 575 * 576 * @return the number of user's group "places" 577 * @throws PortalException if a portal exception occurred 578 * @throws SystemException if a system exception occurred 579 */ 580 public static int getUserPlacesCount() throws RemoteException { 581 try { 582 int returnValue = GroupServiceUtil.getUserPlacesCount(); 583 584 return returnValue; 585 } 586 catch (Exception e) { 587 _log.error(e, e); 588 589 throw new RemoteException(e.getMessage()); 590 } 591 } 592 593 /** 594 * Returns the guest or current user's layout set group, organization 595 * groups, inherited organization groups, and site groups. 596 * 597 * @return the user's layout set group, organization groups, and inherited 598 organization groups, and site groups 599 * @throws PortalException if a portal exception occurred 600 * @throws SystemException if a system exception occurred 601 */ 602 public static com.liferay.portal.model.GroupSoap[] getUserSites() 603 throws RemoteException { 604 try { 605 java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserSites(); 606 607 return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue); 608 } 609 catch (Exception e) { 610 _log.error(e, e); 611 612 throw new RemoteException(e.getMessage()); 613 } 614 } 615 616 /** 617 * Returns <code>true</code> if the user is associated with the group, 618 * including the user's inherited organizations and user groups. System and 619 * staged groups are not included. 620 * 621 * @param userId the primary key of the user 622 * @param groupId the primary key of the group 623 * @return <code>true</code> if the user is associated with the group; 624 <code>false</code> otherwise 625 * @throws PortalException if the current user did not have permission to 626 view the user or group members 627 * @throws SystemException if a system exception occurred 628 */ 629 public static boolean hasUserGroup(long userId, long groupId) 630 throws RemoteException { 631 try { 632 boolean returnValue = GroupServiceUtil.hasUserGroup(userId, groupId); 633 634 return returnValue; 635 } 636 catch (Exception e) { 637 _log.error(e, e); 638 639 throw new RemoteException(e.getMessage()); 640 } 641 } 642 643 /** 644 * Returns an ordered range of all the site groups and organization groups 645 * that match the name and description, optionally including the user's 646 * inherited organization groups and user groups. System and staged groups 647 * are not included. 648 * 649 * <p> 650 * Useful when paginating results. Returns a maximum of <code>end - 651 * start</code> instances. <code>start</code> and <code>end</code> are not 652 * primary keys, they are indexes in the result set. Thus, <code>0</code> 653 * refers to the first result in the set. Setting both <code>start</code> 654 * and <code>end</code> to {@link 655 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 656 * result set. 657 * </p> 658 * 659 * @param companyId the primary key of the company 660 * @param name the group's name (optionally <code>null</code>) 661 * @param description the group's description (optionally 662 <code>null</code>) 663 * @param params the finder params (optionally <code>null</code>). To 664 include the user's inherited organizations and user groups in the 665 search, add entries having "usersGroups" and 666 "inherit" as keys mapped to the the user's ID. For more 667 information see {@link 668 com.liferay.portal.service.persistence.GroupFinder} 669 * @param start the lower bound of the range of groups to return 670 * @param end the upper bound of the range of groups to return (not 671 inclusive) 672 * @return the matching groups ordered by name 673 * @throws PortalException if a portal exception occurred 674 * @throws SystemException if a system exception occurred 675 */ 676 public static com.liferay.portal.model.GroupSoap[] search(long companyId, 677 java.lang.String name, java.lang.String description, 678 java.lang.String[] params, int start, int end) 679 throws RemoteException { 680 try { 681 java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.search(companyId, 682 name, description, params, start, end); 683 684 return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue); 685 } 686 catch (Exception e) { 687 _log.error(e, e); 688 689 throw new RemoteException(e.getMessage()); 690 } 691 } 692 693 /** 694 * Returns the number of groups and organization groups that match the name 695 * and description, optionally including the user's inherited organizations 696 * and user groups. System and staged groups are not included. 697 * 698 * @param companyId the primary key of the company 699 * @param name the group's name (optionally <code>null</code>) 700 * @param description the group's description (optionally 701 <code>null</code>) 702 * @param params the finder params (optionally <code>null</code>). To 703 include the user's inherited organizations and user groups in the 704 search, add entries having "usersGroups" and 705 "inherit" as keys mapped to the the user's ID. For more 706 information see {@link 707 com.liferay.portal.service.persistence.GroupFinder} 708 * @return the number of matching groups 709 * @throws SystemException if a system exception occurred 710 */ 711 public static int searchCount(long companyId, java.lang.String name, 712 java.lang.String description, java.lang.String[] params) 713 throws RemoteException { 714 try { 715 int returnValue = GroupServiceUtil.searchCount(companyId, name, 716 description, params); 717 718 return returnValue; 719 } 720 catch (Exception e) { 721 _log.error(e, e); 722 723 throw new RemoteException(e.getMessage()); 724 } 725 } 726 727 /** 728 * Sets the groups associated with the role, removing and adding 729 * associations as necessary. 730 * 731 * @param roleId the primary key of the role 732 * @param groupIds the primary keys of the groups 733 * @throws PortalException if the user did not have permission to update 734 update the role 735 * @throws SystemException if a system exception occurred 736 */ 737 public static void setRoleGroups(long roleId, long[] groupIds) 738 throws RemoteException { 739 try { 740 GroupServiceUtil.setRoleGroups(roleId, groupIds); 741 } 742 catch (Exception e) { 743 _log.error(e, e); 744 745 throw new RemoteException(e.getMessage()); 746 } 747 } 748 749 /** 750 * Removes the groups from the role. 751 * 752 * @param roleId the primary key of the role 753 * @param groupIds the primary keys of the groups 754 * @throws PortalException if the user did not have permission to update the 755 role 756 * @throws SystemException if a system exception occurred 757 */ 758 public static void unsetRoleGroups(long roleId, long[] groupIds) 759 throws RemoteException { 760 try { 761 GroupServiceUtil.unsetRoleGroups(roleId, groupIds); 762 } 763 catch (Exception e) { 764 _log.error(e, e); 765 766 throw new RemoteException(e.getMessage()); 767 } 768 } 769 770 /** 771 * Updates the group's friendly URL. 772 * 773 * @param groupId the primary key of the group 774 * @param friendlyURL the group's new friendlyURL (optionally 775 <code>null</code>) 776 * @return the group 777 * @throws PortalException if the user did not have permission to update the 778 group, if a group with the primary key could not be found, or if 779 a valid friendly URL could not be created for the group 780 * @throws SystemException if a system exception occurred 781 */ 782 public static com.liferay.portal.model.GroupSoap updateFriendlyURL( 783 long groupId, java.lang.String friendlyURL) throws RemoteException { 784 try { 785 com.liferay.portal.model.Group returnValue = GroupServiceUtil.updateFriendlyURL(groupId, 786 friendlyURL); 787 788 return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue); 789 } 790 catch (Exception e) { 791 _log.error(e, e); 792 793 throw new RemoteException(e.getMessage()); 794 } 795 } 796 797 /** 798 * Updates the group. 799 * 800 * @param groupId the primary key of the group 801 * @param parentGroupId the primary key of the parent group 802 * @param name the group's new name 803 * @param description the group's new description (optionally 804 <code>null</code>) 805 * @param type the group's new type. For more information see {@link 806 com.liferay.portal.model.GroupConstants} 807 * @param friendlyURL the group's new friendlyURL (optionally 808 <code>null</code>) 809 * @param active whether the group is active 810 * @param serviceContext the service context to be applied (optionally 811 <code>null</code>). Can set the asset category IDs and asset tag 812 names for the group. 813 * @return the group 814 * @throws PortalException if the user did not have permission to update the 815 group, if a group with the primary key could not be found, if the 816 friendly URL was invalid or could one not be created 817 * @throws SystemException if a system exception occurred 818 */ 819 public static com.liferay.portal.model.GroupSoap updateGroup(long groupId, 820 long parentGroupId, java.lang.String name, 821 java.lang.String description, int type, java.lang.String friendlyURL, 822 boolean active, com.liferay.portal.service.ServiceContext serviceContext) 823 throws RemoteException { 824 try { 825 com.liferay.portal.model.Group returnValue = GroupServiceUtil.updateGroup(groupId, 826 parentGroupId, name, description, type, friendlyURL, 827 active, serviceContext); 828 829 return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue); 830 } 831 catch (Exception e) { 832 _log.error(e, e); 833 834 throw new RemoteException(e.getMessage()); 835 } 836 } 837 838 /** 839 * Updates the group's type settings. 840 * 841 * @param groupId the primary key of the group 842 * @param typeSettings the group's new type settings (optionally 843 <code>null</code>) 844 * @return the group 845 * @throws PortalException if the user did not have permission to update the 846 group or if a group with the primary key could not be found 847 * @throws SystemException if a system exception occurred 848 */ 849 public static com.liferay.portal.model.GroupSoap updateGroup(long groupId, 850 java.lang.String typeSettings) throws RemoteException { 851 try { 852 com.liferay.portal.model.Group returnValue = GroupServiceUtil.updateGroup(groupId, 853 typeSettings); 854 855 return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue); 856 } 857 catch (Exception e) { 858 _log.error(e, e); 859 860 throw new RemoteException(e.getMessage()); 861 } 862 } 863 864 private static Log _log = LogFactoryUtil.getLog(GroupServiceSoap.class); 865 }