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; 016 017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 018 import com.liferay.portal.kernel.util.ReferenceRegistry; 019 020 /** 021 * Provides the remote service utility for Layout. This utility wraps 022 * {@link com.liferay.portal.service.impl.LayoutServiceImpl} and is the 023 * primary access point for service operations in application layer code running 024 * on a remote server. Methods of this service are expected to have security 025 * checks based on the propagated JAAS credentials because this service can be 026 * accessed remotely. 027 * 028 * @author Brian Wing Shun Chan 029 * @see LayoutService 030 * @see com.liferay.portal.service.base.LayoutServiceBaseImpl 031 * @see com.liferay.portal.service.impl.LayoutServiceImpl 032 * @generated 033 */ 034 public class LayoutServiceUtil { 035 /* 036 * NOTE FOR DEVELOPERS: 037 * 038 * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.LayoutServiceImpl} and rerun ServiceBuilder to regenerate this class. 039 */ 040 041 /** 042 * Returns the Spring bean ID for this bean. 043 * 044 * @return the Spring bean ID for this bean 045 */ 046 public static java.lang.String getBeanIdentifier() { 047 return getService().getBeanIdentifier(); 048 } 049 050 /** 051 * Sets the Spring bean ID for this bean. 052 * 053 * @param beanIdentifier the Spring bean ID for this bean 054 */ 055 public static void setBeanIdentifier(java.lang.String beanIdentifier) { 056 getService().setBeanIdentifier(beanIdentifier); 057 } 058 059 /** 060 * Adds a layout with additional parameters. 061 * 062 * <p> 063 * This method handles the creation of the layout including its resources, 064 * metadata, and internal data structures. It is not necessary to make 065 * subsequent calls to any methods to setup default groups, resources, ... 066 * etc. 067 * </p> 068 * 069 * @param groupId the primary key of the group 070 * @param privateLayout whether the layout is private to the group 071 * @param parentLayoutId the primary key of the parent layout 072 (optionally {@link 073 com.liferay.portal.model.LayoutConstants#DEFAULT_PARENT_LAYOUT_ID}) 074 * @param localeNamesMap the layout's locales and localized names 075 * @param localeTitlesMap the layout's locales and localized titles 076 * @param descriptionMap the layout's locales and localized 077 descriptions 078 * @param keywordsMap the layout's locales and localized keywords 079 * @param robotsMap the layout's locales and localized robots 080 * @param type the layout's type (optionally {@link 081 com.liferay.portal.model.LayoutConstants#TYPE_PORTLET}). The 082 possible types can be found in {@link 083 com.liferay.portal.model.LayoutConstants}. 084 * @param hidden whether the layout is hidden 085 * @param friendlyURL the layout's locales and localized friendly URLs. 086 To see how the URL is normalized when accessed, see {@link 087 com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize( 088 String)}. 089 * @param serviceContext the service context to be applied. Must set 090 the UUID for the layout. Can set the creation date, 091 modification date, and expando bridge attributes for the 092 layout. For layouts that belong to a layout set prototype, an 093 attribute named <code>layoutUpdateable</code> can be used to 094 specify whether site administrators can modify this page 095 within their site. 096 * @return the layout 097 * @throws PortalException if a group with the primary key could not be 098 found, if the group did not have permission to manage the 099 layouts involved, if layout values were invalid, or if a 100 portal exception occurred 101 * @throws SystemException if a system exception occurred 102 * @deprecated As of 6.2.0, replaced by {@link #addLayout(long, boolean, 103 long, Map, Map, Map, Map, Map, String, String, boolean, Map, 104 ServiceContext)} 105 */ 106 public static com.liferay.portal.model.Layout addLayout(long groupId, 107 boolean privateLayout, long parentLayoutId, 108 java.util.Map<java.util.Locale, java.lang.String> localeNamesMap, 109 java.util.Map<java.util.Locale, java.lang.String> localeTitlesMap, 110 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 111 java.util.Map<java.util.Locale, java.lang.String> keywordsMap, 112 java.util.Map<java.util.Locale, java.lang.String> robotsMap, 113 java.lang.String type, boolean hidden, java.lang.String friendlyURL, 114 com.liferay.portal.service.ServiceContext serviceContext) 115 throws com.liferay.portal.kernel.exception.PortalException, 116 com.liferay.portal.kernel.exception.SystemException { 117 return getService() 118 .addLayout(groupId, privateLayout, parentLayoutId, 119 localeNamesMap, localeTitlesMap, descriptionMap, keywordsMap, 120 robotsMap, type, hidden, friendlyURL, serviceContext); 121 } 122 123 /** 124 * Adds a layout with additional parameters. 125 * 126 * <p> 127 * This method handles the creation of the layout including its resources, 128 * metadata, and internal data structures. It is not necessary to make 129 * subsequent calls to any methods to setup default groups, resources, ... 130 * etc. 131 * </p> 132 * 133 * @param groupId the primary key of the group 134 * @param privateLayout whether the layout is private to the group 135 * @param parentLayoutId the primary key of the parent layout (optionally 136 {@link 137 com.liferay.portal.model.LayoutConstants#DEFAULT_PARENT_LAYOUT_ID}) 138 * @param localeNamesMap the layout's locales and localized names 139 * @param localeTitlesMap the layout's locales and localized titles 140 * @param descriptionMap the layout's locales and localized descriptions 141 * @param keywordsMap the layout's locales and localized keywords 142 * @param robotsMap the layout's locales and localized robots 143 * @param type the layout's type (optionally {@link 144 com.liferay.portal.model.LayoutConstants#TYPE_PORTLET}). The 145 possible types can be found in {@link 146 com.liferay.portal.model.LayoutConstants}. 147 * @param typeSettings the settings to load the unicode properties object. 148 See {@link com.liferay.portal.kernel.util.UnicodeProperties 149 #fastLoad(String)}. 150 * @param hidden whether the layout is hidden 151 * @param friendlyURLMap the layout's locales and localized friendly URLs. 152 To see how the URL is normalized when accessed, see {@link 153 com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize( 154 String)}. 155 * @param serviceContext the service context to be applied. Must set the 156 UUID for the layout. Can set the creation date, modification 157 date, and expando bridge attributes for the layout. For layouts 158 that belong to a layout set prototype, an attribute named 159 <code>layoutUpdateable</code> can be used to specify whether site 160 administrators can modify this page within their site. 161 * @return the layout 162 * @throws PortalException if a group with the primary key could not be 163 found, if the group did not have permission to manage the layouts 164 involved, if layout values were invalid, or if a portal exception 165 occurred 166 * @throws SystemException if a system exception occurred 167 */ 168 public static com.liferay.portal.model.Layout addLayout(long groupId, 169 boolean privateLayout, long parentLayoutId, 170 java.util.Map<java.util.Locale, java.lang.String> localeNamesMap, 171 java.util.Map<java.util.Locale, java.lang.String> localeTitlesMap, 172 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 173 java.util.Map<java.util.Locale, java.lang.String> keywordsMap, 174 java.util.Map<java.util.Locale, java.lang.String> robotsMap, 175 java.lang.String type, java.lang.String typeSettings, boolean hidden, 176 java.util.Map<java.util.Locale, java.lang.String> friendlyURLMap, 177 com.liferay.portal.service.ServiceContext serviceContext) 178 throws com.liferay.portal.kernel.exception.PortalException, 179 com.liferay.portal.kernel.exception.SystemException { 180 return getService() 181 .addLayout(groupId, privateLayout, parentLayoutId, 182 localeNamesMap, localeTitlesMap, descriptionMap, keywordsMap, 183 robotsMap, type, typeSettings, hidden, friendlyURLMap, 184 serviceContext); 185 } 186 187 /** 188 * Adds a layout with single entry maps for name, title, and description to 189 * the default locale. 190 * 191 * <p> 192 * This method handles the creation of the layout including its resources, 193 * metadata, and internal data structures. It is not necessary to make 194 * subsequent calls to any methods to setup default groups, resources, ... 195 * etc. 196 * </p> 197 * 198 * @param groupId the primary key of the group 199 * @param privateLayout whether the layout is private to the group 200 * @param parentLayoutId the primary key of the parent layout (optionally 201 {@link 202 com.liferay.portal.model.LayoutConstants#DEFAULT_PARENT_LAYOUT_ID}) 203 * @param name Map the layout's locales and localized names 204 * @param title Map the layout's locales and localized titles 205 * @param description Map the layout's locales and localized descriptions 206 * @param type the layout's type (optionally {@link 207 com.liferay.portal.model.LayoutConstants#TYPE_PORTLET}). The 208 possible types can be found in {@link 209 com.liferay.portal.model.LayoutConstants}. 210 * @param hidden whether the layout is hidden 211 * @param friendlyURL the layout's locales and localized friendly URLs. To 212 see how the URL is normalized when accessed, see {@link 213 com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize( 214 String)}. 215 * @param serviceContext the service context to be applied. Must set the 216 UUID for the layout. Can specify the creation date, modification 217 date, and expando bridge attributes for the layout. For layouts 218 that belong to a layout set prototype, an attribute named 219 <code>layoutUpdateable</code> can be used to specify whether site 220 administrators can modify this page within their site. 221 * @return the layout 222 * @throws PortalException if a group with the primary key could not be 223 found, if the group did not have permission to manage the layouts 224 involved, if layout values were invalid, or if a portal exception 225 occurred 226 * @throws SystemException if a system exception occurred 227 */ 228 public static com.liferay.portal.model.Layout addLayout(long groupId, 229 boolean privateLayout, long parentLayoutId, java.lang.String name, 230 java.lang.String title, java.lang.String description, 231 java.lang.String type, boolean hidden, java.lang.String friendlyURL, 232 com.liferay.portal.service.ServiceContext serviceContext) 233 throws com.liferay.portal.kernel.exception.PortalException, 234 com.liferay.portal.kernel.exception.SystemException { 235 return getService() 236 .addLayout(groupId, privateLayout, parentLayoutId, name, 237 title, description, type, hidden, friendlyURL, serviceContext); 238 } 239 240 public static com.liferay.portal.kernel.repository.model.FileEntry addTempFileEntry( 241 long groupId, java.lang.String fileName, 242 java.lang.String tempFolderName, java.io.InputStream inputStream, 243 java.lang.String mimeType) 244 throws com.liferay.portal.kernel.exception.PortalException, 245 com.liferay.portal.kernel.exception.SystemException { 246 return getService() 247 .addTempFileEntry(groupId, fileName, tempFolderName, 248 inputStream, mimeType); 249 } 250 251 /** 252 * Deletes the layout with the primary key, also deleting the layout's child 253 * layouts, and associated resources. 254 * 255 * @param groupId the primary key of the group 256 * @param privateLayout whether the layout is private to the group 257 * @param layoutId 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 matching layout could not be found , or if some 261 other portal exception occurred 262 * @throws SystemException if a system exception occurred 263 */ 264 public static void deleteLayout(long groupId, boolean privateLayout, 265 long layoutId, com.liferay.portal.service.ServiceContext serviceContext) 266 throws com.liferay.portal.kernel.exception.PortalException, 267 com.liferay.portal.kernel.exception.SystemException { 268 getService() 269 .deleteLayout(groupId, privateLayout, layoutId, serviceContext); 270 } 271 272 /** 273 * Deletes the layout with the plid, also deleting the layout's child 274 * layouts, and associated resources. 275 * 276 * @param plid the primary key of the layout 277 * @param serviceContext the service context to be applied 278 * @throws PortalException if the user did not have permission to delete the 279 layout, if a layout with the primary key could not be found , or 280 if some other portal exception occurred 281 * @throws SystemException if a system exception occurred 282 */ 283 public static void deleteLayout(long plid, 284 com.liferay.portal.service.ServiceContext serviceContext) 285 throws com.liferay.portal.kernel.exception.PortalException, 286 com.liferay.portal.kernel.exception.SystemException { 287 getService().deleteLayout(plid, serviceContext); 288 } 289 290 public static void deleteTempFileEntry(long groupId, 291 java.lang.String fileName, java.lang.String tempFolderName) 292 throws com.liferay.portal.kernel.exception.PortalException, 293 com.liferay.portal.kernel.exception.SystemException { 294 getService().deleteTempFileEntry(groupId, fileName, tempFolderName); 295 } 296 297 /** 298 * Exports the layouts that match the primary keys and the criteria as a 299 * byte array. 300 * 301 * @param groupId the primary key of the group 302 * @param privateLayout whether the layout is private to the group 303 * @param layoutIds the primary keys of the layouts to be exported 304 * @param parameterMap the mapping of parameters indicating which 305 information to export. For information on the keys used in the 306 map see {@link 307 com.liferay.portal.kernel.lar.PortletDataHandlerKeys}. 308 * @param startDate the export's start date 309 * @param endDate the export's end date 310 * @return the layouts as a byte array 311 * @throws PortalException if a group or any layout with the primary key 312 could not be found, if the group did not have permission to 313 manage the layouts, or if some other portal exception occurred 314 * @throws SystemException if a system exception occurred 315 */ 316 public static byte[] exportLayouts(long groupId, boolean privateLayout, 317 long[] layoutIds, 318 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 319 java.util.Date startDate, java.util.Date endDate) 320 throws com.liferay.portal.kernel.exception.PortalException, 321 com.liferay.portal.kernel.exception.SystemException { 322 return getService() 323 .exportLayouts(groupId, privateLayout, layoutIds, 324 parameterMap, startDate, endDate); 325 } 326 327 /** 328 * Exports all layouts that match the criteria as a byte array. 329 * 330 * @param groupId the primary key of the group 331 * @param privateLayout whether the layout is private to the group 332 * @param parameterMap the mapping of parameters indicating which 333 information to export. For information on the keys used in the 334 map see {@link 335 com.liferay.portal.kernel.lar.PortletDataHandlerKeys}. 336 * @param startDate the export's start date 337 * @param endDate the export's end date 338 * @return the layout as a byte array 339 * @throws PortalException if a group with the primary key could not be 340 found, if the group did not have permission to manage the 341 layouts, or if some other portal exception occurred 342 * @throws SystemException if a system exception occurred 343 */ 344 public static byte[] exportLayouts(long groupId, boolean privateLayout, 345 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 346 java.util.Date startDate, java.util.Date endDate) 347 throws com.liferay.portal.kernel.exception.PortalException, 348 com.liferay.portal.kernel.exception.SystemException { 349 return getService() 350 .exportLayouts(groupId, privateLayout, parameterMap, 351 startDate, endDate); 352 } 353 354 /** 355 * Exports all layouts that match the primary keys and criteria as a file. 356 * 357 * @param groupId the primary key of the group 358 * @param privateLayout whether the layout is private to the group 359 * @param layoutIds the primary keys of the layouts to be exported 360 (optionally <code>null</code>) 361 * @param parameterMap the mapping of parameters indicating which 362 information to export. For information on the keys used in the 363 map see {@link 364 com.liferay.portal.kernel.lar.PortletDataHandlerKeys}. 365 * @param startDate the export's start date 366 * @param endDate the export's end date 367 * @return the layouts as a File 368 * @throws PortalException if a group or any layout with the primary key 369 could not be found, it the group did not have permission to 370 manage the layouts, or if some other portal exception occurred 371 * @throws SystemException if a system exception occurred 372 */ 373 public static java.io.File exportLayoutsAsFile(long groupId, 374 boolean privateLayout, long[] layoutIds, 375 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 376 java.util.Date startDate, java.util.Date endDate) 377 throws com.liferay.portal.kernel.exception.PortalException, 378 com.liferay.portal.kernel.exception.SystemException { 379 return getService() 380 .exportLayoutsAsFile(groupId, privateLayout, layoutIds, 381 parameterMap, startDate, endDate); 382 } 383 384 public static long exportLayoutsAsFileInBackground( 385 java.lang.String taskName, long groupId, boolean privateLayout, 386 long[] layoutIds, 387 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 388 java.util.Date startDate, java.util.Date endDate, 389 java.lang.String fileName) 390 throws com.liferay.portal.kernel.exception.PortalException, 391 com.liferay.portal.kernel.exception.SystemException { 392 return getService() 393 .exportLayoutsAsFileInBackground(taskName, groupId, 394 privateLayout, layoutIds, parameterMap, startDate, endDate, fileName); 395 } 396 397 /** 398 * Exports the portlet information (categories, permissions, ... etc.) as a 399 * byte array. 400 * 401 * @param plid the primary key of the layout 402 * @param groupId the primary key of the group 403 * @param portletId the primary key of the portlet 404 * @param parameterMap the mapping of parameters indicating which 405 information to export. For information on the keys used in the 406 map see {@link 407 com.liferay.portal.kernel.lar.PortletDataHandlerKeys}. 408 * @param startDate the export's start date 409 * @param endDate the export's end date 410 * @return the portlet information as a byte array 411 * @throws PortalException if a layout, group, or portlet with the primary 412 key could not be found, if the group did not have permission to 413 manage the layouts involved, or if some other portal exception 414 occurred 415 * @throws SystemException if a system exception occurred 416 */ 417 public static byte[] exportPortletInfo(long plid, long groupId, 418 java.lang.String portletId, 419 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 420 java.util.Date startDate, java.util.Date endDate) 421 throws com.liferay.portal.kernel.exception.PortalException, 422 com.liferay.portal.kernel.exception.SystemException { 423 return getService() 424 .exportPortletInfo(plid, groupId, portletId, parameterMap, 425 startDate, endDate); 426 } 427 428 public static byte[] exportPortletInfo(long companyId, 429 java.lang.String portletId, 430 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 431 java.util.Date startDate, java.util.Date endDate) 432 throws com.liferay.portal.kernel.exception.PortalException, 433 com.liferay.portal.kernel.exception.SystemException { 434 return getService() 435 .exportPortletInfo(companyId, portletId, parameterMap, 436 startDate, endDate); 437 } 438 439 /** 440 * Exports the portlet information (categories, permissions, ... etc.) as a 441 * file. 442 * 443 * @param plid the primary key of the layout 444 * @param groupId the primary key of the group 445 * @param portletId the primary key of the portlet 446 * @param parameterMap the mapping of parameters indicating which 447 information to export. For information on the keys used in the 448 map see {@link 449 com.liferay.portal.kernel.lar.PortletDataHandlerKeys}. 450 * @param startDate the export's start date 451 * @param endDate the export's end date 452 * @return the portlet information as a file 453 * @throws PortalException if a layout, group, or portlet with the primary 454 key could not be found, it the group did not have permission to 455 manage the layouts involved, or if some other portal exception 456 occurred 457 * @throws SystemException if a system exception occurred 458 */ 459 public static java.io.File exportPortletInfoAsFile(long plid, long groupId, 460 java.lang.String portletId, 461 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 462 java.util.Date startDate, java.util.Date endDate) 463 throws com.liferay.portal.kernel.exception.PortalException, 464 com.liferay.portal.kernel.exception.SystemException { 465 return getService() 466 .exportPortletInfoAsFile(plid, groupId, portletId, 467 parameterMap, startDate, endDate); 468 } 469 470 public static java.io.File exportPortletInfoAsFile(long companyId, 471 java.lang.String portletId, 472 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 473 java.util.Date startDate, java.util.Date endDate) 474 throws com.liferay.portal.kernel.exception.PortalException, 475 com.liferay.portal.kernel.exception.SystemException { 476 return getService() 477 .exportPortletInfoAsFile(companyId, portletId, parameterMap, 478 startDate, endDate); 479 } 480 481 public static long exportPortletInfoAsFileInBackground(long userId, 482 java.lang.String taskName, java.lang.String portletId, 483 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 484 java.util.Date startDate, java.util.Date endDate, 485 java.lang.String fileName) 486 throws com.liferay.portal.kernel.exception.PortalException, 487 com.liferay.portal.kernel.exception.SystemException { 488 return getService() 489 .exportPortletInfoAsFileInBackground(userId, taskName, 490 portletId, parameterMap, startDate, endDate, fileName); 491 } 492 493 public static long exportPortletInfoAsFileInBackground( 494 java.lang.String taskName, long plid, long groupId, 495 java.lang.String portletId, 496 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 497 java.util.Date startDate, java.util.Date endDate, 498 java.lang.String fileName) 499 throws com.liferay.portal.kernel.exception.PortalException, 500 com.liferay.portal.kernel.exception.SystemException { 501 return getService() 502 .exportPortletInfoAsFileInBackground(taskName, plid, 503 groupId, portletId, parameterMap, startDate, endDate, fileName); 504 } 505 506 /** 507 * Returns all the ancestor layouts of the layout. 508 * 509 * @param plid the primary key of the layout 510 * @return the ancestor layouts of the layout 511 * @throws PortalException if a matching layout could not be found or if a 512 portal exception occurred 513 * @throws SystemException if a system exception occurred 514 */ 515 public static java.util.List<com.liferay.portal.model.Layout> getAncestorLayouts( 516 long plid) 517 throws com.liferay.portal.kernel.exception.PortalException, 518 com.liferay.portal.kernel.exception.SystemException { 519 return getService().getAncestorLayouts(plid); 520 } 521 522 /** 523 * Returns the primary key of the default layout for the group. 524 * 525 * @param groupId the primary key of the group 526 * @param scopeGroupId the primary key of the scope group. See {@link 527 com.liferay.portal.service.ServiceContext#getScopeGroupId()}. 528 * @param privateLayout whether the layout is private to the group 529 * @param portletId the primary key of the portlet 530 * @return Returns the primary key of the default layout group; {@link 531 com.liferay.portal.model.LayoutConstants#DEFAULT_PLID} otherwise 532 * @throws PortalException if a group, layout, or portlet with the primary 533 key could not be found 534 * @throws SystemException if a system exception occurred 535 */ 536 public static long getDefaultPlid(long groupId, long scopeGroupId, 537 boolean privateLayout, java.lang.String portletId) 538 throws com.liferay.portal.kernel.exception.PortalException, 539 com.liferay.portal.kernel.exception.SystemException { 540 return getService() 541 .getDefaultPlid(groupId, scopeGroupId, privateLayout, 542 portletId); 543 } 544 545 public static long getDefaultPlid(long groupId, long scopeGroupId, 546 java.lang.String portletId) 547 throws com.liferay.portal.kernel.exception.PortalException, 548 com.liferay.portal.kernel.exception.SystemException { 549 return getService().getDefaultPlid(groupId, scopeGroupId, portletId); 550 } 551 552 /** 553 * Returns the layout matching the UUID, group, and privacy. 554 * 555 * @param uuid the layout's UUID 556 * @param groupId the primary key of the group 557 * @param privateLayout whether the layout is private to the group 558 * @return the matching layout 559 * @throws PortalException if a matching layout could not be found, if the 560 user did not have permission to view the layout, or if some other 561 portal exception occurred 562 * @throws SystemException if a system exception occurred 563 */ 564 public static com.liferay.portal.model.Layout getLayoutByUuidAndGroupId( 565 java.lang.String uuid, long groupId, boolean privateLayout) 566 throws com.liferay.portal.kernel.exception.PortalException, 567 com.liferay.portal.kernel.exception.SystemException { 568 return getService() 569 .getLayoutByUuidAndGroupId(uuid, groupId, privateLayout); 570 } 571 572 /** 573 * Returns the name of the layout. 574 * 575 * @param groupId the primary key of the group 576 * @param privateLayout whether the layout is private to the group 577 * @param layoutId the primary key of the layout 578 * @param languageId the primary key of the language. For more information 579 See {@link java.util.Locale}. 580 * @return the layout's name 581 * @throws PortalException if a matching layout could not be found 582 * @throws SystemException if a system exception occurred 583 */ 584 public static java.lang.String getLayoutName(long groupId, 585 boolean privateLayout, long layoutId, java.lang.String languageId) 586 throws com.liferay.portal.kernel.exception.PortalException, 587 com.liferay.portal.kernel.exception.SystemException { 588 return getService() 589 .getLayoutName(groupId, privateLayout, layoutId, languageId); 590 } 591 592 /** 593 * Returns the layout references for all the layouts that belong to the 594 * company and belong to the portlet that matches the preferences. 595 * 596 * @param companyId the primary key of the company 597 * @param portletId the primary key of the portlet 598 * @param preferencesKey the portlet's preference key 599 * @param preferencesValue the portlet's preference value 600 * @return the layout references of the matching layouts 601 * @throws SystemException if a system exception occurred 602 */ 603 public static com.liferay.portal.model.LayoutReference[] getLayoutReferences( 604 long companyId, java.lang.String portletId, 605 java.lang.String preferencesKey, java.lang.String preferencesValue) 606 throws com.liferay.portal.kernel.exception.SystemException { 607 return getService() 608 .getLayoutReferences(companyId, portletId, preferencesKey, 609 preferencesValue); 610 } 611 612 public static java.util.List<com.liferay.portal.model.Layout> getLayouts( 613 long groupId, boolean privateLayout) 614 throws com.liferay.portal.kernel.exception.SystemException { 615 return getService().getLayouts(groupId, privateLayout); 616 } 617 618 public static java.util.List<com.liferay.portal.model.Layout> getLayouts( 619 long groupId, boolean privateLayout, long parentLayoutId) 620 throws com.liferay.portal.kernel.exception.SystemException { 621 return getService().getLayouts(groupId, privateLayout, parentLayoutId); 622 } 623 624 public static java.util.List<com.liferay.portal.model.Layout> getLayouts( 625 long groupId, boolean privateLayout, long parentLayoutId, 626 boolean incomplete, int start, int end) 627 throws com.liferay.portal.kernel.exception.PortalException, 628 com.liferay.portal.kernel.exception.SystemException { 629 return getService() 630 .getLayouts(groupId, privateLayout, parentLayoutId, 631 incomplete, start, end); 632 } 633 634 public static java.lang.String[] getTempFileEntryNames(long groupId, 635 java.lang.String tempFolderName) 636 throws com.liferay.portal.kernel.exception.PortalException, 637 com.liferay.portal.kernel.exception.SystemException { 638 return getService().getTempFileEntryNames(groupId, tempFolderName); 639 } 640 641 /** 642 * Imports the layouts from the byte array. 643 * 644 * @param groupId the primary key of the group 645 * @param privateLayout whether the layout is private to the group 646 * @param parameterMap the mapping of parameters indicating which 647 information will be imported. For information on the keys used in 648 the map see {@link 649 com.liferay.portal.kernel.lar.PortletDataHandlerKeys}. 650 * @param bytes the byte array with the data 651 * @throws PortalException if a group with the primary key could not be 652 found, if the group did not have permission to manage the 653 layouts, or if some other portal exception occurred 654 * @throws SystemException if a system exception occurred 655 * @see com.liferay.portal.lar.LayoutImporter 656 */ 657 public static void importLayouts(long groupId, boolean privateLayout, 658 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 659 byte[] bytes) 660 throws com.liferay.portal.kernel.exception.PortalException, 661 com.liferay.portal.kernel.exception.SystemException { 662 getService().importLayouts(groupId, privateLayout, parameterMap, bytes); 663 } 664 665 /** 666 * Imports the layouts from the file. 667 * 668 * @param groupId the primary key of the group 669 * @param privateLayout whether the layout is private to the group 670 * @param parameterMap the mapping of parameters indicating which 671 information will be imported. For information on the keys used in 672 the map see {@link 673 com.liferay.portal.kernel.lar.PortletDataHandlerKeys}. 674 * @param file the LAR file with the data 675 * @throws PortalException if a group with the primary key could not be 676 found, if the group did not have permission to manage the layouts 677 and publish, or if some other portal exception occurred 678 * @throws SystemException if a system exception occurred 679 * @see com.liferay.portal.lar.LayoutImporter 680 */ 681 public static void importLayouts(long groupId, boolean privateLayout, 682 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 683 java.io.File file) 684 throws com.liferay.portal.kernel.exception.PortalException, 685 com.liferay.portal.kernel.exception.SystemException { 686 getService().importLayouts(groupId, privateLayout, parameterMap, file); 687 } 688 689 /** 690 * Imports the layouts from the input stream. 691 * 692 * @param groupId the primary key of the group 693 * @param privateLayout whether the layout is private to the group 694 * @param parameterMap the mapping of parameters indicating which 695 information will be imported. For information on the keys used in 696 the map see {@link 697 com.liferay.portal.kernel.lar.PortletDataHandlerKeys}. 698 * @param is the input stream 699 * @throws PortalException if a group with the primary key could not be 700 found, if the group did not have permission to manage the 701 layouts, or if some other portal exception occurred 702 * @throws SystemException if a system exception occurred 703 * @see com.liferay.portal.lar.LayoutImporter 704 */ 705 public static void importLayouts(long groupId, boolean privateLayout, 706 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 707 java.io.InputStream is) 708 throws com.liferay.portal.kernel.exception.PortalException, 709 com.liferay.portal.kernel.exception.SystemException { 710 getService().importLayouts(groupId, privateLayout, parameterMap, is); 711 } 712 713 public static long importLayoutsInBackground(java.lang.String taskName, 714 long groupId, boolean privateLayout, 715 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 716 java.io.File file) 717 throws com.liferay.portal.kernel.exception.PortalException, 718 com.liferay.portal.kernel.exception.SystemException { 719 return getService() 720 .importLayoutsInBackground(taskName, groupId, privateLayout, 721 parameterMap, file); 722 } 723 724 public static long importLayoutsInBackground(java.lang.String taskName, 725 long groupId, boolean privateLayout, 726 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 727 java.io.InputStream inputStream) 728 throws com.liferay.portal.kernel.exception.PortalException, 729 com.liferay.portal.kernel.exception.SystemException { 730 return getService() 731 .importLayoutsInBackground(taskName, groupId, privateLayout, 732 parameterMap, inputStream); 733 } 734 735 /** 736 * Imports the portlet information (categories, permissions, ... etc.) from 737 * the file. 738 * 739 * @param plid the primary key of the layout 740 * @param groupId the primary key of the group 741 * @param portletId the primary key of the portlet 742 * @param parameterMap the mapping of parameters indicating which 743 information will be imported. For information on the keys used in 744 the map see {@link 745 com.liferay.portal.kernel.lar.PortletDataHandlerKeys}. 746 * @param file the LAR file with the data 747 * @throws PortalException if a group, layout, or portlet with the primary 748 key could not be found, or if the group did not have permission 749 to manage the layouts 750 * @throws SystemException if a system exception occurred 751 */ 752 public static void importPortletInfo(long plid, long groupId, 753 java.lang.String portletId, 754 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 755 java.io.File file) 756 throws com.liferay.portal.kernel.exception.PortalException, 757 com.liferay.portal.kernel.exception.SystemException { 758 getService() 759 .importPortletInfo(plid, groupId, portletId, parameterMap, file); 760 } 761 762 /** 763 * Imports the portlet information (categories, permissions, ... etc.) from 764 * the input stream. 765 * 766 * @param plid the primary key of the layout 767 * @param groupId the primary key of the group 768 * @param portletId the primary key of the portlet 769 * @param parameterMap the mapping of parameters indicating which 770 information will be imported. For information on the keys used in 771 the map see {@link 772 com.liferay.portal.kernel.lar.PortletDataHandlerKeys}. 773 * @param is the input stream 774 * @throws PortalException if a group, portlet, or layout with the primary 775 key could not be found or if the group did not have permission to 776 manage the layouts 777 * @throws SystemException if a system exception occurred 778 */ 779 public static void importPortletInfo(long plid, long groupId, 780 java.lang.String portletId, 781 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 782 java.io.InputStream is) 783 throws com.liferay.portal.kernel.exception.PortalException, 784 com.liferay.portal.kernel.exception.SystemException { 785 getService() 786 .importPortletInfo(plid, groupId, portletId, parameterMap, is); 787 } 788 789 public static long importPortletInfoInBackground( 790 java.lang.String taskName, long plid, long groupId, 791 java.lang.String portletId, 792 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 793 java.io.File file) 794 throws com.liferay.portal.kernel.exception.PortalException, 795 com.liferay.portal.kernel.exception.SystemException { 796 return getService() 797 .importPortletInfoInBackground(taskName, plid, groupId, 798 portletId, parameterMap, file); 799 } 800 801 public static long importPortletInfoInBackground( 802 java.lang.String taskName, long plid, long groupId, 803 java.lang.String portletId, 804 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 805 java.io.InputStream is) 806 throws com.liferay.portal.kernel.exception.PortalException, 807 com.liferay.portal.kernel.exception.SystemException { 808 return getService() 809 .importPortletInfoInBackground(taskName, plid, groupId, 810 portletId, parameterMap, is); 811 } 812 813 /** 814 * Schedules a range of layouts to be published. 815 * 816 * @param sourceGroupId the primary key of the source group 817 * @param targetGroupId the primary key of the target group 818 * @param privateLayout whether the layout is private to the group 819 * @param layoutIdMap the layouts considered for publishing, specified by 820 the layout IDs and booleans indicating whether they have children 821 * @param parameterMap the mapping of parameters indicating which 822 information will be used. See {@link 823 com.liferay.portal.kernel.lar.PortletDataHandlerKeys} 824 * @param scope the scope of the pages. It can be <code>all-pages</code> or 825 <code>selected-pages</code>. 826 * @param startDate the start date 827 * @param endDate the end date 828 * @param groupName the group name (optionally {@link 829 com.liferay.portal.kernel.messaging.DestinationNames#LAYOUTS_LOCAL_PUBLISHER}). 830 See {@link com.liferay.portal.kernel.messaging.DestinationNames}. 831 * @param cronText the cron text. See {@link 832 com.liferay.portal.kernel.cal.RecurrenceSerializer #toCronText} 833 * @param schedulerStartDate the scheduler start date 834 * @param schedulerEndDate the scheduler end date 835 * @param description the scheduler description 836 * @throws PortalException if the group did not have permission to manage 837 and publish 838 * @throws SystemException if a system exception occurred 839 */ 840 public static void schedulePublishToLive(long sourceGroupId, 841 long targetGroupId, boolean privateLayout, 842 java.util.Map<java.lang.Long, java.lang.Boolean> layoutIdMap, 843 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 844 java.lang.String scope, java.util.Date startDate, 845 java.util.Date endDate, java.lang.String groupName, 846 java.lang.String cronText, java.util.Date schedulerStartDate, 847 java.util.Date schedulerEndDate, java.lang.String description) 848 throws com.liferay.portal.kernel.exception.PortalException, 849 com.liferay.portal.kernel.exception.SystemException { 850 getService() 851 .schedulePublishToLive(sourceGroupId, targetGroupId, privateLayout, 852 layoutIdMap, parameterMap, scope, startDate, endDate, groupName, 853 cronText, schedulerStartDate, schedulerEndDate, description); 854 } 855 856 /** 857 * Schedules a range of layouts to be stored. 858 * 859 * @param sourceGroupId the primary key of the source group 860 * @param privateLayout whether the layout is private to the group 861 * @param layoutIdMap the layouts considered for publishing, specified by 862 the layout IDs and booleans indicating whether they have children 863 * @param parameterMap the mapping of parameters indicating which 864 information will be used. See {@link 865 com.liferay.portal.kernel.lar.PortletDataHandlerKeys} 866 * @param remoteAddress the remote address 867 * @param remotePort the remote port 868 * @param remotePathContext the remote path context 869 * @param secureConnection whether the connection is secure 870 * @param remoteGroupId the primary key of the remote group 871 * @param remotePrivateLayout whether remote group's layout is private 872 * @param startDate the start date 873 * @param endDate the end date 874 * @param groupName the group name. Optionally {@link 875 com.liferay.portal.kernel.messaging.DestinationNames#LAYOUTS_LOCAL_PUBLISHER}). 876 See {@link com.liferay.portal.kernel.messaging.DestinationNames}. 877 * @param cronText the cron text. See {@link 878 com.liferay.portal.kernel.cal.RecurrenceSerializer #toCronText} 879 * @param schedulerStartDate the scheduler start date 880 * @param schedulerEndDate the scheduler end date 881 * @param description the scheduler description 882 * @throws PortalException if a group with the source group primary key was 883 not found or if the group did not have permission to publish 884 * @throws SystemException if a system exception occurred 885 */ 886 public static void schedulePublishToRemote(long sourceGroupId, 887 boolean privateLayout, 888 java.util.Map<java.lang.Long, java.lang.Boolean> layoutIdMap, 889 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 890 java.lang.String remoteAddress, int remotePort, 891 java.lang.String remotePathContext, boolean secureConnection, 892 long remoteGroupId, boolean remotePrivateLayout, 893 java.util.Date startDate, java.util.Date endDate, 894 java.lang.String groupName, java.lang.String cronText, 895 java.util.Date schedulerStartDate, java.util.Date schedulerEndDate, 896 java.lang.String description) 897 throws com.liferay.portal.kernel.exception.PortalException, 898 com.liferay.portal.kernel.exception.SystemException { 899 getService() 900 .schedulePublishToRemote(sourceGroupId, privateLayout, layoutIdMap, 901 parameterMap, remoteAddress, remotePort, remotePathContext, 902 secureConnection, remoteGroupId, remotePrivateLayout, startDate, 903 endDate, groupName, cronText, schedulerStartDate, schedulerEndDate, 904 description); 905 } 906 907 /** 908 * Sets the layouts for the group, replacing and prioritizing all layouts of 909 * the parent layout. 910 * 911 * @param groupId the primary key of the group 912 * @param privateLayout whether the layout is private to the group 913 * @param parentLayoutId the primary key of the parent layout 914 * @param layoutIds the primary keys of the layouts 915 * @param serviceContext the service context to be applied 916 * @throws PortalException if a group or layout with the primary key could 917 not be found, if the group did not have permission to manage the 918 layouts, if no layouts were specified, if the first layout was 919 not page-able, if the first layout was hidden, or if some other 920 portal exception occurred 921 * @throws SystemException if a system exception occurred 922 */ 923 public static void setLayouts(long groupId, boolean privateLayout, 924 long parentLayoutId, long[] layoutIds, 925 com.liferay.portal.service.ServiceContext serviceContext) 926 throws com.liferay.portal.kernel.exception.PortalException, 927 com.liferay.portal.kernel.exception.SystemException { 928 getService() 929 .setLayouts(groupId, privateLayout, parentLayoutId, layoutIds, 930 serviceContext); 931 } 932 933 /** 934 * Deletes the job from the scheduler's queue. 935 * 936 * @param groupId the primary key of the group 937 * @param jobName the job name 938 * @param groupName the group name (optionally {@link 939 com.liferay.portal.kernel.messaging.DestinationNames#LAYOUTS_LOCAL_PUBLISHER}). 940 See {@link com.liferay.portal.kernel.messaging.DestinationNames}. 941 * @throws PortalException if the group did not permission to manage staging 942 and publish 943 * @throws SystemException if a system exception occurred 944 */ 945 public static void unschedulePublishToLive(long groupId, 946 java.lang.String jobName, java.lang.String groupName) 947 throws com.liferay.portal.kernel.exception.PortalException, 948 com.liferay.portal.kernel.exception.SystemException { 949 getService().unschedulePublishToLive(groupId, jobName, groupName); 950 } 951 952 /** 953 * Deletes the job from the scheduler's persistent queue. 954 * 955 * @param groupId the primary key of the group 956 * @param jobName the job name 957 * @param groupName the group name (optionally {@link 958 com.liferay.portal.kernel.messaging.DestinationNames#LAYOUTS_LOCAL_PUBLISHER}). 959 See {@link com.liferay.portal.kernel.messaging.DestinationNames}. 960 * @throws PortalException if a group with the primary key could not be 961 found or if the group did not have permission to publish 962 * @throws SystemException if a system exception occurred 963 */ 964 public static void unschedulePublishToRemote(long groupId, 965 java.lang.String jobName, java.lang.String groupName) 966 throws com.liferay.portal.kernel.exception.PortalException, 967 com.liferay.portal.kernel.exception.SystemException { 968 getService().unschedulePublishToRemote(groupId, jobName, groupName); 969 } 970 971 /** 972 * Updates the layout with additional parameters. 973 * 974 * @param groupId the primary key of the group 975 * @param privateLayout whether the layout is private to the group 976 * @param layoutId the primary key of the layout 977 * @param parentLayoutId the primary key of the layout's new parent layout 978 * @param localeNamesMap the layout's locales and localized names 979 * @param localeTitlesMap the layout's locales and localized titles 980 * @param descriptionMap the locales and localized descriptions to merge 981 (optionally <code>null</code>) 982 * @param keywordsMap the locales and localized keywords to merge 983 (optionally <code>null</code>) 984 * @param robotsMap the locales and localized robots to merge (optionally 985 <code>null</code>) 986 * @param type the layout's new type (optionally {@link 987 com.liferay.portal.model.LayoutConstants#TYPE_PORTLET}) 988 * @param hidden whether the layout is hidden 989 * @param friendlyURLMap the layout's locales and localized friendly URLs. 990 To see how the URL is normalized when accessed see {@link 991 com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize( 992 String)}. 993 * @param iconImage whether the icon image will be updated 994 * @param iconBytes the byte array of the layout's new icon image 995 * @param serviceContext the service context to be applied. Can set the 996 modification date and expando bridge attributes for the layout. 997 * @return the updated layout 998 * @throws PortalException if a group or layout with the primary key could 999 not be found, if the user did not have permission to update the 1000 layout, if a unique friendly URL could not be generated, if a 1001 valid parent layout ID to use could not be found, or if the 1002 layout parameters were invalid 1003 * @throws SystemException if a system exception occurred 1004 */ 1005 public static com.liferay.portal.model.Layout updateLayout(long groupId, 1006 boolean privateLayout, long layoutId, long parentLayoutId, 1007 java.util.Map<java.util.Locale, java.lang.String> localeNamesMap, 1008 java.util.Map<java.util.Locale, java.lang.String> localeTitlesMap, 1009 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 1010 java.util.Map<java.util.Locale, java.lang.String> keywordsMap, 1011 java.util.Map<java.util.Locale, java.lang.String> robotsMap, 1012 java.lang.String type, boolean hidden, 1013 java.util.Map<java.util.Locale, java.lang.String> friendlyURLMap, 1014 java.lang.Boolean iconImage, byte[] iconBytes, 1015 com.liferay.portal.service.ServiceContext serviceContext) 1016 throws com.liferay.portal.kernel.exception.PortalException, 1017 com.liferay.portal.kernel.exception.SystemException { 1018 return getService() 1019 .updateLayout(groupId, privateLayout, layoutId, 1020 parentLayoutId, localeNamesMap, localeTitlesMap, descriptionMap, 1021 keywordsMap, robotsMap, type, hidden, friendlyURLMap, iconImage, 1022 iconBytes, serviceContext); 1023 } 1024 1025 /** 1026 * Updates the layout with additional parameters. 1027 * 1028 * @param groupId the primary key of the group 1029 * @param privateLayout whether the layout is private to the group 1030 * @param layoutId the primary key of the layout 1031 * @param parentLayoutId the primary key of the layout's new parent 1032 layout 1033 * @param localeNamesMap the layout's locales and localized names 1034 * @param localeTitlesMap the layout's locales and localized titles 1035 * @param descriptionMap the locales and localized descriptions to 1036 merge (optionally <code>null</code>) 1037 * @param keywordsMap the locales and localized keywords to merge 1038 (optionally <code>null</code>) 1039 * @param robotsMap the locales and localized robots to merge 1040 (optionally <code>null</code>) 1041 * @param type the layout's new type (optionally {@link 1042 com.liferay.portal.model.LayoutConstants#TYPE_PORTLET}) 1043 * @param hidden whether the layout is hidden 1044 * @param friendlyURL the layout's locales and new friendly URLs. To 1045 see how the URL is normalized when accessed, see {@link 1046 com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize( 1047 String)}. 1048 * @param iconImage whether the icon image will be updated 1049 * @param iconBytes the byte array of the layout's new icon image 1050 * @param serviceContext the service context to be applied. Can set the 1051 modification date and expando bridge attributes for the 1052 layout. 1053 * @return the updated layout 1054 * @throws PortalException if a group or layout with the primary key 1055 could not be found, if the user did not have permission to 1056 update the layout, if a unique friendly URL could not be 1057 generated, if a valid parent layout ID to use could not be 1058 found, or if the layout parameters were invalid 1059 * @throws SystemException if a system exception occurred 1060 * @deprecated As of 6.2.0, replaced by {@link #updateLayout(long, boolean, 1061 long, long, Map, Map, Map, Map, Map, String, boolean, Map, 1062 Boolean, byte[], ServiceContext)} 1063 */ 1064 public static com.liferay.portal.model.Layout updateLayout(long groupId, 1065 boolean privateLayout, long layoutId, long parentLayoutId, 1066 java.util.Map<java.util.Locale, java.lang.String> localeNamesMap, 1067 java.util.Map<java.util.Locale, java.lang.String> localeTitlesMap, 1068 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 1069 java.util.Map<java.util.Locale, java.lang.String> keywordsMap, 1070 java.util.Map<java.util.Locale, java.lang.String> robotsMap, 1071 java.lang.String type, boolean hidden, java.lang.String friendlyURL, 1072 java.lang.Boolean iconImage, byte[] iconBytes, 1073 com.liferay.portal.service.ServiceContext serviceContext) 1074 throws com.liferay.portal.kernel.exception.PortalException, 1075 com.liferay.portal.kernel.exception.SystemException { 1076 return getService() 1077 .updateLayout(groupId, privateLayout, layoutId, 1078 parentLayoutId, localeNamesMap, localeTitlesMap, descriptionMap, 1079 keywordsMap, robotsMap, type, hidden, friendlyURL, iconImage, 1080 iconBytes, serviceContext); 1081 } 1082 1083 /** 1084 * Updates the layout replacing its type settings. 1085 * 1086 * @param groupId the primary key of the group 1087 * @param privateLayout whether the layout is private to the group 1088 * @param layoutId the primary key of the layout 1089 * @param typeSettings the settings to load the unicode properties object. 1090 See {@link com.liferay.portal.kernel.util.UnicodeProperties 1091 #fastLoad(String)}. 1092 * @return the updated layout 1093 * @throws PortalException if a matching layout could not be found or if the 1094 user did not have permission to update the layout 1095 * @throws SystemException if a system exception occurred 1096 */ 1097 public static com.liferay.portal.model.Layout updateLayout(long groupId, 1098 boolean privateLayout, long layoutId, java.lang.String typeSettings) 1099 throws com.liferay.portal.kernel.exception.PortalException, 1100 com.liferay.portal.kernel.exception.SystemException { 1101 return getService() 1102 .updateLayout(groupId, privateLayout, layoutId, typeSettings); 1103 } 1104 1105 /** 1106 * Updates the look and feel of the layout. 1107 * 1108 * @param groupId the primary key of the group 1109 * @param privateLayout whether the layout is private to the group 1110 * @param layoutId the primary key of the layout 1111 * @param themeId the primary key of the layout's new theme 1112 * @param colorSchemeId the primary key of the layout's new color scheme 1113 * @param css the layout's new CSS 1114 * @param wapTheme whether the theme is for WAP browsers 1115 * @return the updated layout 1116 * @throws PortalException if a matching layout could not be found, or if 1117 the user did not have permission to update the layout and 1118 permission to apply the theme 1119 * @throws SystemException if a system exception occurred 1120 */ 1121 public static com.liferay.portal.model.Layout updateLookAndFeel( 1122 long groupId, boolean privateLayout, long layoutId, 1123 java.lang.String themeId, java.lang.String colorSchemeId, 1124 java.lang.String css, boolean wapTheme) 1125 throws com.liferay.portal.kernel.exception.PortalException, 1126 com.liferay.portal.kernel.exception.SystemException { 1127 return getService() 1128 .updateLookAndFeel(groupId, privateLayout, layoutId, 1129 themeId, colorSchemeId, css, wapTheme); 1130 } 1131 1132 /** 1133 * Updates the name of the layout matching the group, layout ID, and 1134 * privacy. 1135 * 1136 * @param groupId the primary key of the group 1137 * @param privateLayout whether the layout is private to the group 1138 * @param layoutId the primary key of the layout 1139 * @param name the layout's new name 1140 * @param languageId the primary key of the language. For more information 1141 see {@link java.util.Locale}. 1142 * @return the updated layout 1143 * @throws PortalException if a matching layout could not be found, if the 1144 user did not have permission to update the layout, or if the new 1145 name was <code>null</code> 1146 * @throws SystemException if a system exception occurred 1147 */ 1148 public static com.liferay.portal.model.Layout updateName(long groupId, 1149 boolean privateLayout, long layoutId, java.lang.String name, 1150 java.lang.String languageId) 1151 throws com.liferay.portal.kernel.exception.PortalException, 1152 com.liferay.portal.kernel.exception.SystemException { 1153 return getService() 1154 .updateName(groupId, privateLayout, layoutId, name, 1155 languageId); 1156 } 1157 1158 /** 1159 * Updates the name of the layout matching the primary key. 1160 * 1161 * @param plid the primary key of the layout 1162 * @param name the name to be assigned 1163 * @param languageId the primary key of the language. For more information 1164 see {@link java.util.Locale}. 1165 * @return the updated layout 1166 * @throws PortalException if a layout with the primary key could not be 1167 found, or if the user did not have permission to update the 1168 layout, or if the name was <code>null</code> 1169 * @throws SystemException if a system exception occurred 1170 */ 1171 public static com.liferay.portal.model.Layout updateName(long plid, 1172 java.lang.String name, java.lang.String languageId) 1173 throws com.liferay.portal.kernel.exception.PortalException, 1174 com.liferay.portal.kernel.exception.SystemException { 1175 return getService().updateName(plid, name, languageId); 1176 } 1177 1178 /** 1179 * Updates the parent layout ID of the layout matching the group, layout ID, 1180 * and privacy. 1181 * 1182 * @param groupId the primary key of the group 1183 * @param privateLayout whether the layout is private to the group 1184 * @param layoutId the primary key of the layout 1185 * @param parentLayoutId the primary key to be assigned to the parent 1186 layout 1187 * @return the matching layout 1188 * @throws PortalException if a valid parent layout ID to use could not be 1189 found, if a matching layout could not be found, or if the user 1190 did not have permission to update the layout 1191 * @throws SystemException if a system exception occurred 1192 */ 1193 public static com.liferay.portal.model.Layout updateParentLayoutId( 1194 long groupId, boolean privateLayout, long layoutId, long parentLayoutId) 1195 throws com.liferay.portal.kernel.exception.PortalException, 1196 com.liferay.portal.kernel.exception.SystemException { 1197 return getService() 1198 .updateParentLayoutId(groupId, privateLayout, layoutId, 1199 parentLayoutId); 1200 } 1201 1202 /** 1203 * Updates the parent layout ID of the layout matching the primary key. If a 1204 * layout matching the parent primary key is found, the layout ID of that 1205 * layout is assigned, otherwise {@link 1206 * com.liferay.portal.model.LayoutConstants#DEFAULT_PARENT_LAYOUT_ID} is 1207 * assigned. 1208 * 1209 * @param plid the primary key of the layout 1210 * @param parentPlid the primary key of the parent layout 1211 * @return the layout matching the primary key 1212 * @throws PortalException if a layout with the primary key could not be 1213 found, if the user did not have permission to update the layout, 1214 or if a valid parent layout ID to use could not be found 1215 * @throws SystemException if a system exception occurred 1216 */ 1217 public static com.liferay.portal.model.Layout updateParentLayoutId( 1218 long plid, long parentPlid) 1219 throws com.liferay.portal.kernel.exception.PortalException, 1220 com.liferay.portal.kernel.exception.SystemException { 1221 return getService().updateParentLayoutId(plid, parentPlid); 1222 } 1223 1224 /** 1225 * Updates the priority of the layout matching the group, layout ID, and 1226 * privacy. 1227 * 1228 * @param groupId the primary key of the group 1229 * @param privateLayout whether the layout is private to the group 1230 * @param layoutId the primary key of the layout 1231 * @param priority the layout's new priority 1232 * @return the updated layout 1233 * @throws PortalException if a matching layout could not be found or if the 1234 user did not have permission to update the layout 1235 * @throws SystemException if a system exception occurred 1236 */ 1237 public static com.liferay.portal.model.Layout updatePriority(long groupId, 1238 boolean privateLayout, long layoutId, int priority) 1239 throws com.liferay.portal.kernel.exception.PortalException, 1240 com.liferay.portal.kernel.exception.SystemException { 1241 return getService() 1242 .updatePriority(groupId, privateLayout, layoutId, priority); 1243 } 1244 1245 /** 1246 * Updates the priority of the layout matching the primary key. 1247 * 1248 * @param plid the primary key of the layout 1249 * @param priority the layout's new priority 1250 * @return the updated layout 1251 * @throws PortalException if a layout with the primary key could not be 1252 found 1253 * @throws SystemException if a system exception occurred 1254 */ 1255 public static com.liferay.portal.model.Layout updatePriority(long plid, 1256 int priority) 1257 throws com.liferay.portal.kernel.exception.PortalException, 1258 com.liferay.portal.kernel.exception.SystemException { 1259 return getService().updatePriority(plid, priority); 1260 } 1261 1262 public static com.liferay.portal.kernel.lar.MissingReferences validateImportLayoutsFile( 1263 long groupId, boolean privateLayout, 1264 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 1265 java.io.File file) 1266 throws com.liferay.portal.kernel.exception.PortalException, 1267 com.liferay.portal.kernel.exception.SystemException { 1268 return getService() 1269 .validateImportLayoutsFile(groupId, privateLayout, 1270 parameterMap, file); 1271 } 1272 1273 public static com.liferay.portal.kernel.lar.MissingReferences validateImportLayoutsFile( 1274 long groupId, boolean privateLayout, 1275 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 1276 java.io.InputStream inputStream) 1277 throws com.liferay.portal.kernel.exception.PortalException, 1278 com.liferay.portal.kernel.exception.SystemException { 1279 return getService() 1280 .validateImportLayoutsFile(groupId, privateLayout, 1281 parameterMap, inputStream); 1282 } 1283 1284 public static com.liferay.portal.kernel.lar.MissingReferences validateImportPortletInfo( 1285 long plid, long groupId, java.lang.String portletId, 1286 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 1287 java.io.File file) 1288 throws com.liferay.portal.kernel.exception.PortalException, 1289 com.liferay.portal.kernel.exception.SystemException { 1290 return getService() 1291 .validateImportPortletInfo(plid, groupId, portletId, 1292 parameterMap, file); 1293 } 1294 1295 public static com.liferay.portal.kernel.lar.MissingReferences validateImportPortletInfo( 1296 long plid, long groupId, java.lang.String portletId, 1297 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 1298 java.io.InputStream inputStream) 1299 throws com.liferay.portal.kernel.exception.PortalException, 1300 com.liferay.portal.kernel.exception.SystemException { 1301 return getService() 1302 .validateImportPortletInfo(plid, groupId, portletId, 1303 parameterMap, inputStream); 1304 } 1305 1306 public static LayoutService getService() { 1307 if (_service == null) { 1308 _service = (LayoutService)PortalBeanLocatorUtil.locate(LayoutService.class.getName()); 1309 1310 ReferenceRegistry.registerReference(LayoutServiceUtil.class, 1311 "_service"); 1312 } 1313 1314 return _service; 1315 } 1316 1317 /** 1318 * @deprecated As of 6.2.0 1319 */ 1320 public void setService(LayoutService service) { 1321 } 1322 1323 private static LayoutService _service; 1324 }