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