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