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