001 /** 002 * Copyright (c) 2000-2013 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 aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.kernel.log.Log; 020 import com.liferay.portal.kernel.log.LogFactoryUtil; 021 import com.liferay.portal.kernel.util.LocalizationUtil; 022 import com.liferay.portal.service.LayoutServiceUtil; 023 024 import java.rmi.RemoteException; 025 026 import java.util.Locale; 027 import java.util.Map; 028 029 /** 030 * Provides the SOAP utility for the 031 * {@link com.liferay.portal.service.LayoutServiceUtil} service utility. The 032 * static methods of this class calls the same methods of the service utility. 033 * However, the signatures are different because it is difficult for SOAP to 034 * support certain types. 035 * 036 * <p> 037 * ServiceBuilder follows certain rules in translating the methods. For example, 038 * if the method in the service utility returns a {@link java.util.List}, that 039 * is translated to an array of {@link com.liferay.portal.model.LayoutSoap}. 040 * If the method in the service utility returns a 041 * {@link com.liferay.portal.model.Layout}, that is translated to a 042 * {@link com.liferay.portal.model.LayoutSoap}. Methods that SOAP cannot 043 * safely wire are skipped. 044 * </p> 045 * 046 * <p> 047 * The benefits of using the SOAP utility is that it is cross platform 048 * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and 049 * even Perl, to call the generated services. One drawback of SOAP is that it is 050 * slow because it needs to serialize all calls into a text format (XML). 051 * </p> 052 * 053 * <p> 054 * You can see a list of services at http://localhost:8080/api/axis. Set the 055 * property <b>axis.servlet.hosts.allowed</b> in portal.properties to configure 056 * security. 057 * </p> 058 * 059 * <p> 060 * The SOAP utility is only generated for remote services. 061 * </p> 062 * 063 * @author Brian Wing Shun Chan 064 * @see LayoutServiceHttp 065 * @see com.liferay.portal.model.LayoutSoap 066 * @see com.liferay.portal.service.LayoutServiceUtil 067 * @generated 068 */ 069 @ProviderType 070 public class LayoutServiceSoap { 071 /** 072 * Adds a layout with additional parameters. 073 * 074 * <p> 075 * This method handles the creation of the layout including its resources, 076 * metadata, and internal data structures. It is not necessary to make 077 * subsequent calls to any methods to setup default groups, resources, ... 078 * etc. 079 * </p> 080 * 081 * @param groupId the primary key of the group 082 * @param privateLayout whether the layout is private to the group 083 * @param parentLayoutId the primary key of the parent layout 084 (optionally {@link 085 com.liferay.portal.model.LayoutConstants#DEFAULT_PARENT_LAYOUT_ID}) 086 * @param localeNamesMap the layout's locales and localized names 087 * @param localeTitlesMap the layout's locales and localized titles 088 * @param descriptionMap the layout's locales and localized 089 descriptions 090 * @param keywordsMap the layout's locales and localized keywords 091 * @param robotsMap the layout's locales and localized robots 092 * @param type the layout's type (optionally {@link 093 com.liferay.portal.model.LayoutConstants#TYPE_PORTLET}). The 094 possible types can be found in {@link 095 com.liferay.portal.model.LayoutConstants}. 096 * @param hidden whether the layout is hidden 097 * @param friendlyURL the layout's locales and localized friendly URLs. 098 To see how the URL is normalized when accessed, see {@link 099 com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize( 100 String)}. 101 * @param serviceContext the service context to be applied. Must set 102 the UUID for the layout. Can set the creation date, 103 modification date, and expando bridge attributes for the 104 layout. For layouts that belong to a layout set prototype, an 105 attribute named <code>layoutUpdateable</code> can be used to 106 specify whether site administrators can modify this page 107 within their site. 108 * @return the layout 109 * @throws PortalException if a group with the primary key could not be 110 found, if the group did not have permission to manage the 111 layouts involved, if layout values were invalid, or if a 112 portal exception occurred 113 * @throws SystemException if a system exception occurred 114 * @deprecated As of 6.2.0, replaced by {@link #addLayout(long, boolean, 115 long, Map, Map, Map, Map, Map, String, String, boolean, Map, 116 ServiceContext)} 117 */ 118 public static com.liferay.portal.model.LayoutSoap addLayout(long groupId, 119 boolean privateLayout, long parentLayoutId, 120 java.lang.String[] localeNamesMapLanguageIds, 121 java.lang.String[] localeNamesMapValues, 122 java.lang.String[] localeTitlesMapLanguageIds, 123 java.lang.String[] localeTitlesMapValues, 124 java.lang.String[] descriptionMapLanguageIds, 125 java.lang.String[] descriptionMapValues, 126 java.lang.String[] keywordsMapLanguageIds, 127 java.lang.String[] keywordsMapValues, 128 java.lang.String[] robotsMapLanguageIds, 129 java.lang.String[] robotsMapValues, java.lang.String type, 130 boolean hidden, java.lang.String friendlyURL, 131 com.liferay.portal.service.ServiceContext serviceContext) 132 throws RemoteException { 133 try { 134 Map<Locale, String> localeNamesMap = LocalizationUtil.getLocalizationMap(localeNamesMapLanguageIds, 135 localeNamesMapValues); 136 Map<Locale, String> localeTitlesMap = LocalizationUtil.getLocalizationMap(localeTitlesMapLanguageIds, 137 localeTitlesMapValues); 138 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds, 139 descriptionMapValues); 140 Map<Locale, String> keywordsMap = LocalizationUtil.getLocalizationMap(keywordsMapLanguageIds, 141 keywordsMapValues); 142 Map<Locale, String> robotsMap = LocalizationUtil.getLocalizationMap(robotsMapLanguageIds, 143 robotsMapValues); 144 145 com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.addLayout(groupId, 146 privateLayout, parentLayoutId, localeNamesMap, 147 localeTitlesMap, descriptionMap, keywordsMap, robotsMap, 148 type, hidden, friendlyURL, serviceContext); 149 150 return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue); 151 } 152 catch (Exception e) { 153 _log.error(e, e); 154 155 throw new RemoteException(e.getMessage()); 156 } 157 } 158 159 /** 160 * Adds a layout with additional parameters. 161 * 162 * <p> 163 * This method handles the creation of the layout including its resources, 164 * metadata, and internal data structures. It is not necessary to make 165 * subsequent calls to any methods to setup default groups, resources, ... 166 * etc. 167 * </p> 168 * 169 * @param groupId the primary key of the group 170 * @param privateLayout whether the layout is private to the group 171 * @param parentLayoutId the primary key of the parent layout (optionally 172 {@link 173 com.liferay.portal.model.LayoutConstants#DEFAULT_PARENT_LAYOUT_ID}) 174 * @param localeNamesMap the layout's locales and localized names 175 * @param localeTitlesMap the layout's locales and localized titles 176 * @param descriptionMap the layout's locales and localized descriptions 177 * @param keywordsMap the layout's locales and localized keywords 178 * @param robotsMap the layout's locales and localized robots 179 * @param type the layout's type (optionally {@link 180 com.liferay.portal.model.LayoutConstants#TYPE_PORTLET}). The 181 possible types can be found in {@link 182 com.liferay.portal.model.LayoutConstants}. 183 * @param typeSettings the settings to load the unicode properties object. 184 See {@link com.liferay.portal.kernel.util.UnicodeProperties 185 #fastLoad(String)}. 186 * @param hidden whether the layout is hidden 187 * @param friendlyURLMap the layout's locales and localized friendly URLs. 188 To see how the URL is normalized when accessed, see {@link 189 com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize( 190 String)}. 191 * @param serviceContext the service context to be applied. Must set the 192 UUID for the layout. Can set the creation date, modification 193 date, and expando bridge attributes for the layout. For layouts 194 that belong to a layout set prototype, an attribute named 195 <code>layoutUpdateable</code> can be used to specify whether site 196 administrators can modify this page within their site. 197 * @return the layout 198 * @throws PortalException if a group with the primary key could not be 199 found, if the group did not have permission to manage the layouts 200 involved, if layout values were invalid, or if a portal exception 201 occurred 202 * @throws SystemException if a system exception occurred 203 */ 204 public static com.liferay.portal.model.LayoutSoap addLayout(long groupId, 205 boolean privateLayout, long parentLayoutId, 206 java.lang.String[] localeNamesMapLanguageIds, 207 java.lang.String[] localeNamesMapValues, 208 java.lang.String[] localeTitlesMapLanguageIds, 209 java.lang.String[] localeTitlesMapValues, 210 java.lang.String[] descriptionMapLanguageIds, 211 java.lang.String[] descriptionMapValues, 212 java.lang.String[] keywordsMapLanguageIds, 213 java.lang.String[] keywordsMapValues, 214 java.lang.String[] robotsMapLanguageIds, 215 java.lang.String[] robotsMapValues, java.lang.String type, 216 java.lang.String typeSettings, boolean hidden, 217 java.lang.String[] friendlyURLMapLanguageIds, 218 java.lang.String[] friendlyURLMapValues, 219 com.liferay.portal.service.ServiceContext serviceContext) 220 throws RemoteException { 221 try { 222 Map<Locale, String> localeNamesMap = LocalizationUtil.getLocalizationMap(localeNamesMapLanguageIds, 223 localeNamesMapValues); 224 Map<Locale, String> localeTitlesMap = LocalizationUtil.getLocalizationMap(localeTitlesMapLanguageIds, 225 localeTitlesMapValues); 226 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds, 227 descriptionMapValues); 228 Map<Locale, String> keywordsMap = LocalizationUtil.getLocalizationMap(keywordsMapLanguageIds, 229 keywordsMapValues); 230 Map<Locale, String> robotsMap = LocalizationUtil.getLocalizationMap(robotsMapLanguageIds, 231 robotsMapValues); 232 Map<Locale, String> friendlyURLMap = LocalizationUtil.getLocalizationMap(friendlyURLMapLanguageIds, 233 friendlyURLMapValues); 234 235 com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.addLayout(groupId, 236 privateLayout, parentLayoutId, localeNamesMap, 237 localeTitlesMap, descriptionMap, keywordsMap, robotsMap, 238 type, typeSettings, hidden, friendlyURLMap, serviceContext); 239 240 return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue); 241 } 242 catch (Exception e) { 243 _log.error(e, e); 244 245 throw new RemoteException(e.getMessage()); 246 } 247 } 248 249 /** 250 * Adds a layout with single entry maps for name, title, and description to 251 * the default locale. 252 * 253 * <p> 254 * This method handles the creation of the layout including its resources, 255 * metadata, and internal data structures. It is not necessary to make 256 * subsequent calls to any methods to setup default groups, resources, ... 257 * etc. 258 * </p> 259 * 260 * @param groupId the primary key of the group 261 * @param privateLayout whether the layout is private to the group 262 * @param parentLayoutId the primary key of the parent layout (optionally 263 {@link 264 com.liferay.portal.model.LayoutConstants#DEFAULT_PARENT_LAYOUT_ID}) 265 * @param name Map the layout's locales and localized names 266 * @param title Map the layout's locales and localized titles 267 * @param description Map the layout's locales and localized descriptions 268 * @param type the layout's type (optionally {@link 269 com.liferay.portal.model.LayoutConstants#TYPE_PORTLET}). The 270 possible types can be found in {@link 271 com.liferay.portal.model.LayoutConstants}. 272 * @param hidden whether the layout is hidden 273 * @param friendlyURL the layout's locales and localized friendly URLs. To 274 see how the URL is normalized when accessed, see {@link 275 com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize( 276 String)}. 277 * @param serviceContext the service context to be applied. Must set the 278 UUID for the layout. Can specify the creation date, modification 279 date, and expando bridge attributes for the layout. For layouts 280 that belong to a layout set prototype, an attribute named 281 <code>layoutUpdateable</code> can be used to specify whether site 282 administrators can modify this page within their site. 283 * @return the layout 284 * @throws PortalException if a group with the primary key could not be 285 found, if the group did not have permission to manage the layouts 286 involved, if layout values were invalid, or if a portal exception 287 occurred 288 * @throws SystemException if a system exception occurred 289 */ 290 public static com.liferay.portal.model.LayoutSoap addLayout(long groupId, 291 boolean privateLayout, long parentLayoutId, java.lang.String name, 292 java.lang.String title, java.lang.String description, 293 java.lang.String type, boolean hidden, java.lang.String friendlyURL, 294 com.liferay.portal.service.ServiceContext serviceContext) 295 throws RemoteException { 296 try { 297 com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.addLayout(groupId, 298 privateLayout, parentLayoutId, name, title, description, 299 type, hidden, friendlyURL, serviceContext); 300 301 return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue); 302 } 303 catch (Exception e) { 304 _log.error(e, e); 305 306 throw new RemoteException(e.getMessage()); 307 } 308 } 309 310 /** 311 * Deletes the layout with the primary key, also deleting the layout's child 312 * layouts, and associated resources. 313 * 314 * @param groupId the primary key of the group 315 * @param privateLayout whether the layout is private to the group 316 * @param layoutId the primary key of the layout 317 * @param serviceContext the service context to be applied 318 * @throws PortalException if the user did not have permission to delete the 319 layout, if a matching layout could not be found , or if some 320 other portal exception occurred 321 * @throws SystemException if a system exception occurred 322 */ 323 public static void deleteLayout(long groupId, boolean privateLayout, 324 long layoutId, com.liferay.portal.service.ServiceContext serviceContext) 325 throws RemoteException { 326 try { 327 LayoutServiceUtil.deleteLayout(groupId, privateLayout, layoutId, 328 serviceContext); 329 } 330 catch (Exception e) { 331 _log.error(e, e); 332 333 throw new RemoteException(e.getMessage()); 334 } 335 } 336 337 /** 338 * Deletes the layout with the plid, also deleting the layout's child 339 * layouts, and associated resources. 340 * 341 * @param plid the primary key of the layout 342 * @param serviceContext the service context to be applied 343 * @throws PortalException if the user did not have permission to delete the 344 layout, if a layout with the primary key could not be found , or 345 if some other portal exception occurred 346 * @throws SystemException if a system exception occurred 347 */ 348 public static void deleteLayout(long plid, 349 com.liferay.portal.service.ServiceContext serviceContext) 350 throws RemoteException { 351 try { 352 LayoutServiceUtil.deleteLayout(plid, serviceContext); 353 } 354 catch (Exception e) { 355 _log.error(e, e); 356 357 throw new RemoteException(e.getMessage()); 358 } 359 } 360 361 public static void deleteTempFileEntry(long groupId, 362 java.lang.String fileName, java.lang.String tempFolderName) 363 throws RemoteException { 364 try { 365 LayoutServiceUtil.deleteTempFileEntry(groupId, fileName, 366 tempFolderName); 367 } 368 catch (Exception e) { 369 _log.error(e, e); 370 371 throw new RemoteException(e.getMessage()); 372 } 373 } 374 375 /** 376 * Returns all the ancestor layouts of the layout. 377 * 378 * @param plid the primary key of the layout 379 * @return the ancestor layouts of the layout 380 * @throws PortalException if a matching layout could not be found or if a 381 portal exception occurred 382 * @throws SystemException if a system exception occurred 383 */ 384 public static com.liferay.portal.model.LayoutSoap[] getAncestorLayouts( 385 long plid) throws RemoteException { 386 try { 387 java.util.List<com.liferay.portal.model.Layout> returnValue = LayoutServiceUtil.getAncestorLayouts(plid); 388 389 return com.liferay.portal.model.LayoutSoap.toSoapModels(returnValue); 390 } 391 catch (Exception e) { 392 _log.error(e, e); 393 394 throw new RemoteException(e.getMessage()); 395 } 396 } 397 398 /** 399 * Returns the primary key of the default layout for the group. 400 * 401 * @param groupId the primary key of the group 402 * @param scopeGroupId the primary key of the scope group. See {@link 403 com.liferay.portal.service.ServiceContext#getScopeGroupId()}. 404 * @param privateLayout whether the layout is private to the group 405 * @param portletId the primary key of the portlet 406 * @return Returns the primary key of the default layout group; {@link 407 com.liferay.portal.model.LayoutConstants#DEFAULT_PLID} otherwise 408 * @throws PortalException if a group, layout, or portlet with the primary 409 key could not be found 410 * @throws SystemException if a system exception occurred 411 */ 412 public static long getDefaultPlid(long groupId, long scopeGroupId, 413 boolean privateLayout, java.lang.String portletId) 414 throws RemoteException { 415 try { 416 long returnValue = LayoutServiceUtil.getDefaultPlid(groupId, 417 scopeGroupId, privateLayout, portletId); 418 419 return returnValue; 420 } 421 catch (Exception e) { 422 _log.error(e, e); 423 424 throw new RemoteException(e.getMessage()); 425 } 426 } 427 428 public static long getDefaultPlid(long groupId, long scopeGroupId, 429 java.lang.String portletId) throws RemoteException { 430 try { 431 long returnValue = LayoutServiceUtil.getDefaultPlid(groupId, 432 scopeGroupId, portletId); 433 434 return returnValue; 435 } 436 catch (Exception e) { 437 _log.error(e, e); 438 439 throw new RemoteException(e.getMessage()); 440 } 441 } 442 443 /** 444 * Returns the layout matching the UUID, group, and privacy. 445 * 446 * @param uuid the layout's UUID 447 * @param groupId the primary key of the group 448 * @param privateLayout whether the layout is private to the group 449 * @return the matching layout 450 * @throws PortalException if a matching layout could not be found, if the 451 user did not have permission to view the layout, or if some other 452 portal exception occurred 453 * @throws SystemException if a system exception occurred 454 */ 455 public static com.liferay.portal.model.LayoutSoap getLayoutByUuidAndGroupId( 456 java.lang.String uuid, long groupId, boolean privateLayout) 457 throws RemoteException { 458 try { 459 com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.getLayoutByUuidAndGroupId(uuid, 460 groupId, privateLayout); 461 462 return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue); 463 } 464 catch (Exception e) { 465 _log.error(e, e); 466 467 throw new RemoteException(e.getMessage()); 468 } 469 } 470 471 /** 472 * Returns the name of the layout. 473 * 474 * @param groupId the primary key of the group 475 * @param privateLayout whether the layout is private to the group 476 * @param layoutId the primary key of the layout 477 * @param languageId the primary key of the language. For more information 478 See {@link java.util.Locale}. 479 * @return the layout's name 480 * @throws PortalException if a matching layout could not be found 481 * @throws SystemException if a system exception occurred 482 */ 483 public static java.lang.String getLayoutName(long groupId, 484 boolean privateLayout, long layoutId, java.lang.String languageId) 485 throws RemoteException { 486 try { 487 java.lang.String returnValue = LayoutServiceUtil.getLayoutName(groupId, 488 privateLayout, layoutId, languageId); 489 490 return 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 layout references for all the layouts that belong to the 501 * company and belong to the portlet that matches the preferences. 502 * 503 * @param companyId the primary key of the company 504 * @param portletId the primary key of the portlet 505 * @param preferencesKey the portlet's preference key 506 * @param preferencesValue the portlet's preference value 507 * @return the layout references of the matching layouts 508 * @throws SystemException if a system exception occurred 509 */ 510 public static com.liferay.portal.model.LayoutReference[] getLayoutReferences( 511 long companyId, java.lang.String portletId, 512 java.lang.String preferencesKey, java.lang.String preferencesValue) 513 throws RemoteException { 514 try { 515 com.liferay.portal.model.LayoutReference[] returnValue = LayoutServiceUtil.getLayoutReferences(companyId, 516 portletId, preferencesKey, preferencesValue); 517 518 return returnValue; 519 } 520 catch (Exception e) { 521 _log.error(e, e); 522 523 throw new RemoteException(e.getMessage()); 524 } 525 } 526 527 public static com.liferay.portal.model.LayoutSoap[] getLayouts( 528 long groupId, boolean privateLayout) throws RemoteException { 529 try { 530 java.util.List<com.liferay.portal.model.Layout> returnValue = LayoutServiceUtil.getLayouts(groupId, 531 privateLayout); 532 533 return com.liferay.portal.model.LayoutSoap.toSoapModels(returnValue); 534 } 535 catch (Exception e) { 536 _log.error(e, e); 537 538 throw new RemoteException(e.getMessage()); 539 } 540 } 541 542 public static com.liferay.portal.model.LayoutSoap[] getLayouts( 543 long groupId, boolean privateLayout, long parentLayoutId) 544 throws RemoteException { 545 try { 546 java.util.List<com.liferay.portal.model.Layout> returnValue = LayoutServiceUtil.getLayouts(groupId, 547 privateLayout, parentLayoutId); 548 549 return com.liferay.portal.model.LayoutSoap.toSoapModels(returnValue); 550 } 551 catch (Exception e) { 552 _log.error(e, e); 553 554 throw new RemoteException(e.getMessage()); 555 } 556 } 557 558 public static com.liferay.portal.model.LayoutSoap[] getLayouts( 559 long groupId, boolean privateLayout, long parentLayoutId, 560 boolean incomplete, int start, int end) throws RemoteException { 561 try { 562 java.util.List<com.liferay.portal.model.Layout> returnValue = LayoutServiceUtil.getLayouts(groupId, 563 privateLayout, parentLayoutId, incomplete, start, end); 564 565 return com.liferay.portal.model.LayoutSoap.toSoapModels(returnValue); 566 } 567 catch (Exception e) { 568 _log.error(e, e); 569 570 throw new RemoteException(e.getMessage()); 571 } 572 } 573 574 public static int getLayoutsCount(long groupId, boolean privateLayout, 575 long parentLayoutId) throws RemoteException { 576 try { 577 int returnValue = LayoutServiceUtil.getLayoutsCount(groupId, 578 privateLayout, parentLayoutId); 579 580 return returnValue; 581 } 582 catch (Exception e) { 583 _log.error(e, e); 584 585 throw new RemoteException(e.getMessage()); 586 } 587 } 588 589 public static int getLayoutsCount(long groupId, boolean privateLayout, 590 long parentLayoutId, int priority) throws RemoteException { 591 try { 592 int returnValue = LayoutServiceUtil.getLayoutsCount(groupId, 593 privateLayout, parentLayoutId, priority); 594 595 return returnValue; 596 } 597 catch (Exception e) { 598 _log.error(e, e); 599 600 throw new RemoteException(e.getMessage()); 601 } 602 } 603 604 public static java.lang.String[] getTempFileEntryNames(long groupId, 605 java.lang.String tempFolderName) throws RemoteException { 606 try { 607 java.lang.String[] returnValue = LayoutServiceUtil.getTempFileEntryNames(groupId, 608 tempFolderName); 609 610 return returnValue; 611 } 612 catch (Exception e) { 613 _log.error(e, e); 614 615 throw new RemoteException(e.getMessage()); 616 } 617 } 618 619 /** 620 * Sets the layouts for the group, replacing and prioritizing all layouts of 621 * the parent layout. 622 * 623 * @param groupId the primary key of the group 624 * @param privateLayout whether the layout is private to the group 625 * @param parentLayoutId the primary key of the parent layout 626 * @param layoutIds the primary keys of the layouts 627 * @param serviceContext the service context to be applied 628 * @throws PortalException if a group or layout with the primary key could 629 not be found, if the group did not have permission to manage the 630 layouts, if no layouts were specified, if the first layout was 631 not page-able, if the first layout was hidden, or if some other 632 portal exception occurred 633 * @throws SystemException if a system exception occurred 634 */ 635 public static void setLayouts(long groupId, boolean privateLayout, 636 long parentLayoutId, long[] layoutIds, 637 com.liferay.portal.service.ServiceContext serviceContext) 638 throws RemoteException { 639 try { 640 LayoutServiceUtil.setLayouts(groupId, privateLayout, 641 parentLayoutId, layoutIds, serviceContext); 642 } 643 catch (Exception e) { 644 _log.error(e, e); 645 646 throw new RemoteException(e.getMessage()); 647 } 648 } 649 650 /** 651 * Deletes the job from the scheduler's queue. 652 * 653 * @param groupId the primary key of the group 654 * @param jobName the job name 655 * @param groupName the group name (optionally {@link 656 com.liferay.portal.kernel.messaging.DestinationNames#LAYOUTS_LOCAL_PUBLISHER}). 657 See {@link com.liferay.portal.kernel.messaging.DestinationNames}. 658 * @throws PortalException if the group did not permission to manage staging 659 and publish 660 * @throws SystemException if a system exception occurred 661 */ 662 public static void unschedulePublishToLive(long groupId, 663 java.lang.String jobName, java.lang.String groupName) 664 throws RemoteException { 665 try { 666 LayoutServiceUtil.unschedulePublishToLive(groupId, jobName, 667 groupName); 668 } 669 catch (Exception e) { 670 _log.error(e, e); 671 672 throw new RemoteException(e.getMessage()); 673 } 674 } 675 676 /** 677 * Deletes the job from the scheduler's persistent queue. 678 * 679 * @param groupId the primary key of the group 680 * @param jobName the job name 681 * @param groupName the group name (optionally {@link 682 com.liferay.portal.kernel.messaging.DestinationNames#LAYOUTS_LOCAL_PUBLISHER}). 683 See {@link com.liferay.portal.kernel.messaging.DestinationNames}. 684 * @throws PortalException if a group with the primary key could not be 685 found or if the group did not have permission to publish 686 * @throws SystemException if a system exception occurred 687 */ 688 public static void unschedulePublishToRemote(long groupId, 689 java.lang.String jobName, java.lang.String groupName) 690 throws RemoteException { 691 try { 692 LayoutServiceUtil.unschedulePublishToRemote(groupId, jobName, 693 groupName); 694 } 695 catch (Exception e) { 696 _log.error(e, e); 697 698 throw new RemoteException(e.getMessage()); 699 } 700 } 701 702 /** 703 * Updates the layout with additional parameters. 704 * 705 * @param groupId the primary key of the group 706 * @param privateLayout whether the layout is private to the group 707 * @param layoutId the primary key of the layout 708 * @param parentLayoutId the primary key of the layout's new parent layout 709 * @param localeNamesMap the layout's locales and localized names 710 * @param localeTitlesMap the layout's locales and localized titles 711 * @param descriptionMap the locales and localized descriptions to merge 712 (optionally <code>null</code>) 713 * @param keywordsMap the locales and localized keywords to merge 714 (optionally <code>null</code>) 715 * @param robotsMap the locales and localized robots to merge (optionally 716 <code>null</code>) 717 * @param type the layout's new type (optionally {@link 718 com.liferay.portal.model.LayoutConstants#TYPE_PORTLET}) 719 * @param hidden whether the layout is hidden 720 * @param friendlyURLMap the layout's locales and localized friendly URLs. 721 To see how the URL is normalized when accessed see {@link 722 com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize( 723 String)}. 724 * @param iconImage whether the icon image will be updated 725 * @param iconBytes the byte array of the layout's new icon image 726 * @param serviceContext the service context to be applied. Can set the 727 modification date and expando bridge attributes for the layout. 728 * @return the updated layout 729 * @throws PortalException if a group or layout with the primary key could 730 not be found, if the user did not have permission to update the 731 layout, if a unique friendly URL could not be generated, if a 732 valid parent layout ID to use could not be found, or if the 733 layout parameters were invalid 734 * @throws SystemException if a system exception occurred 735 */ 736 public static com.liferay.portal.model.LayoutSoap updateLayout( 737 long groupId, boolean privateLayout, long layoutId, 738 long parentLayoutId, java.lang.String[] localeNamesMapLanguageIds, 739 java.lang.String[] localeNamesMapValues, 740 java.lang.String[] localeTitlesMapLanguageIds, 741 java.lang.String[] localeTitlesMapValues, 742 java.lang.String[] descriptionMapLanguageIds, 743 java.lang.String[] descriptionMapValues, 744 java.lang.String[] keywordsMapLanguageIds, 745 java.lang.String[] keywordsMapValues, 746 java.lang.String[] robotsMapLanguageIds, 747 java.lang.String[] robotsMapValues, java.lang.String type, 748 boolean hidden, java.lang.String[] friendlyURLMapLanguageIds, 749 java.lang.String[] friendlyURLMapValues, java.lang.Boolean iconImage, 750 byte[] iconBytes, 751 com.liferay.portal.service.ServiceContext serviceContext) 752 throws RemoteException { 753 try { 754 Map<Locale, String> localeNamesMap = LocalizationUtil.getLocalizationMap(localeNamesMapLanguageIds, 755 localeNamesMapValues); 756 Map<Locale, String> localeTitlesMap = LocalizationUtil.getLocalizationMap(localeTitlesMapLanguageIds, 757 localeTitlesMapValues); 758 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds, 759 descriptionMapValues); 760 Map<Locale, String> keywordsMap = LocalizationUtil.getLocalizationMap(keywordsMapLanguageIds, 761 keywordsMapValues); 762 Map<Locale, String> robotsMap = LocalizationUtil.getLocalizationMap(robotsMapLanguageIds, 763 robotsMapValues); 764 Map<Locale, String> friendlyURLMap = LocalizationUtil.getLocalizationMap(friendlyURLMapLanguageIds, 765 friendlyURLMapValues); 766 767 com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateLayout(groupId, 768 privateLayout, layoutId, parentLayoutId, localeNamesMap, 769 localeTitlesMap, descriptionMap, keywordsMap, robotsMap, 770 type, hidden, friendlyURLMap, iconImage, iconBytes, 771 serviceContext); 772 773 return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue); 774 } 775 catch (Exception e) { 776 _log.error(e, e); 777 778 throw new RemoteException(e.getMessage()); 779 } 780 } 781 782 /** 783 * Updates the layout with additional parameters. 784 * 785 * @param groupId the primary key of the group 786 * @param privateLayout whether the layout is private to the group 787 * @param layoutId the primary key of the layout 788 * @param parentLayoutId the primary key of the layout's new parent 789 layout 790 * @param localeNamesMap the layout's locales and localized names 791 * @param localeTitlesMap the layout's locales and localized titles 792 * @param descriptionMap the locales and localized descriptions to 793 merge (optionally <code>null</code>) 794 * @param keywordsMap the locales and localized keywords to merge 795 (optionally <code>null</code>) 796 * @param robotsMap the locales and localized robots to merge 797 (optionally <code>null</code>) 798 * @param type the layout's new type (optionally {@link 799 com.liferay.portal.model.LayoutConstants#TYPE_PORTLET}) 800 * @param hidden whether the layout is hidden 801 * @param friendlyURL the layout's locales and new friendly URLs. To 802 see how the URL is normalized when accessed, see {@link 803 com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize( 804 String)}. 805 * @param iconImage whether the icon image will be updated 806 * @param iconBytes the byte array of the layout's new icon image 807 * @param serviceContext the service context to be applied. Can set the 808 modification date and expando bridge attributes for the 809 layout. 810 * @return the updated layout 811 * @throws PortalException if a group or layout with the primary key 812 could not be found, if the user did not have permission to 813 update the layout, if a unique friendly URL could not be 814 generated, if a valid parent layout ID to use could not be 815 found, or if the layout parameters were invalid 816 * @throws SystemException if a system exception occurred 817 * @deprecated As of 6.2.0, replaced by {@link #updateLayout(long, boolean, 818 long, long, Map, Map, Map, Map, Map, String, boolean, Map, 819 Boolean, byte[], ServiceContext)} 820 */ 821 public static com.liferay.portal.model.LayoutSoap updateLayout( 822 long groupId, boolean privateLayout, long layoutId, 823 long parentLayoutId, java.lang.String[] localeNamesMapLanguageIds, 824 java.lang.String[] localeNamesMapValues, 825 java.lang.String[] localeTitlesMapLanguageIds, 826 java.lang.String[] localeTitlesMapValues, 827 java.lang.String[] descriptionMapLanguageIds, 828 java.lang.String[] descriptionMapValues, 829 java.lang.String[] keywordsMapLanguageIds, 830 java.lang.String[] keywordsMapValues, 831 java.lang.String[] robotsMapLanguageIds, 832 java.lang.String[] robotsMapValues, java.lang.String type, 833 boolean hidden, java.lang.String friendlyURL, 834 java.lang.Boolean iconImage, byte[] iconBytes, 835 com.liferay.portal.service.ServiceContext serviceContext) 836 throws RemoteException { 837 try { 838 Map<Locale, String> localeNamesMap = LocalizationUtil.getLocalizationMap(localeNamesMapLanguageIds, 839 localeNamesMapValues); 840 Map<Locale, String> localeTitlesMap = LocalizationUtil.getLocalizationMap(localeTitlesMapLanguageIds, 841 localeTitlesMapValues); 842 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds, 843 descriptionMapValues); 844 Map<Locale, String> keywordsMap = LocalizationUtil.getLocalizationMap(keywordsMapLanguageIds, 845 keywordsMapValues); 846 Map<Locale, String> robotsMap = LocalizationUtil.getLocalizationMap(robotsMapLanguageIds, 847 robotsMapValues); 848 849 com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateLayout(groupId, 850 privateLayout, layoutId, parentLayoutId, localeNamesMap, 851 localeTitlesMap, descriptionMap, keywordsMap, robotsMap, 852 type, hidden, friendlyURL, iconImage, iconBytes, 853 serviceContext); 854 855 return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue); 856 } 857 catch (Exception e) { 858 _log.error(e, e); 859 860 throw new RemoteException(e.getMessage()); 861 } 862 } 863 864 /** 865 * Updates the layout replacing its type settings. 866 * 867 * @param groupId the primary key of the group 868 * @param privateLayout whether the layout is private to the group 869 * @param layoutId the primary key of the layout 870 * @param typeSettings the settings to load the unicode properties object. 871 See {@link com.liferay.portal.kernel.util.UnicodeProperties 872 #fastLoad(String)}. 873 * @return the updated layout 874 * @throws PortalException if a matching layout could not be found or if the 875 user did not have permission to update the layout 876 * @throws SystemException if a system exception occurred 877 */ 878 public static com.liferay.portal.model.LayoutSoap updateLayout( 879 long groupId, boolean privateLayout, long layoutId, 880 java.lang.String typeSettings) throws RemoteException { 881 try { 882 com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateLayout(groupId, 883 privateLayout, layoutId, typeSettings); 884 885 return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue); 886 } 887 catch (Exception e) { 888 _log.error(e, e); 889 890 throw new RemoteException(e.getMessage()); 891 } 892 } 893 894 /** 895 * Updates the look and feel of the layout. 896 * 897 * @param groupId the primary key of the group 898 * @param privateLayout whether the layout is private to the group 899 * @param layoutId the primary key of the layout 900 * @param themeId the primary key of the layout's new theme 901 * @param colorSchemeId the primary key of the layout's new color scheme 902 * @param css the layout's new CSS 903 * @param wapTheme whether the theme is for WAP browsers 904 * @return the updated layout 905 * @throws PortalException if a matching layout could not be found, or if 906 the user did not have permission to update the layout and 907 permission to apply the theme 908 * @throws SystemException if a system exception occurred 909 */ 910 public static com.liferay.portal.model.LayoutSoap updateLookAndFeel( 911 long groupId, boolean privateLayout, long layoutId, 912 java.lang.String themeId, java.lang.String colorSchemeId, 913 java.lang.String css, boolean wapTheme) throws RemoteException { 914 try { 915 com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateLookAndFeel(groupId, 916 privateLayout, layoutId, themeId, colorSchemeId, css, 917 wapTheme); 918 919 return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue); 920 } 921 catch (Exception e) { 922 _log.error(e, e); 923 924 throw new RemoteException(e.getMessage()); 925 } 926 } 927 928 /** 929 * Updates the name of the layout matching the group, layout ID, and 930 * privacy. 931 * 932 * @param groupId the primary key of the group 933 * @param privateLayout whether the layout is private to the group 934 * @param layoutId the primary key of the layout 935 * @param name the layout's new name 936 * @param languageId the primary key of the language. For more information 937 see {@link java.util.Locale}. 938 * @return the updated layout 939 * @throws PortalException if a matching layout could not be found, if the 940 user did not have permission to update the layout, or if the new 941 name was <code>null</code> 942 * @throws SystemException if a system exception occurred 943 */ 944 public static com.liferay.portal.model.LayoutSoap updateName(long groupId, 945 boolean privateLayout, long layoutId, java.lang.String name, 946 java.lang.String languageId) throws RemoteException { 947 try { 948 com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateName(groupId, 949 privateLayout, layoutId, name, languageId); 950 951 return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue); 952 } 953 catch (Exception e) { 954 _log.error(e, e); 955 956 throw new RemoteException(e.getMessage()); 957 } 958 } 959 960 /** 961 * Updates the name of the layout matching the primary key. 962 * 963 * @param plid the primary key of the layout 964 * @param name the name to be assigned 965 * @param languageId the primary key of the language. For more information 966 see {@link java.util.Locale}. 967 * @return the updated layout 968 * @throws PortalException if a layout with the primary key could not be 969 found, or if the user did not have permission to update the 970 layout, or if the name was <code>null</code> 971 * @throws SystemException if a system exception occurred 972 */ 973 public static com.liferay.portal.model.LayoutSoap updateName(long plid, 974 java.lang.String name, java.lang.String languageId) 975 throws RemoteException { 976 try { 977 com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateName(plid, 978 name, languageId); 979 980 return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue); 981 } 982 catch (Exception e) { 983 _log.error(e, e); 984 985 throw new RemoteException(e.getMessage()); 986 } 987 } 988 989 /** 990 * Updates the parent layout ID of the layout matching the group, layout ID, 991 * and privacy. 992 * 993 * @param groupId the primary key of the group 994 * @param privateLayout whether the layout is private to the group 995 * @param layoutId the primary key of the layout 996 * @param parentLayoutId the primary key to be assigned to the parent 997 layout 998 * @return the matching layout 999 * @throws PortalException if a valid parent layout ID to use could not be 1000 found, if a matching layout could not be found, or if the user 1001 did not have permission to update the layout 1002 * @throws SystemException if a system exception occurred 1003 */ 1004 public static com.liferay.portal.model.LayoutSoap updateParentLayoutId( 1005 long groupId, boolean privateLayout, long layoutId, long parentLayoutId) 1006 throws RemoteException { 1007 try { 1008 com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateParentLayoutId(groupId, 1009 privateLayout, layoutId, parentLayoutId); 1010 1011 return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue); 1012 } 1013 catch (Exception e) { 1014 _log.error(e, e); 1015 1016 throw new RemoteException(e.getMessage()); 1017 } 1018 } 1019 1020 /** 1021 * Updates the parent layout ID of the layout matching the primary key. If a 1022 * layout matching the parent primary key is found, the layout ID of that 1023 * layout is assigned, otherwise {@link 1024 * com.liferay.portal.model.LayoutConstants#DEFAULT_PARENT_LAYOUT_ID} is 1025 * assigned. 1026 * 1027 * @param plid the primary key of the layout 1028 * @param parentPlid the primary key of the parent layout 1029 * @return the layout matching the primary key 1030 * @throws PortalException if a layout with the primary key could not be 1031 found, if the user did not have permission to update the layout, 1032 or if a valid parent layout ID to use could not be found 1033 * @throws SystemException if a system exception occurred 1034 */ 1035 public static com.liferay.portal.model.LayoutSoap updateParentLayoutId( 1036 long plid, long parentPlid) throws RemoteException { 1037 try { 1038 com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateParentLayoutId(plid, 1039 parentPlid); 1040 1041 return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue); 1042 } 1043 catch (Exception e) { 1044 _log.error(e, e); 1045 1046 throw new RemoteException(e.getMessage()); 1047 } 1048 } 1049 1050 public static com.liferay.portal.model.LayoutSoap updateParentLayoutIdAndPriority( 1051 long plid, long parentPlid, int priority) throws RemoteException { 1052 try { 1053 com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateParentLayoutIdAndPriority(plid, 1054 parentPlid, priority); 1055 1056 return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue); 1057 } 1058 catch (Exception e) { 1059 _log.error(e, e); 1060 1061 throw new RemoteException(e.getMessage()); 1062 } 1063 } 1064 1065 /** 1066 * Updates the priority of the layout matching the group, layout ID, and 1067 * privacy. 1068 * 1069 * @param groupId the primary key of the group 1070 * @param privateLayout whether the layout is private to the group 1071 * @param layoutId the primary key of the layout 1072 * @param priority the layout's new priority 1073 * @return the updated layout 1074 * @throws PortalException if a matching layout could not be found or if the 1075 user did not have permission to update the layout 1076 * @throws SystemException if a system exception occurred 1077 */ 1078 public static com.liferay.portal.model.LayoutSoap updatePriority( 1079 long groupId, boolean privateLayout, long layoutId, int priority) 1080 throws RemoteException { 1081 try { 1082 com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updatePriority(groupId, 1083 privateLayout, layoutId, priority); 1084 1085 return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue); 1086 } 1087 catch (Exception e) { 1088 _log.error(e, e); 1089 1090 throw new RemoteException(e.getMessage()); 1091 } 1092 } 1093 1094 /** 1095 * Updates the priority of the layout matching the group, layout ID, and 1096 * privacy, setting the layout's priority based on the priorities of the 1097 * next and previous layouts. 1098 * 1099 * @param groupId the primary key of the group 1100 * @param privateLayout whether the layout is private to the group 1101 * @param layoutId the primary key of the layout 1102 * @param nextLayoutId the primary key of the next layout 1103 * @param previousLayoutId the primary key of the previous layout 1104 * @return the updated layout 1105 * @throws PortalException if a matching layout could not be found or if the 1106 user did not have permission to update the layout 1107 * @throws SystemException if a system exception occurred 1108 */ 1109 public static com.liferay.portal.model.LayoutSoap updatePriority( 1110 long groupId, boolean privateLayout, long layoutId, long nextLayoutId, 1111 long previousLayoutId) throws RemoteException { 1112 try { 1113 com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updatePriority(groupId, 1114 privateLayout, layoutId, nextLayoutId, previousLayoutId); 1115 1116 return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue); 1117 } 1118 catch (Exception e) { 1119 _log.error(e, e); 1120 1121 throw new RemoteException(e.getMessage()); 1122 } 1123 } 1124 1125 /** 1126 * Updates the priority of the layout matching the primary key. 1127 * 1128 * @param plid the primary key of the layout 1129 * @param priority the layout's new priority 1130 * @return the updated layout 1131 * @throws PortalException if a layout with the primary key could not be 1132 found 1133 * @throws SystemException if a system exception occurred 1134 */ 1135 public static com.liferay.portal.model.LayoutSoap updatePriority( 1136 long plid, int priority) throws RemoteException { 1137 try { 1138 com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updatePriority(plid, 1139 priority); 1140 1141 return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue); 1142 } 1143 catch (Exception e) { 1144 _log.error(e, e); 1145 1146 throw new RemoteException(e.getMessage()); 1147 } 1148 } 1149 1150 private static Log _log = LogFactoryUtil.getLog(LayoutServiceSoap.class); 1151 }