001 /** 002 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portal.service.http; 016 017 import com.liferay.portal.kernel.log.Log; 018 import com.liferay.portal.kernel.log.LogFactoryUtil; 019 import com.liferay.portal.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. Must set the universally 107 unique identifier (UUID) for the layout. Can set the creation 108 date, modification date and the expando bridge attributes for the 109 layout. For layouts that belong to a layout set prototype, an 110 attribute named 'layoutUpdateable' can be used to specify whether 111 site 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 empty maps for descriptions, keywords, and titles , 161 * and a names map containing a mapping for the default locale as its only 162 * entry. 163 * 164 * <p> 165 * This method handles the creation of the layout including its resources, 166 * metadata, and internal data structures. It is not necessary to make 167 * subsequent calls to any methods to setup default groups, resources, ... 168 * etc. 169 * </p> 170 * 171 * @param groupId the primary key of the group 172 * @param privateLayout whether the layout is private to the group 173 * @param parentLayoutId the primary key of the parent layout (optionally 174 {@link 175 com.liferay.portal.model.LayoutConstants#DEFAULT_PARENT_LAYOUT_ID}) 176 * @param name Map the layout's locales and localized names 177 * @param title Map the layout's locales and localized titles 178 * @param description Map the layout's locales and localized descriptions 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 hidden whether the layout is hidden 184 * @param friendlyURL the layout's friendly URL (optionally {@link 185 com.liferay.portal.util.PropsValues#DEFAULT_USER_PRIVATE_LAYOUT_FRIENDLY_URL} 186 or {@link 187 com.liferay.portal.util.PropsValues#DEFAULT_USER_PUBLIC_LAYOUT_FRIENDLY_URL}). 188 The default values can be overridden in 189 <code>portal-ext.properties</code> by specifying new values for 190 the corresponding properties defined in {@link 191 com.liferay.portal.util.PropsValues}. To see how the URL is 192 normalized when accessed see {@link 193 com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize( 194 String)}. 195 * @param serviceContext the service context. Must set the universally 196 unique identifier (UUID) for the layout. Can specify the creation 197 date, modification date and the expando bridge attributes for the 198 layout. For layouts that belong to a layout set prototype, an 199 attribute named 'layoutUpdateable' can be used to specify whether 200 site administrators can modify this page within their site. 201 * @return the layout 202 * @throws PortalException if a group with the primary key could not be 203 found, if the group did not have permission to manage the layouts 204 involved, or if layout values were invalid 205 * @throws SystemException if a system exception occurred 206 */ 207 public static com.liferay.portal.model.LayoutSoap addLayout(long groupId, 208 boolean privateLayout, long parentLayoutId, java.lang.String name, 209 java.lang.String title, java.lang.String description, 210 java.lang.String type, boolean hidden, java.lang.String friendlyURL, 211 com.liferay.portal.service.ServiceContext serviceContext) 212 throws RemoteException { 213 try { 214 com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.addLayout(groupId, 215 privateLayout, parentLayoutId, name, title, description, 216 type, hidden, friendlyURL, serviceContext); 217 218 return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue); 219 } 220 catch (Exception e) { 221 _log.error(e, e); 222 223 throw new RemoteException(e.getMessage()); 224 } 225 } 226 227 /** 228 * Deletes the layout with the primary key, also deleting the layout's child 229 * layouts, and associated resources. 230 * 231 * @param groupId the primary key of the group 232 * @param privateLayout whether the layout is private to the group 233 * @param layoutId the primary key of the layout 234 * @param serviceContext the service context 235 * @throws PortalException if the user did not have permission to delete the 236 layout, if a matching layout could not be found , or if some 237 other portal exception occurred 238 * @throws SystemException if a system exception occurred 239 */ 240 public static void deleteLayout(long groupId, boolean privateLayout, 241 long layoutId, com.liferay.portal.service.ServiceContext serviceContext) 242 throws RemoteException { 243 try { 244 LayoutServiceUtil.deleteLayout(groupId, privateLayout, layoutId, 245 serviceContext); 246 } 247 catch (Exception e) { 248 _log.error(e, e); 249 250 throw new RemoteException(e.getMessage()); 251 } 252 } 253 254 /** 255 * Deletes the layout with the plid, also deleting the layout's child 256 * layouts, and associated resources. 257 * 258 * @param plid the primary key of the layout 259 * @param serviceContext the service context 260 * @throws PortalException if the user did not have permission to delete the 261 layout, if a layout with the primary key could not be found , or 262 if some other portal exception occurred 263 * @throws SystemException if a system exception occurred 264 */ 265 public static void deleteLayout(long plid, 266 com.liferay.portal.service.ServiceContext serviceContext) 267 throws RemoteException { 268 try { 269 LayoutServiceUtil.deleteLayout(plid, serviceContext); 270 } 271 catch (Exception e) { 272 _log.error(e, e); 273 274 throw new RemoteException(e.getMessage()); 275 } 276 } 277 278 /** 279 * Returns the primary key of the default layout for the group. 280 * 281 * @param groupId the primary key of the group 282 * @param scopeGroupId the primary key of the scope group. See {@link 283 com.liferay.portal.service.ServiceContext#getScopeGroupId()}. 284 * @param privateLayout whether the layout is private to the group 285 * @param portletId the primary key of the portlet 286 * @return Returns the primary key of the default layout group; {@link 287 com.liferay.portal.model.LayoutConstants#DEFAULT_PLID} otherwise 288 * @throws PortalException if a group, layout, or portlet with the primary 289 key could not be found 290 * @throws SystemException if a system exception occurred 291 */ 292 public static long getDefaultPlid(long groupId, long scopeGroupId, 293 boolean privateLayout, java.lang.String portletId) 294 throws RemoteException { 295 try { 296 long returnValue = LayoutServiceUtil.getDefaultPlid(groupId, 297 scopeGroupId, privateLayout, portletId); 298 299 return returnValue; 300 } 301 catch (Exception e) { 302 _log.error(e, e); 303 304 throw new RemoteException(e.getMessage()); 305 } 306 } 307 308 /** 309 * Returns the name of the layout. 310 * 311 * @param groupId the primary key of the group 312 * @param privateLayout whether the layout is private to the group 313 * @param layoutId the primary key of the layout 314 * @param languageId the primary key of the language. For more information 315 See {@link java.util.Locale}. 316 * @return the layout's name 317 * @throws PortalException if a matching layout could not be found 318 * @throws SystemException if a system exception occurred 319 */ 320 public static java.lang.String getLayoutName(long groupId, 321 boolean privateLayout, long layoutId, java.lang.String languageId) 322 throws RemoteException { 323 try { 324 java.lang.String returnValue = LayoutServiceUtil.getLayoutName(groupId, 325 privateLayout, layoutId, languageId); 326 327 return returnValue; 328 } 329 catch (Exception e) { 330 _log.error(e, e); 331 332 throw new RemoteException(e.getMessage()); 333 } 334 } 335 336 /** 337 * Returns the layout references for all the layouts that belong to the 338 * company and belong to the portlet that matches the preferences. 339 * 340 * @param companyId the primary key of the company 341 * @param portletId the primary key of the portlet 342 * @param preferencesKey the portlet's preference key 343 * @param preferencesValue the portlet's preference value 344 * @return the layout references of the matching layouts 345 * @throws SystemException if a system exception occurred 346 */ 347 public static com.liferay.portal.model.LayoutReference[] getLayoutReferences( 348 long companyId, java.lang.String portletId, 349 java.lang.String preferencesKey, java.lang.String preferencesValue) 350 throws RemoteException { 351 try { 352 com.liferay.portal.model.LayoutReference[] returnValue = LayoutServiceUtil.getLayoutReferences(companyId, 353 portletId, preferencesKey, preferencesValue); 354 355 return returnValue; 356 } 357 catch (Exception e) { 358 _log.error(e, e); 359 360 throw new RemoteException(e.getMessage()); 361 } 362 } 363 364 public static com.liferay.portal.model.LayoutSoap[] getLayouts( 365 long groupId, boolean privateLayout) throws RemoteException { 366 try { 367 java.util.List<com.liferay.portal.model.Layout> returnValue = LayoutServiceUtil.getLayouts(groupId, 368 privateLayout); 369 370 return com.liferay.portal.model.LayoutSoap.toSoapModels(returnValue); 371 } 372 catch (Exception e) { 373 _log.error(e, e); 374 375 throw new RemoteException(e.getMessage()); 376 } 377 } 378 379 public static com.liferay.portal.model.LayoutSoap[] getLayouts( 380 long groupId, boolean privateLayout, long parentLayoutId) 381 throws RemoteException { 382 try { 383 java.util.List<com.liferay.portal.model.Layout> returnValue = LayoutServiceUtil.getLayouts(groupId, 384 privateLayout, parentLayoutId); 385 386 return com.liferay.portal.model.LayoutSoap.toSoapModels(returnValue); 387 } 388 catch (Exception e) { 389 _log.error(e, e); 390 391 throw new RemoteException(e.getMessage()); 392 } 393 } 394 395 /** 396 * Sets the layouts for the group, replacing and prioritizing all layouts of 397 * the parent layout. 398 * 399 * @param groupId the primary key of the group 400 * @param privateLayout whether the layout is private to the group 401 * @param parentLayoutId the primary key of the parent layout 402 * @param layoutIds the primary keys of the layouts 403 * @param serviceContext the service context 404 * @throws PortalException if a group or layout with the primary key could 405 not be found, if the group did not have permission to manage the 406 layouts, if no layouts were specified, if the first layout was 407 not page-able, if the first layout was hidden, or if some other 408 portal exception occurred 409 * @throws SystemException if a system exception occurred 410 */ 411 public static void setLayouts(long groupId, boolean privateLayout, 412 long parentLayoutId, long[] layoutIds, 413 com.liferay.portal.service.ServiceContext serviceContext) 414 throws RemoteException { 415 try { 416 LayoutServiceUtil.setLayouts(groupId, privateLayout, 417 parentLayoutId, layoutIds, serviceContext); 418 } 419 catch (Exception e) { 420 _log.error(e, e); 421 422 throw new RemoteException(e.getMessage()); 423 } 424 } 425 426 /** 427 * Deletes the job from the scheduler's queue. 428 * 429 * @param groupId the primary key of the group 430 * @param jobName the job name 431 * @param groupName the group name (optionally {@link 432 com.liferay.portal.kernel.messaging.DestinationNames#LAYOUTS_LOCAL_PUBLISHER}). 433 See {@link com.liferay.portal.kernel.messaging.DestinationNames}. 434 * @throws PortalException if the group did not permission to manage staging 435 and publish 436 * @throws SystemException if a system exception occurred 437 */ 438 public static void unschedulePublishToLive(long groupId, 439 java.lang.String jobName, java.lang.String groupName) 440 throws RemoteException { 441 try { 442 LayoutServiceUtil.unschedulePublishToLive(groupId, jobName, 443 groupName); 444 } 445 catch (Exception e) { 446 _log.error(e, e); 447 448 throw new RemoteException(e.getMessage()); 449 } 450 } 451 452 /** 453 * Deletes the job from the scheduler's persistent queue. 454 * 455 * @param groupId the primary key of the group 456 * @param jobName the job name 457 * @param groupName the group name (optionally {@link 458 com.liferay.portal.kernel.messaging.DestinationNames#LAYOUTS_LOCAL_PUBLISHER}). 459 See {@link com.liferay.portal.kernel.messaging.DestinationNames}. 460 * @throws PortalException if a group with the primary key could not be 461 found or if the group did not have permission to publish 462 * @throws SystemException if a system exception occurred 463 */ 464 public static void unschedulePublishToRemote(long groupId, 465 java.lang.String jobName, java.lang.String groupName) 466 throws RemoteException { 467 try { 468 LayoutServiceUtil.unschedulePublishToRemote(groupId, jobName, 469 groupName); 470 } 471 catch (Exception e) { 472 _log.error(e, e); 473 474 throw new RemoteException(e.getMessage()); 475 } 476 } 477 478 /** 479 * Updates the layout. 480 * 481 * @param groupId the primary key of the group 482 * @param privateLayout whether the layout is private to the group 483 * @param layoutId the primary key of the layout 484 * @param parentLayoutId the primary key of the layout's new parent layout 485 * @param localeNamesMap the layout's locales and localized names 486 * @param localeTitlesMap the layout's locales and localized titles 487 * @param descriptionMap the locales and localized descriptions to merge 488 (optionally <code>null</code>) 489 * @param keywordsMap the locales and localized keywords to merge 490 (optionally <code>null</code>) 491 * @param robotsMap the locales and localized robots to merge (optionally 492 <code>null</code>) 493 * @param type the layout's new type (optionally {@link 494 com.liferay.portal.model.LayoutConstants#TYPE_PORTLET}) 495 * @param hidden whether the layout is hidden 496 * @param friendlyURL the layout's new friendly URL (optionally {@link 497 com.liferay.portal.util.PropsValues#DEFAULT_USER_PRIVATE_LAYOUT_FRIENDLY_URL} 498 or {@link 499 com.liferay.portal.util.PropsValues#DEFAULT_USER_PRIVATE_LAYOUT_FRIENDLY_URL}). 500 The default values can be overridden in 501 <code>portal-ext.properties</code> by specifying new values for 502 the corresponding properties defined in {@link 503 com.liferay.portal.util.PropsValues}. To see how the URL is 504 normalized when accessed see {@link 505 com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize( 506 String)}. 507 * @param iconImage whether the icon image will be updated 508 * @param iconBytes the byte array of the layout's new icon image 509 * @param serviceContext the service context. Can set the modification date 510 and expando bridge attributes for the layout. 511 * @return the updated layout 512 * @throws PortalException if a group or layout with the primary key could 513 not be found, if the user did not have permission to update the 514 layout, if a unique friendly URL could not be generated, if a 515 valid parent layout ID to use could not be found, or if the 516 layout parameters were invalid 517 * @throws SystemException if a system exception occurred 518 */ 519 public static com.liferay.portal.model.LayoutSoap updateLayout( 520 long groupId, boolean privateLayout, long layoutId, 521 long parentLayoutId, java.lang.String[] localeNamesMapLanguageIds, 522 java.lang.String[] localeNamesMapValues, 523 java.lang.String[] localeTitlesMapLanguageIds, 524 java.lang.String[] localeTitlesMapValues, 525 java.lang.String[] descriptionMapLanguageIds, 526 java.lang.String[] descriptionMapValues, 527 java.lang.String[] keywordsMapLanguageIds, 528 java.lang.String[] keywordsMapValues, 529 java.lang.String[] robotsMapLanguageIds, 530 java.lang.String[] robotsMapValues, java.lang.String type, 531 boolean hidden, java.lang.String friendlyURL, 532 java.lang.Boolean iconImage, byte[] iconBytes, 533 com.liferay.portal.service.ServiceContext serviceContext) 534 throws RemoteException { 535 try { 536 Map<Locale, String> localeNamesMap = LocalizationUtil.getLocalizationMap(localeNamesMapLanguageIds, 537 localeNamesMapValues); 538 Map<Locale, String> localeTitlesMap = LocalizationUtil.getLocalizationMap(localeTitlesMapLanguageIds, 539 localeTitlesMapValues); 540 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds, 541 descriptionMapValues); 542 Map<Locale, String> keywordsMap = LocalizationUtil.getLocalizationMap(keywordsMapLanguageIds, 543 keywordsMapValues); 544 Map<Locale, String> robotsMap = LocalizationUtil.getLocalizationMap(robotsMapLanguageIds, 545 robotsMapValues); 546 547 com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateLayout(groupId, 548 privateLayout, layoutId, parentLayoutId, localeNamesMap, 549 localeTitlesMap, descriptionMap, keywordsMap, robotsMap, 550 type, hidden, friendlyURL, iconImage, iconBytes, 551 serviceContext); 552 553 return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue); 554 } 555 catch (Exception e) { 556 _log.error(e, e); 557 558 throw new RemoteException(e.getMessage()); 559 } 560 } 561 562 /** 563 * Updates the layout replacing its type settings. 564 * 565 * @param groupId the primary key of the group 566 * @param privateLayout whether the layout is private to the group 567 * @param layoutId the primary key of the layout 568 * @param typeSettings the settings to load the unicode properties object. 569 See {@link com.liferay.portal.kernel.util.UnicodeProperties 570 #fastLoad(String)}. 571 * @return the updated layout 572 * @throws PortalException if a matching layout could not be found or if the 573 user did not have permission to update the layout 574 * @throws SystemException if a system exception occurred 575 */ 576 public static com.liferay.portal.model.LayoutSoap updateLayout( 577 long groupId, boolean privateLayout, long layoutId, 578 java.lang.String typeSettings) throws RemoteException { 579 try { 580 com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateLayout(groupId, 581 privateLayout, layoutId, typeSettings); 582 583 return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue); 584 } 585 catch (Exception e) { 586 _log.error(e, e); 587 588 throw new RemoteException(e.getMessage()); 589 } 590 } 591 592 /** 593 * Updates the look and feel of the layout. 594 * 595 * @param groupId the primary key of the group 596 * @param privateLayout whether the layout is private to the group 597 * @param layoutId the primary key of the layout 598 * @param themeId the primary key of the layout's new theme 599 * @param colorSchemeId the primary key of the layout's new color scheme 600 * @param css the layout's new CSS 601 * @param wapTheme whether the theme is for WAP browsers 602 * @return the updated layout 603 * @throws PortalException if a matching layout could not be found, or if 604 the user did not have permission to update the layout and 605 permission to apply the theme 606 * @throws SystemException if a system exception occurred 607 */ 608 public static com.liferay.portal.model.LayoutSoap updateLookAndFeel( 609 long groupId, boolean privateLayout, long layoutId, 610 java.lang.String themeId, java.lang.String colorSchemeId, 611 java.lang.String css, boolean wapTheme) throws RemoteException { 612 try { 613 com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateLookAndFeel(groupId, 614 privateLayout, layoutId, themeId, colorSchemeId, css, 615 wapTheme); 616 617 return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue); 618 } 619 catch (Exception e) { 620 _log.error(e, e); 621 622 throw new RemoteException(e.getMessage()); 623 } 624 } 625 626 /** 627 * Updates the name of the layout matching the group, layout ID, and 628 * privacy. 629 * 630 * @param groupId the primary key of the group 631 * @param privateLayout whether the layout is private to the group 632 * @param layoutId the primary key of the layout 633 * @param name the layout's new name 634 * @param languageId the primary key of the language. For more information 635 see {@link java.util.Locale}. 636 * @return the updated layout 637 * @throws PortalException if a matching layout could not be found, if the 638 user did not have permission to update the layout, or if the new 639 name was <code>null</code> 640 * @throws SystemException if a system exception occurred 641 */ 642 public static com.liferay.portal.model.LayoutSoap updateName(long groupId, 643 boolean privateLayout, long layoutId, java.lang.String name, 644 java.lang.String languageId) throws RemoteException { 645 try { 646 com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateName(groupId, 647 privateLayout, layoutId, name, languageId); 648 649 return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue); 650 } 651 catch (Exception e) { 652 _log.error(e, e); 653 654 throw new RemoteException(e.getMessage()); 655 } 656 } 657 658 /** 659 * Updates the name of the layout matching the primary key. 660 * 661 * @param plid the primary key of the layout 662 * @param name the name to be assigned 663 * @param languageId the primary key of the language. For more information 664 see {@link java.util.Locale}. 665 * @return the updated layout 666 * @throws PortalException if a layout with the primary key could not be 667 found, or if the user did not have permission to update the 668 layout, or if the name was <code>null</code> 669 * @throws SystemException if a system exception occurred 670 */ 671 public static com.liferay.portal.model.LayoutSoap updateName(long plid, 672 java.lang.String name, java.lang.String languageId) 673 throws RemoteException { 674 try { 675 com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateName(plid, 676 name, languageId); 677 678 return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue); 679 } 680 catch (Exception e) { 681 _log.error(e, e); 682 683 throw new RemoteException(e.getMessage()); 684 } 685 } 686 687 /** 688 * Updates the parent layout ID of the layout matching the group, layout ID, 689 * and privacy. 690 * 691 * @param groupId the primary key of the group 692 * @param privateLayout whether the layout is private to the group 693 * @param layoutId the primary key of the layout 694 * @param parentLayoutId the primary key to be assigned to the parent 695 layout 696 * @return the matching layout 697 * @throws PortalException if a valid parent layout ID to use could not be 698 found, if a matching layout could not be found, or if the user 699 did not have permission to update the layout 700 * @throws SystemException if a system exception occurred 701 */ 702 public static com.liferay.portal.model.LayoutSoap updateParentLayoutId( 703 long groupId, boolean privateLayout, long layoutId, long parentLayoutId) 704 throws RemoteException { 705 try { 706 com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateParentLayoutId(groupId, 707 privateLayout, layoutId, parentLayoutId); 708 709 return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue); 710 } 711 catch (Exception e) { 712 _log.error(e, e); 713 714 throw new RemoteException(e.getMessage()); 715 } 716 } 717 718 /** 719 * Updates the parent layout ID of the layout matching the primary key. If a 720 * layout matching the parent primary key is found, the layout ID of that 721 * layout is assigned, otherwise {@link 722 * com.liferay.portal.model.LayoutConstants#DEFAULT_PARENT_LAYOUT_ID} is 723 * assigned. 724 * 725 * @param plid the primary key of the layout 726 * @param parentPlid the primary key of the parent layout 727 * @return the layout matching the primary key 728 * @throws PortalException if a layout with the primary key could not be 729 found, if the user did not have permission to update the layout, 730 or if a valid parent layout ID to use could not be found 731 * @throws SystemException if a system exception occurred 732 */ 733 public static com.liferay.portal.model.LayoutSoap updateParentLayoutId( 734 long plid, long parentPlid) throws RemoteException { 735 try { 736 com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateParentLayoutId(plid, 737 parentPlid); 738 739 return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue); 740 } 741 catch (Exception e) { 742 _log.error(e, e); 743 744 throw new RemoteException(e.getMessage()); 745 } 746 } 747 748 /** 749 * Updates the priority of the layout matching the group, layout ID, and 750 * privacy. 751 * 752 * @param groupId the primary key of the group 753 * @param privateLayout whether the layout is private to the group 754 * @param layoutId the primary key of the layout 755 * @param priority the layout's new priority 756 * @return the updated layout 757 * @throws PortalException if a matching layout could not be found or if the 758 user did not have permission to update the layout 759 * @throws SystemException if a system exception occurred 760 */ 761 public static com.liferay.portal.model.LayoutSoap updatePriority( 762 long groupId, boolean privateLayout, long layoutId, int priority) 763 throws RemoteException { 764 try { 765 com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updatePriority(groupId, 766 privateLayout, layoutId, priority); 767 768 return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue); 769 } 770 catch (Exception e) { 771 _log.error(e, e); 772 773 throw new RemoteException(e.getMessage()); 774 } 775 } 776 777 /** 778 * Updates the priority of the layout matching the primary key. 779 * 780 * @param plid the primary key of the layout 781 * @param priority the layout's new priority 782 * @return the updated layout 783 * @throws PortalException if a layout with the primary key could not be 784 found 785 * @throws SystemException if a system exception occurred 786 */ 787 public static com.liferay.portal.model.LayoutSoap updatePriority( 788 long plid, int priority) throws RemoteException { 789 try { 790 com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updatePriority(plid, 791 priority); 792 793 return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue); 794 } 795 catch (Exception e) { 796 _log.error(e, e); 797 798 throw new RemoteException(e.getMessage()); 799 } 800 } 801 802 private static Log _log = LogFactoryUtil.getLog(LayoutServiceSoap.class); 803 }