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.kernel.util.LocalizationUtil; 020 import com.liferay.portal.service.LayoutServiceUtil; 021 022 import java.rmi.RemoteException; 023 024 import java.util.Locale; 025 import java.util.Map; 026 027 /** 028 * <p> 029 * This class provides a SOAP utility for the 030 * {@link com.liferay.portal.service.LayoutServiceUtil} service utility. The 031 * static methods of this class calls the same methods of the service utility. 032 * However, the signatures are different because it is difficult for SOAP to 033 * support certain types. 034 * </p> 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 public class LayoutServiceSoap { 070 /** 071 * Adds a layout with additional parameters. 072 * 073 * <p> 074 * This method handles the creation of the layout including its resources, 075 * metadata, and internal data structures. It is not necessary to make 076 * subsequent calls to any methods to setup default groups, resources, ... 077 * etc. 078 * </p> 079 * 080 * @param groupId the primary key of the group 081 * @param privateLayout whether the layout is private to the group 082 * @param parentLayoutId the primary key of the parent layout (optionally 083 {@link 084 com.liferay.portal.model.LayoutConstants#DEFAULT_PARENT_LAYOUT_ID}) 085 * @param localeNamesMap the layout's locales and localized names 086 * @param localeTitlesMap the layout's locales and localized titles 087 * @param descriptionMap the layout's locales and localized descriptions 088 * @param keywordsMap the layout's locales and localized keywords 089 * @param robotsMap the layout's locales and localized robots 090 * @param type the layout's type (optionally {@link 091 com.liferay.portal.model.LayoutConstants#TYPE_PORTLET}). The 092 possible types can be found in {@link 093 com.liferay.portal.model.LayoutConstants}. 094 * @param hidden whether the layout is hidden 095 * @param friendlyURL the layout's friendly URL (optionally {@link 096 com.liferay.portal.util.PropsValues#DEFAULT_USER_PRIVATE_LAYOUT_FRIENDLY_URL} 097 or {@link 098 com.liferay.portal.util.PropsValues#DEFAULT_USER_PUBLIC_LAYOUT_FRIENDLY_URL}). 099 The default values can be overridden in 100 <code>portal-ext.properties</code> by specifying new values for 101 the corresponding properties defined in {@link 102 com.liferay.portal.util.PropsValues}. To see how the URL is 103 normalized when accessed see {@link 104 com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize( 105 String)}. 106 * @param serviceContext the service context to be applied. Must set the 107 UUID for the layout. Can set the creation date, modification date 108 and the expando bridge attributes for the layout. For layouts 109 that belong to a layout set prototype, an attribute named 110 'layoutUpdateable' can be used to specify whether site 111 administrators can modify this page within their site. 112 * @return the layout 113 * @throws PortalException if a group with the primary key could not be 114 found, if the group did not have permission to manage the layouts 115 involved, or if layout values were invalid 116 * @throws SystemException if a system exception occurred 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 single entry maps for name, title, and description to 161 * the default locale. 162 * 163 * <p> 164 * This method handles the creation of the layout including its resources, 165 * metadata, and internal data structures. It is not necessary to make 166 * subsequent calls to any methods to setup default groups, resources, ... 167 * etc. 168 * </p> 169 * 170 * @param groupId the primary key of the group 171 * @param privateLayout whether the layout is private to the group 172 * @param parentLayoutId the primary key of the parent layout (optionally 173 {@link 174 com.liferay.portal.model.LayoutConstants#DEFAULT_PARENT_LAYOUT_ID}) 175 * @param name Map the layout's locales and localized names 176 * @param title Map the layout's locales and localized titles 177 * @param description Map the layout's locales and localized descriptions 178 * @param type the layout's type (optionally {@link 179 com.liferay.portal.model.LayoutConstants#TYPE_PORTLET}). The 180 possible types can be found in {@link 181 com.liferay.portal.model.LayoutConstants}. 182 * @param hidden whether the layout is hidden 183 * @param friendlyURL the layout's friendly URL (optionally {@link 184 com.liferay.portal.util.PropsValues#DEFAULT_USER_PRIVATE_LAYOUT_FRIENDLY_URL} 185 or {@link 186 com.liferay.portal.util.PropsValues#DEFAULT_USER_PUBLIC_LAYOUT_FRIENDLY_URL}). 187 The default values can be overridden in 188 <code>portal-ext.properties</code> by specifying new values for 189 the corresponding properties defined in {@link 190 com.liferay.portal.util.PropsValues}. To see how the URL is 191 normalized when accessed see {@link 192 com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize( 193 String)}. 194 * @param serviceContext the service context to be applied. Must set the 195 UUID for the layout. Can specify the creation date, modification 196 date and the expando bridge attributes for the layout. For 197 layouts that belong to a layout set prototype, an attribute named 198 'layoutUpdateable' can be used to specify whether site 199 administrators can modify this page within their site. 200 * @return the layout 201 * @throws PortalException if a group with the primary key could not be 202 found, if the group did not have permission to manage the layouts 203 involved, or if layout values were invalid 204 * @throws SystemException if a system exception occurred 205 */ 206 public static com.liferay.portal.model.LayoutSoap addLayout(long groupId, 207 boolean privateLayout, long parentLayoutId, java.lang.String name, 208 java.lang.String title, java.lang.String description, 209 java.lang.String type, boolean hidden, java.lang.String friendlyURL, 210 com.liferay.portal.service.ServiceContext serviceContext) 211 throws RemoteException { 212 try { 213 com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.addLayout(groupId, 214 privateLayout, parentLayoutId, name, title, description, 215 type, hidden, friendlyURL, serviceContext); 216 217 return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue); 218 } 219 catch (Exception e) { 220 _log.error(e, e); 221 222 throw new RemoteException(e.getMessage()); 223 } 224 } 225 226 /** 227 * Deletes the layout with the primary key, also deleting the layout's child 228 * layouts, and associated resources. 229 * 230 * @param groupId the primary key of the group 231 * @param privateLayout whether the layout is private to the group 232 * @param layoutId the primary key of the layout 233 * @param serviceContext the service context to be applied 234 * @throws PortalException if the user did not have permission to delete the 235 layout, if a matching layout could not be found , or if some 236 other portal exception occurred 237 * @throws SystemException if a system exception occurred 238 */ 239 public static void deleteLayout(long groupId, boolean privateLayout, 240 long layoutId, com.liferay.portal.service.ServiceContext serviceContext) 241 throws RemoteException { 242 try { 243 LayoutServiceUtil.deleteLayout(groupId, privateLayout, layoutId, 244 serviceContext); 245 } 246 catch (Exception e) { 247 _log.error(e, e); 248 249 throw new RemoteException(e.getMessage()); 250 } 251 } 252 253 /** 254 * Deletes the layout with the plid, also deleting the layout's child 255 * layouts, and associated resources. 256 * 257 * @param plid the primary key of the layout 258 * @param serviceContext the service context to be applied 259 * @throws PortalException if the user did not have permission to delete the 260 layout, if a layout with the primary key could not be found , or 261 if some other portal exception occurred 262 * @throws SystemException if a system exception occurred 263 */ 264 public static void deleteLayout(long plid, 265 com.liferay.portal.service.ServiceContext serviceContext) 266 throws RemoteException { 267 try { 268 LayoutServiceUtil.deleteLayout(plid, serviceContext); 269 } 270 catch (Exception e) { 271 _log.error(e, e); 272 273 throw new RemoteException(e.getMessage()); 274 } 275 } 276 277 /** 278 * Returns all the ancestor layouts of the layout. 279 * 280 * @param plid the primary key of the layout 281 * @return the ancestor layouts of the layout 282 * @throws PortalException if a matching layout could not be found or if a 283 portal exception occurred 284 * @throws SystemException if a system exception occurred 285 */ 286 public static com.liferay.portal.model.LayoutSoap[] getAncestorLayouts( 287 long plid) throws RemoteException { 288 try { 289 java.util.List<com.liferay.portal.model.Layout> returnValue = LayoutServiceUtil.getAncestorLayouts(plid); 290 291 return com.liferay.portal.model.LayoutSoap.toSoapModels(returnValue); 292 } 293 catch (Exception e) { 294 _log.error(e, e); 295 296 throw new RemoteException(e.getMessage()); 297 } 298 } 299 300 /** 301 * Returns the primary key of the default layout for the group. 302 * 303 * @param groupId the primary key of the group 304 * @param scopeGroupId the primary key of the scope group. See {@link 305 com.liferay.portal.service.ServiceContext#getScopeGroupId()}. 306 * @param privateLayout whether the layout is private to the group 307 * @param portletId the primary key of the portlet 308 * @return Returns the primary key of the default layout group; {@link 309 com.liferay.portal.model.LayoutConstants#DEFAULT_PLID} otherwise 310 * @throws PortalException if a group, layout, or portlet with the primary 311 key could not be found 312 * @throws SystemException if a system exception occurred 313 */ 314 public static long getDefaultPlid(long groupId, long scopeGroupId, 315 boolean privateLayout, java.lang.String portletId) 316 throws RemoteException { 317 try { 318 long returnValue = LayoutServiceUtil.getDefaultPlid(groupId, 319 scopeGroupId, privateLayout, portletId); 320 321 return returnValue; 322 } 323 catch (Exception e) { 324 _log.error(e, e); 325 326 throw new RemoteException(e.getMessage()); 327 } 328 } 329 330 public static long getDefaultPlid(long groupId, long scopeGroupId, 331 java.lang.String portletId) throws RemoteException { 332 try { 333 long returnValue = LayoutServiceUtil.getDefaultPlid(groupId, 334 scopeGroupId, portletId); 335 336 return returnValue; 337 } 338 catch (Exception e) { 339 _log.error(e, e); 340 341 throw new RemoteException(e.getMessage()); 342 } 343 } 344 345 /** 346 * Returns the layout matching the UUID, group, and privacy. 347 * 348 * @param uuid the layout's UUID 349 * @param groupId the primary key of the group 350 * @param privateLayout whether the layout is private to the group 351 * @return the matching layout 352 * @throws PortalException if a matching layout could not be found, if the 353 user did not have permission to view the layout, or if some other 354 portal exception occurred 355 * @throws SystemException if a system exception occurred 356 */ 357 public static com.liferay.portal.model.LayoutSoap getLayoutByUuidAndGroupId( 358 java.lang.String uuid, long groupId, boolean privateLayout) 359 throws RemoteException { 360 try { 361 com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.getLayoutByUuidAndGroupId(uuid, 362 groupId, privateLayout); 363 364 return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue); 365 } 366 catch (Exception e) { 367 _log.error(e, e); 368 369 throw new RemoteException(e.getMessage()); 370 } 371 } 372 373 /** 374 * Returns the name of the layout. 375 * 376 * @param groupId the primary key of the group 377 * @param privateLayout whether the layout is private to the group 378 * @param layoutId the primary key of the layout 379 * @param languageId the primary key of the language. For more information 380 See {@link java.util.Locale}. 381 * @return the layout's name 382 * @throws PortalException if a matching layout could not be found 383 * @throws SystemException if a system exception occurred 384 */ 385 public static java.lang.String getLayoutName(long groupId, 386 boolean privateLayout, long layoutId, java.lang.String languageId) 387 throws RemoteException { 388 try { 389 java.lang.String returnValue = LayoutServiceUtil.getLayoutName(groupId, 390 privateLayout, layoutId, languageId); 391 392 return returnValue; 393 } 394 catch (Exception e) { 395 _log.error(e, e); 396 397 throw new RemoteException(e.getMessage()); 398 } 399 } 400 401 /** 402 * Returns the layout references for all the layouts that belong to the 403 * company and belong to the portlet that matches the preferences. 404 * 405 * @param companyId the primary key of the company 406 * @param portletId the primary key of the portlet 407 * @param preferencesKey the portlet's preference key 408 * @param preferencesValue the portlet's preference value 409 * @return the layout references of the matching layouts 410 * @throws SystemException if a system exception occurred 411 */ 412 public static com.liferay.portal.model.LayoutReference[] getLayoutReferences( 413 long companyId, java.lang.String portletId, 414 java.lang.String preferencesKey, java.lang.String preferencesValue) 415 throws RemoteException { 416 try { 417 com.liferay.portal.model.LayoutReference[] returnValue = LayoutServiceUtil.getLayoutReferences(companyId, 418 portletId, preferencesKey, preferencesValue); 419 420 return returnValue; 421 } 422 catch (Exception e) { 423 _log.error(e, e); 424 425 throw new RemoteException(e.getMessage()); 426 } 427 } 428 429 public static com.liferay.portal.model.LayoutSoap[] getLayouts( 430 long groupId, boolean privateLayout) throws RemoteException { 431 try { 432 java.util.List<com.liferay.portal.model.Layout> returnValue = LayoutServiceUtil.getLayouts(groupId, 433 privateLayout); 434 435 return com.liferay.portal.model.LayoutSoap.toSoapModels(returnValue); 436 } 437 catch (Exception e) { 438 _log.error(e, e); 439 440 throw new RemoteException(e.getMessage()); 441 } 442 } 443 444 public static com.liferay.portal.model.LayoutSoap[] getLayouts( 445 long groupId, boolean privateLayout, long parentLayoutId) 446 throws RemoteException { 447 try { 448 java.util.List<com.liferay.portal.model.Layout> returnValue = LayoutServiceUtil.getLayouts(groupId, 449 privateLayout, parentLayoutId); 450 451 return com.liferay.portal.model.LayoutSoap.toSoapModels(returnValue); 452 } 453 catch (Exception e) { 454 _log.error(e, e); 455 456 throw new RemoteException(e.getMessage()); 457 } 458 } 459 460 public static com.liferay.portal.model.LayoutSoap[] getLayouts( 461 long groupId, boolean privateLayout, long parentLayoutId, 462 boolean incomplete, int start, int end) throws RemoteException { 463 try { 464 java.util.List<com.liferay.portal.model.Layout> returnValue = LayoutServiceUtil.getLayouts(groupId, 465 privateLayout, parentLayoutId, incomplete, start, end); 466 467 return com.liferay.portal.model.LayoutSoap.toSoapModels(returnValue); 468 } 469 catch (Exception e) { 470 _log.error(e, e); 471 472 throw new RemoteException(e.getMessage()); 473 } 474 } 475 476 /** 477 * Sets the layouts for the group, replacing and prioritizing all layouts of 478 * the parent layout. 479 * 480 * @param groupId the primary key of the group 481 * @param privateLayout whether the layout is private to the group 482 * @param parentLayoutId the primary key of the parent layout 483 * @param layoutIds the primary keys of the layouts 484 * @param serviceContext the service context to be applied 485 * @throws PortalException if a group or layout with the primary key could 486 not be found, if the group did not have permission to manage the 487 layouts, if no layouts were specified, if the first layout was 488 not page-able, if the first layout was hidden, or if some other 489 portal exception occurred 490 * @throws SystemException if a system exception occurred 491 */ 492 public static void setLayouts(long groupId, boolean privateLayout, 493 long parentLayoutId, long[] layoutIds, 494 com.liferay.portal.service.ServiceContext serviceContext) 495 throws RemoteException { 496 try { 497 LayoutServiceUtil.setLayouts(groupId, privateLayout, 498 parentLayoutId, layoutIds, serviceContext); 499 } 500 catch (Exception e) { 501 _log.error(e, e); 502 503 throw new RemoteException(e.getMessage()); 504 } 505 } 506 507 /** 508 * Deletes the job from the scheduler's queue. 509 * 510 * @param groupId the primary key of the group 511 * @param jobName the job name 512 * @param groupName the group name (optionally {@link 513 com.liferay.portal.kernel.messaging.DestinationNames#LAYOUTS_LOCAL_PUBLISHER}). 514 See {@link com.liferay.portal.kernel.messaging.DestinationNames}. 515 * @throws PortalException if the group did not permission to manage staging 516 and publish 517 * @throws SystemException if a system exception occurred 518 */ 519 public static void unschedulePublishToLive(long groupId, 520 java.lang.String jobName, java.lang.String groupName) 521 throws RemoteException { 522 try { 523 LayoutServiceUtil.unschedulePublishToLive(groupId, jobName, 524 groupName); 525 } 526 catch (Exception e) { 527 _log.error(e, e); 528 529 throw new RemoteException(e.getMessage()); 530 } 531 } 532 533 /** 534 * Deletes the job from the scheduler's persistent queue. 535 * 536 * @param groupId the primary key of the group 537 * @param jobName the job name 538 * @param groupName the group name (optionally {@link 539 com.liferay.portal.kernel.messaging.DestinationNames#LAYOUTS_LOCAL_PUBLISHER}). 540 See {@link com.liferay.portal.kernel.messaging.DestinationNames}. 541 * @throws PortalException if a group with the primary key could not be 542 found or if the group did not have permission to publish 543 * @throws SystemException if a system exception occurred 544 */ 545 public static void unschedulePublishToRemote(long groupId, 546 java.lang.String jobName, java.lang.String groupName) 547 throws RemoteException { 548 try { 549 LayoutServiceUtil.unschedulePublishToRemote(groupId, jobName, 550 groupName); 551 } 552 catch (Exception e) { 553 _log.error(e, e); 554 555 throw new RemoteException(e.getMessage()); 556 } 557 } 558 559 /** 560 * Updates the layout. 561 * 562 * @param groupId the primary key of the group 563 * @param privateLayout whether the layout is private to the group 564 * @param layoutId the primary key of the layout 565 * @param parentLayoutId the primary key of the layout's new parent layout 566 * @param localeNamesMap the layout's locales and localized names 567 * @param localeTitlesMap the layout's locales and localized titles 568 * @param descriptionMap the locales and localized descriptions to merge 569 (optionally <code>null</code>) 570 * @param keywordsMap the locales and localized keywords to merge 571 (optionally <code>null</code>) 572 * @param robotsMap the locales and localized robots to merge (optionally 573 <code>null</code>) 574 * @param type the layout's new type (optionally {@link 575 com.liferay.portal.model.LayoutConstants#TYPE_PORTLET}) 576 * @param hidden whether the layout is hidden 577 * @param friendlyURL the layout's new friendly URL (optionally {@link 578 com.liferay.portal.util.PropsValues#DEFAULT_USER_PRIVATE_LAYOUT_FRIENDLY_URL} 579 or {@link 580 com.liferay.portal.util.PropsValues#DEFAULT_USER_PRIVATE_LAYOUT_FRIENDLY_URL}). 581 The default values can be overridden in 582 <code>portal-ext.properties</code> by specifying new values for 583 the corresponding properties defined in {@link 584 com.liferay.portal.util.PropsValues}. To see how the URL is 585 normalized when accessed see {@link 586 com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize( 587 String)}. 588 * @param iconImage whether the icon image will be updated 589 * @param iconBytes the byte array of the layout's new icon image 590 * @param serviceContext the service context to be applied. Can set the 591 modification date and expando bridge attributes for the layout. 592 * @return the updated layout 593 * @throws PortalException if a group or layout with the primary key could 594 not be found, if the user did not have permission to update the 595 layout, if a unique friendly URL could not be generated, if a 596 valid parent layout ID to use could not be found, or if the 597 layout parameters were invalid 598 * @throws SystemException if a system exception occurred 599 */ 600 public static com.liferay.portal.model.LayoutSoap updateLayout( 601 long groupId, boolean privateLayout, long layoutId, 602 long parentLayoutId, java.lang.String[] localeNamesMapLanguageIds, 603 java.lang.String[] localeNamesMapValues, 604 java.lang.String[] localeTitlesMapLanguageIds, 605 java.lang.String[] localeTitlesMapValues, 606 java.lang.String[] descriptionMapLanguageIds, 607 java.lang.String[] descriptionMapValues, 608 java.lang.String[] keywordsMapLanguageIds, 609 java.lang.String[] keywordsMapValues, 610 java.lang.String[] robotsMapLanguageIds, 611 java.lang.String[] robotsMapValues, java.lang.String type, 612 boolean hidden, java.lang.String friendlyURL, 613 java.lang.Boolean iconImage, byte[] iconBytes, 614 com.liferay.portal.service.ServiceContext serviceContext) 615 throws RemoteException { 616 try { 617 Map<Locale, String> localeNamesMap = LocalizationUtil.getLocalizationMap(localeNamesMapLanguageIds, 618 localeNamesMapValues); 619 Map<Locale, String> localeTitlesMap = LocalizationUtil.getLocalizationMap(localeTitlesMapLanguageIds, 620 localeTitlesMapValues); 621 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds, 622 descriptionMapValues); 623 Map<Locale, String> keywordsMap = LocalizationUtil.getLocalizationMap(keywordsMapLanguageIds, 624 keywordsMapValues); 625 Map<Locale, String> robotsMap = LocalizationUtil.getLocalizationMap(robotsMapLanguageIds, 626 robotsMapValues); 627 628 com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateLayout(groupId, 629 privateLayout, layoutId, parentLayoutId, localeNamesMap, 630 localeTitlesMap, descriptionMap, keywordsMap, robotsMap, 631 type, hidden, friendlyURL, iconImage, iconBytes, 632 serviceContext); 633 634 return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue); 635 } 636 catch (Exception e) { 637 _log.error(e, e); 638 639 throw new RemoteException(e.getMessage()); 640 } 641 } 642 643 /** 644 * Updates the layout replacing its type settings. 645 * 646 * @param groupId the primary key of the group 647 * @param privateLayout whether the layout is private to the group 648 * @param layoutId the primary key of the layout 649 * @param typeSettings the settings to load the unicode properties object. 650 See {@link com.liferay.portal.kernel.util.UnicodeProperties 651 #fastLoad(String)}. 652 * @return the updated layout 653 * @throws PortalException if a matching layout could not be found or if the 654 user did not have permission to update the layout 655 * @throws SystemException if a system exception occurred 656 */ 657 public static com.liferay.portal.model.LayoutSoap updateLayout( 658 long groupId, boolean privateLayout, long layoutId, 659 java.lang.String typeSettings) throws RemoteException { 660 try { 661 com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateLayout(groupId, 662 privateLayout, layoutId, typeSettings); 663 664 return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue); 665 } 666 catch (Exception e) { 667 _log.error(e, e); 668 669 throw new RemoteException(e.getMessage()); 670 } 671 } 672 673 /** 674 * Updates the look and feel of the layout. 675 * 676 * @param groupId the primary key of the group 677 * @param privateLayout whether the layout is private to the group 678 * @param layoutId the primary key of the layout 679 * @param themeId the primary key of the layout's new theme 680 * @param colorSchemeId the primary key of the layout's new color scheme 681 * @param css the layout's new CSS 682 * @param wapTheme whether the theme is for WAP browsers 683 * @return the updated layout 684 * @throws PortalException if a matching layout could not be found, or if 685 the user did not have permission to update the layout and 686 permission to apply the theme 687 * @throws SystemException if a system exception occurred 688 */ 689 public static com.liferay.portal.model.LayoutSoap updateLookAndFeel( 690 long groupId, boolean privateLayout, long layoutId, 691 java.lang.String themeId, java.lang.String colorSchemeId, 692 java.lang.String css, boolean wapTheme) throws RemoteException { 693 try { 694 com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateLookAndFeel(groupId, 695 privateLayout, layoutId, themeId, colorSchemeId, css, 696 wapTheme); 697 698 return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue); 699 } 700 catch (Exception e) { 701 _log.error(e, e); 702 703 throw new RemoteException(e.getMessage()); 704 } 705 } 706 707 /** 708 * Updates the name of the layout matching the group, layout ID, and 709 * privacy. 710 * 711 * @param groupId the primary key of the group 712 * @param privateLayout whether the layout is private to the group 713 * @param layoutId the primary key of the layout 714 * @param name the layout's new name 715 * @param languageId the primary key of the language. For more information 716 see {@link java.util.Locale}. 717 * @return the updated layout 718 * @throws PortalException if a matching layout could not be found, if the 719 user did not have permission to update the layout, or if the new 720 name was <code>null</code> 721 * @throws SystemException if a system exception occurred 722 */ 723 public static com.liferay.portal.model.LayoutSoap updateName(long groupId, 724 boolean privateLayout, long layoutId, java.lang.String name, 725 java.lang.String languageId) throws RemoteException { 726 try { 727 com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateName(groupId, 728 privateLayout, layoutId, name, languageId); 729 730 return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue); 731 } 732 catch (Exception e) { 733 _log.error(e, e); 734 735 throw new RemoteException(e.getMessage()); 736 } 737 } 738 739 /** 740 * Updates the name of the layout matching the primary key. 741 * 742 * @param plid the primary key of the layout 743 * @param name the name to be assigned 744 * @param languageId the primary key of the language. For more information 745 see {@link java.util.Locale}. 746 * @return the updated layout 747 * @throws PortalException if a layout with the primary key could not be 748 found, or if the user did not have permission to update the 749 layout, or if the name was <code>null</code> 750 * @throws SystemException if a system exception occurred 751 */ 752 public static com.liferay.portal.model.LayoutSoap updateName(long plid, 753 java.lang.String name, java.lang.String languageId) 754 throws RemoteException { 755 try { 756 com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateName(plid, 757 name, languageId); 758 759 return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue); 760 } 761 catch (Exception e) { 762 _log.error(e, e); 763 764 throw new RemoteException(e.getMessage()); 765 } 766 } 767 768 /** 769 * Updates the parent layout ID of the layout matching the group, layout ID, 770 * and privacy. 771 * 772 * @param groupId the primary key of the group 773 * @param privateLayout whether the layout is private to the group 774 * @param layoutId the primary key of the layout 775 * @param parentLayoutId the primary key to be assigned to the parent 776 layout 777 * @return the matching layout 778 * @throws PortalException if a valid parent layout ID to use could not be 779 found, if a matching layout could not be found, or if the user 780 did not have permission to update the layout 781 * @throws SystemException if a system exception occurred 782 */ 783 public static com.liferay.portal.model.LayoutSoap updateParentLayoutId( 784 long groupId, boolean privateLayout, long layoutId, long parentLayoutId) 785 throws RemoteException { 786 try { 787 com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateParentLayoutId(groupId, 788 privateLayout, layoutId, parentLayoutId); 789 790 return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue); 791 } 792 catch (Exception e) { 793 _log.error(e, e); 794 795 throw new RemoteException(e.getMessage()); 796 } 797 } 798 799 /** 800 * Updates the parent layout ID of the layout matching the primary key. If a 801 * layout matching the parent primary key is found, the layout ID of that 802 * layout is assigned, otherwise {@link 803 * com.liferay.portal.model.LayoutConstants#DEFAULT_PARENT_LAYOUT_ID} is 804 * assigned. 805 * 806 * @param plid the primary key of the layout 807 * @param parentPlid the primary key of the parent layout 808 * @return the layout matching the primary key 809 * @throws PortalException if a layout with the primary key could not be 810 found, if the user did not have permission to update the layout, 811 or if a valid parent layout ID to use could not be found 812 * @throws SystemException if a system exception occurred 813 */ 814 public static com.liferay.portal.model.LayoutSoap updateParentLayoutId( 815 long plid, long parentPlid) throws RemoteException { 816 try { 817 com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateParentLayoutId(plid, 818 parentPlid); 819 820 return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue); 821 } 822 catch (Exception e) { 823 _log.error(e, e); 824 825 throw new RemoteException(e.getMessage()); 826 } 827 } 828 829 /** 830 * Updates the priority of the layout matching the group, layout ID, and 831 * privacy. 832 * 833 * @param groupId the primary key of the group 834 * @param privateLayout whether the layout is private to the group 835 * @param layoutId the primary key of the layout 836 * @param priority the layout's new priority 837 * @return the updated layout 838 * @throws PortalException if a matching layout could not be found or if the 839 user did not have permission to update the layout 840 * @throws SystemException if a system exception occurred 841 */ 842 public static com.liferay.portal.model.LayoutSoap updatePriority( 843 long groupId, boolean privateLayout, long layoutId, int priority) 844 throws RemoteException { 845 try { 846 com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updatePriority(groupId, 847 privateLayout, layoutId, priority); 848 849 return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue); 850 } 851 catch (Exception e) { 852 _log.error(e, e); 853 854 throw new RemoteException(e.getMessage()); 855 } 856 } 857 858 /** 859 * Updates the priority of the layout matching the primary key. 860 * 861 * @param plid the primary key of the layout 862 * @param priority the layout's new priority 863 * @return the updated layout 864 * @throws PortalException if a layout with the primary key could not be 865 found 866 * @throws SystemException if a system exception occurred 867 */ 868 public static com.liferay.portal.model.LayoutSoap updatePriority( 869 long plid, int priority) throws RemoteException { 870 try { 871 com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updatePriority(plid, 872 priority); 873 874 return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue); 875 } 876 catch (Exception e) { 877 _log.error(e, e); 878 879 throw new RemoteException(e.getMessage()); 880 } 881 } 882 883 private static Log _log = LogFactoryUtil.getLog(LayoutServiceSoap.class); 884 }