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