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.lar.PortletDataContext; 021 import com.liferay.exportimport.kernel.model.ExportImportConfiguration; 022 023 import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery; 024 import com.liferay.portal.kernel.dao.orm.DynamicQuery; 025 import com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery; 026 import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery; 027 import com.liferay.portal.kernel.dao.orm.Projection; 028 import com.liferay.portal.kernel.exception.PortalException; 029 import com.liferay.portal.kernel.exception.SystemException; 030 import com.liferay.portal.kernel.model.Group; 031 import com.liferay.portal.kernel.model.Layout; 032 import com.liferay.portal.kernel.model.LayoutReference; 033 import com.liferay.portal.kernel.model.PersistedModel; 034 import com.liferay.portal.kernel.model.SystemEventConstants; 035 import com.liferay.portal.kernel.model.User; 036 import com.liferay.portal.kernel.search.Indexable; 037 import com.liferay.portal.kernel.search.IndexableType; 038 import com.liferay.portal.kernel.systemevent.SystemEvent; 039 import com.liferay.portal.kernel.transaction.Isolation; 040 import com.liferay.portal.kernel.transaction.Propagation; 041 import com.liferay.portal.kernel.transaction.Transactional; 042 import com.liferay.portal.kernel.util.OrderByComparator; 043 044 import java.io.File; 045 import java.io.InputStream; 046 import java.io.Serializable; 047 048 import java.util.Date; 049 import java.util.List; 050 import java.util.Locale; 051 import java.util.Map; 052 053 /** 054 * Provides the local service interface for Layout. Methods of this 055 * service will not have security checks based on the propagated JAAS 056 * credentials because this service can only be accessed from within the same 057 * VM. 058 * 059 * @author Brian Wing Shun Chan 060 * @see LayoutLocalServiceUtil 061 * @see com.liferay.portal.service.base.LayoutLocalServiceBaseImpl 062 * @see com.liferay.portal.service.impl.LayoutLocalServiceImpl 063 * @generated 064 */ 065 @ProviderType 066 @Transactional(isolation = Isolation.PORTAL, rollbackFor = { 067 PortalException.class, SystemException.class}) 068 public interface LayoutLocalService extends BaseLocalService, 069 PersistedModelLocalService { 070 /* 071 * NOTE FOR DEVELOPERS: 072 * 073 * Never modify or reference this interface directly. Always use {@link LayoutLocalServiceUtil} to access the layout local service. Add custom service methods to {@link com.liferay.portal.service.impl.LayoutLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. 074 */ 075 076 /** 077 * Adds the layout to the database. Also notifies the appropriate model listeners. 078 * 079 * @param layout the layout 080 * @return the layout that was added 081 */ 082 @Indexable(type = IndexableType.REINDEX) 083 public Layout addLayout(Layout layout); 084 085 /** 086 * Adds a layout with single entry maps for name, title, and description to 087 * the default locale. 088 * 089 * <p> 090 * This method handles the creation of the layout including its resources, 091 * metadata, and internal data structures. It is not necessary to make 092 * subsequent calls to any methods to setup default groups, resources, ... 093 * etc. 094 * </p> 095 * 096 * @param userId the primary key of the user 097 * @param groupId the primary key of the group 098 * @param privateLayout whether the layout is private to the group 099 * @param parentLayoutId the primary key of the parent layout (optionally 100 {@link LayoutConstants#DEFAULT_PARENT_LAYOUT_ID}). The possible 101 values can be found in {@link LayoutConstants}. 102 * @param name the layout's name (optionally {@link 103 PropsValues#DEFAULT_USER_PRIVATE_LAYOUT_NAME} or {@link 104 PropsValues#DEFAULT_USER_PUBLIC_LAYOUT_NAME}). The default values 105 can be overridden in <code>portal-ext.properties</code> by 106 specifying new values for the corresponding properties defined in 107 {@link PropsValues} 108 * @param title the layout's title 109 * @param description the layout's description 110 * @param type the layout's type (optionally {@link 111 LayoutConstants#TYPE_PORTLET}). The possible types can be found 112 in {@link LayoutConstants}. 113 * @param hidden whether the layout is hidden 114 * @param friendlyURL the friendly URL of the layout (optionally {@link 115 PropsValues#DEFAULT_USER_PRIVATE_LAYOUT_FRIENDLY_URL} or {@link 116 PropsValues#DEFAULT_USER_PUBLIC_LAYOUT_FRIENDLY_URL}). The 117 default values can be overridden in 118 <code>portal-ext.properties</code> by specifying new values for 119 the corresponding properties defined in {@link PropsValues}. To 120 see how the URL is normalized when accessed, see {@link 121 com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize( 122 String)}. 123 * @param serviceContext the service context to be applied. Must set the 124 UUID for the layout. Can set the creation date and modification 125 date for the layout. For layouts that belong to a layout set 126 prototype, an attribute named <code>layoutUpdateable</code> can 127 be set to specify whether site administrators can modify this 128 page within their site. 129 * @return the layout 130 */ 131 public Layout addLayout(long userId, long groupId, boolean privateLayout, 132 long parentLayoutId, java.lang.String name, java.lang.String title, 133 java.lang.String description, java.lang.String type, boolean hidden, 134 java.lang.String friendlyURL, 135 com.liferay.portal.kernel.service.ServiceContext serviceContext) 136 throws PortalException; 137 138 /** 139 * Adds a layout with additional parameters. 140 * 141 * <p> 142 * This method handles the creation of the layout including its resources, 143 * metadata, and internal data structures. It is not necessary to make 144 * subsequent calls to any methods to setup default groups, resources, ... 145 * etc. 146 * </p> 147 * 148 * @param userId the primary key of the user 149 * @param groupId the primary key of the group 150 * @param privateLayout whether the layout is private to the group 151 * @param parentLayoutId the primary key of the parent layout (optionally 152 {@link LayoutConstants#DEFAULT_PARENT_LAYOUT_ID}) 153 * @param nameMap the layout's locales and localized names 154 * @param titleMap the layout's locales and localized titles 155 * @param descriptionMap the layout's locales and localized descriptions 156 * @param keywordsMap the layout's locales and localized keywords 157 * @param robotsMap the layout's locales and localized robots 158 * @param type the layout's type (optionally {@link 159 LayoutConstants#TYPE_PORTLET}). The possible types can be found 160 in {@link LayoutConstants}. 161 * @param typeSettings the settings to load the unicode properties object. 162 See {@link UnicodeProperties #fastLoad(String)}. 163 * @param hidden whether the layout is hidden 164 * @param friendlyURLMap the layout's locales and localized friendly URLs. 165 To see how the URL is normalized when accessed, see {@link 166 com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize( 167 String)}. 168 * @param serviceContext the service context to be applied. Must set the 169 UUID for the layout. Can set the creation date, modification 170 date, and expando bridge attributes for the layout. For layouts 171 that belong to a layout set prototype, an attribute named 172 <code>layoutUpdateable</code> can be set to specify whether site 173 administrators can modify this page within their site. For 174 layouts that are created from a layout prototype, attributes 175 named <code>layoutPrototypeUuid</code> and 176 <code>layoutPrototypeLinkedEnabled</code> can be specified to 177 provide the unique identifier of the source prototype and a 178 boolean to determine whether a link to it should be enabled to 179 activate propagation of changes made to the linked page in the 180 prototype. 181 * @return the layout 182 */ 183 public Layout addLayout(long userId, long groupId, boolean privateLayout, 184 long parentLayoutId, Map<Locale, java.lang.String> nameMap, 185 Map<Locale, java.lang.String> titleMap, 186 Map<Locale, java.lang.String> descriptionMap, 187 Map<Locale, java.lang.String> keywordsMap, 188 Map<Locale, java.lang.String> robotsMap, java.lang.String type, 189 java.lang.String typeSettings, boolean hidden, 190 Map<Locale, java.lang.String> friendlyURLMap, 191 com.liferay.portal.kernel.service.ServiceContext serviceContext) 192 throws PortalException; 193 194 /** 195 * Creates a new layout with the primary key. Does not add the layout to the database. 196 * 197 * @param plid the primary key for the new layout 198 * @return the new layout 199 */ 200 public Layout createLayout(long plid); 201 202 /** 203 * Deletes the layout with the primary key, also deleting the layout's child 204 * layouts, and associated resources. 205 * 206 * @param groupId the primary key of the group 207 * @param privateLayout whether the layout is private to the group 208 * @param layoutId the primary key of the layout 209 * @param serviceContext the service context to be applied 210 */ 211 public void deleteLayout(long groupId, boolean privateLayout, 212 long layoutId, 213 com.liferay.portal.kernel.service.ServiceContext serviceContext) 214 throws PortalException; 215 216 /** 217 * Deletes the layout from the database. Also notifies the appropriate model listeners. 218 * 219 * @param layout the layout 220 * @return the layout that was removed 221 */ 222 @Indexable(type = IndexableType.DELETE) 223 public Layout deleteLayout(Layout layout); 224 225 /** 226 * Deletes the layout, its child layouts, and its associated resources. 227 * 228 * @param layout the layout 229 * @param updateLayoutSet whether the layout set's page counter needs to be 230 updated 231 * @param serviceContext the service context to be applied 232 */ 233 @SystemEvent(action = SystemEventConstants.ACTION_SKIP, type = SystemEventConstants.TYPE_DELETE) 234 public void deleteLayout(Layout layout, boolean updateLayoutSet, 235 com.liferay.portal.kernel.service.ServiceContext serviceContext) 236 throws PortalException; 237 238 /** 239 * Deletes the layout with the primary key from the database. Also notifies the appropriate model listeners. 240 * 241 * @param plid the primary key of the layout 242 * @return the layout that was removed 243 * @throws PortalException if a layout with the primary key could not be found 244 */ 245 @Indexable(type = IndexableType.DELETE) 246 public Layout deleteLayout(long plid) throws PortalException; 247 248 /** 249 * Deletes the layout with the plid, also deleting the layout's child 250 * layouts, and associated resources. 251 * 252 * @param plid the primary key of the layout 253 * @param serviceContext the service context to be applied 254 */ 255 public void deleteLayout(long plid, 256 com.liferay.portal.kernel.service.ServiceContext serviceContext) 257 throws PortalException; 258 259 /** 260 * Deletes the group's private or non-private layouts, also deleting the 261 * layouts' child layouts, and associated resources. 262 * 263 * @param groupId the primary key of the group 264 * @param privateLayout whether the layout is private to the group 265 * @param serviceContext the service context to be applied. The parent 266 layout set's page count will be updated by default, unless an 267 attribute named <code>updatePageCount</code> is set to 268 <code>false</code>. 269 */ 270 public void deleteLayouts(long groupId, boolean privateLayout, 271 com.liferay.portal.kernel.service.ServiceContext serviceContext) 272 throws PortalException; 273 274 /** 275 * @throws PortalException 276 */ 277 @Override 278 public PersistedModel deletePersistedModel(PersistedModel persistedModel) 279 throws PortalException; 280 281 public DynamicQuery dynamicQuery(); 282 283 /** 284 * Performs a dynamic query on the database and returns the matching rows. 285 * 286 * @param dynamicQuery the dynamic query 287 * @return the matching rows 288 */ 289 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery); 290 291 /** 292 * Performs a dynamic query on the database and returns a range of the matching rows. 293 * 294 * <p> 295 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.LayoutModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 296 * </p> 297 * 298 * @param dynamicQuery the dynamic query 299 * @param start the lower bound of the range of model instances 300 * @param end the upper bound of the range of model instances (not inclusive) 301 * @return the range of matching rows 302 */ 303 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start, 304 int end); 305 306 /** 307 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 308 * 309 * <p> 310 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.LayoutModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 311 * </p> 312 * 313 * @param dynamicQuery the dynamic query 314 * @param start the lower bound of the range of model instances 315 * @param end the upper bound of the range of model instances (not inclusive) 316 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 317 * @return the ordered range of matching rows 318 */ 319 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start, 320 int end, OrderByComparator<T> orderByComparator); 321 322 /** 323 * Returns the number of rows matching the dynamic query. 324 * 325 * @param dynamicQuery the dynamic query 326 * @return the number of rows matching the dynamic query 327 */ 328 public long dynamicQueryCount(DynamicQuery dynamicQuery); 329 330 /** 331 * Returns the number of rows matching the dynamic query. 332 * 333 * @param dynamicQuery the dynamic query 334 * @param projection the projection to apply to the query 335 * @return the number of rows matching the dynamic query 336 */ 337 public long dynamicQueryCount(DynamicQuery dynamicQuery, 338 Projection projection); 339 340 /** 341 * Exports layouts with the primary keys and criteria as a byte array. 342 * 343 * @param groupId the primary key of the group 344 * @param privateLayout whether the layout is private to the group 345 * @param layoutIds the primary keys of the layouts to be exported 346 * @param parameterMap the mapping of parameters indicating which 347 information to export. For information on the keys used in 348 the map see {@link 349 com.liferay.exportimport.kernel.lar.PortletDataHandlerKeys}. 350 * @param startDate the export's start date 351 * @param endDate the export's end date 352 * @return the layouts as a byte array 353 * @throws PortalException 354 * @deprecated As of 7.0.0, with no direct replacement 355 */ 356 @java.lang.Deprecated 357 public byte[] exportLayouts(long groupId, boolean privateLayout, 358 long[] layoutIds, 359 Map<java.lang.String, java.lang.String[]> parameterMap, Date startDate, 360 Date endDate) throws PortalException; 361 362 /** 363 * Exports all layouts that match the criteria as a byte array. 364 * 365 * @param groupId the primary key of the group 366 * @param privateLayout whether the layout is private to the group 367 * @param parameterMap the mapping of parameters indicating which 368 information to export. For information on the keys used in 369 the map see {@link 370 com.liferay.exportimport.kernel.lar.PortletDataHandlerKeys}. 371 * @param startDate the export's start date 372 * @param endDate the export's end date 373 * @return the layout as a byte array 374 * @throws PortalException 375 * @deprecated As of 7.0.0, with no direct replacement 376 */ 377 @java.lang.Deprecated 378 public byte[] exportLayouts(long groupId, boolean privateLayout, 379 Map<java.lang.String, java.lang.String[]> parameterMap, Date startDate, 380 Date endDate) throws PortalException; 381 382 /** 383 * @throws PortalException 384 * @deprecated As of 7.0.0, replaced by {@link 385 com.liferay.exportimport.kernel.service.ExportImportLocalService#exportLayoutsAsFile( 386 ExportImportConfiguration)} 387 */ 388 @java.lang.Deprecated 389 public File exportLayoutsAsFile( 390 ExportImportConfiguration exportImportConfiguration) 391 throws PortalException; 392 393 /** 394 * Exports the layouts that match the primary keys and criteria as a file. 395 * 396 * @param groupId the primary key of the group 397 * @param privateLayout whether the layout is private to the group 398 * @param layoutIds the primary keys of the layouts to be exported 399 (optionally <code>null</code>) 400 * @param parameterMap the mapping of parameters indicating which 401 information to export. For information on the keys used in 402 the map see {@link 403 com.liferay.exportimport.kernel.lar.PortletDataHandlerKeys}. 404 * @param startDate the export's start date 405 * @param endDate the export's end date 406 * @return the layouts as a File 407 * @throws PortalException 408 * @deprecated As of 7.0.0, with no direct replacement 409 */ 410 @java.lang.Deprecated 411 public File exportLayoutsAsFile(long groupId, boolean privateLayout, 412 long[] layoutIds, 413 Map<java.lang.String, java.lang.String[]> parameterMap, Date startDate, 414 Date endDate) throws PortalException; 415 416 /** 417 * @throws PortalException 418 * @deprecated As of 7.0.0, replaced by {@link 419 com.liferay.exportimport.kernel.service.ExportImportLocalService#exportLayoutsAsFileInBackground( 420 long, ExportImportConfiguration)} 421 */ 422 @java.lang.Deprecated 423 public long exportLayoutsAsFileInBackground(long userId, 424 ExportImportConfiguration exportImportConfiguration) 425 throws PortalException; 426 427 /** 428 * @throws PortalException 429 * @deprecated As of 7.0.0, replaced by {@link 430 com.liferay.exportimport.kernel.service.ExportImportLocalService#exportLayoutsAsFileInBackground( 431 long, long)} 432 */ 433 @java.lang.Deprecated 434 public long exportLayoutsAsFileInBackground(long userId, 435 long exportImportConfigurationId) throws PortalException; 436 437 /** 438 * @throws PortalException 439 * @deprecated As of 7.0.0, with no direct replacement 440 */ 441 @java.lang.Deprecated 442 public long exportLayoutsAsFileInBackground(long userId, 443 java.lang.String taskName, long groupId, boolean privateLayout, 444 long[] layoutIds, 445 Map<java.lang.String, java.lang.String[]> parameterMap, Date startDate, 446 Date endDate) throws PortalException; 447 448 /** 449 * @throws PortalException 450 * @deprecated As of 7.0.0, with no direct replacement 451 */ 452 @java.lang.Deprecated 453 public long exportLayoutsAsFileInBackground(long userId, 454 java.lang.String taskName, long groupId, boolean privateLayout, 455 long[] layoutIds, 456 Map<java.lang.String, java.lang.String[]> parameterMap, Date startDate, 457 Date endDate, java.lang.String fileName) throws PortalException; 458 459 /** 460 * @throws PortalException 461 * @deprecated As of 7.0.0, with no direct replacement 462 */ 463 @java.lang.Deprecated 464 public byte[] exportPortletInfo(long companyId, java.lang.String portletId, 465 Map<java.lang.String, java.lang.String[]> parameterMap, Date startDate, 466 Date endDate) throws PortalException; 467 468 /** 469 * Exports the portlet information (categories, permissions, ... etc.) as a 470 * byte array. 471 * 472 * @param plid the primary key of the layout 473 * @param groupId the primary key of the group 474 * @param portletId the primary key of the portlet 475 * @param parameterMap the mapping of parameters indicating which 476 information to export. For information on the keys used in 477 the map see {@link 478 com.liferay.exportimport.kernel.lar.PortletDataHandlerKeys}. 479 * @param startDate the export's start date 480 * @param endDate the export's end date 481 * @return the portlet information as a byte array 482 * @throws PortalException 483 * @deprecated As of 7.0.0, with no direct replacement 484 */ 485 @java.lang.Deprecated 486 public byte[] exportPortletInfo(long plid, long groupId, 487 java.lang.String portletId, 488 Map<java.lang.String, java.lang.String[]> parameterMap, Date startDate, 489 Date endDate) throws PortalException; 490 491 /** 492 * @throws PortalException 493 * @deprecated As of 7.0.0, with no direct replacement 494 */ 495 @java.lang.Deprecated 496 public File exportPortletInfoAsFile(long companyId, 497 java.lang.String portletId, 498 Map<java.lang.String, java.lang.String[]> parameterMap, Date startDate, 499 Date endDate) throws PortalException; 500 501 /** 502 * @throws PortalException 503 * @deprecated As of 7.0.0, replaced by {@link 504 com.liferay.exportimport.kernel.service.ExportImportLocalService#exportPortletInfoAsFile( 505 ExportImportConfiguration)}} 506 */ 507 @java.lang.Deprecated 508 public File exportPortletInfoAsFile( 509 ExportImportConfiguration exportImportConfiguration) 510 throws PortalException; 511 512 /** 513 * Exports the portlet information (categories, permissions, ... etc.) as a 514 * file. 515 * 516 * @param plid the primary key of the layout 517 * @param groupId the primary key of the group 518 * @param portletId the primary key of the portlet 519 * @param parameterMap the mapping of parameters indicating which 520 information to export. For information on the keys used in 521 the map see {@link 522 com.liferay.exportimport.kernel.lar.PortletDataHandlerKeys}. 523 * @param startDate the export's start date 524 * @param endDate the export's end date 525 * @return the portlet information as a file 526 * @throws PortalException 527 * @deprecated As of 7.0.0, with no direct replacement 528 */ 529 @java.lang.Deprecated 530 public File exportPortletInfoAsFile(long plid, long groupId, 531 java.lang.String portletId, 532 Map<java.lang.String, java.lang.String[]> parameterMap, Date startDate, 533 Date endDate) throws PortalException; 534 535 /** 536 * @throws PortalException 537 * @deprecated As of 7.0.0, replaced by {@link 538 com.liferay.exportimport.kernel.service.ExportImportLocalService#exportPortletInfoAsFileInBackground( 539 long, ExportImportConfiguration)}} 540 */ 541 @java.lang.Deprecated 542 public long exportPortletInfoAsFileInBackground(long userId, 543 ExportImportConfiguration exportImportConfiguration) 544 throws PortalException; 545 546 /** 547 * @throws PortalException 548 * @deprecated As of 7.0.0, replaced by {@link 549 com.liferay.exportimport.kernel.service.ExportImportLocalService#exportPortletInfoAsFileInBackground( 550 long, long)}} 551 */ 552 @java.lang.Deprecated 553 public long exportPortletInfoAsFileInBackground(long userId, 554 long exportImportConfigurationId) throws PortalException; 555 556 /** 557 * @throws PortalException 558 * @deprecated As of 7.0.0, with no direct replacement 559 */ 560 @java.lang.Deprecated 561 public long exportPortletInfoAsFileInBackground(long userId, 562 java.lang.String taskName, long plid, long groupId, 563 java.lang.String portletId, 564 Map<java.lang.String, java.lang.String[]> parameterMap, Date startDate, 565 Date endDate, java.lang.String fileName) throws PortalException; 566 567 /** 568 * @throws PortalException 569 * @deprecated As of 7.0.0, with no direct replacement 570 */ 571 @java.lang.Deprecated 572 public long exportPortletInfoAsFileInBackground(long userId, 573 java.lang.String taskName, java.lang.String portletId, 574 Map<java.lang.String, java.lang.String[]> parameterMap, Date startDate, 575 Date endDate, java.lang.String fileName) throws PortalException; 576 577 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 578 public Layout fetchFirstLayout(long groupId, boolean privateLayout, 579 long parentLayoutId); 580 581 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 582 public Layout fetchLayout(long groupId, boolean privateLayout, long layoutId); 583 584 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 585 public Layout fetchLayout(long plid); 586 587 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 588 public Layout fetchLayoutByFriendlyURL(long groupId, boolean privateLayout, 589 java.lang.String friendlyURL); 590 591 /** 592 * Returns the layout matching the UUID, group, and privacy. 593 * 594 * @param uuid the layout's UUID 595 * @param groupId the primary key of the group 596 * @param privateLayout whether the layout is private to the group 597 * @return the matching layout, or <code>null</code> if a matching layout could not be found 598 */ 599 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 600 public Layout fetchLayoutByUuidAndGroupId(java.lang.String uuid, 601 long groupId, boolean privateLayout); 602 603 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 604 public ActionableDynamicQuery getActionableDynamicQuery(); 605 606 /** 607 * Returns the primary key of the default layout for the group 608 * 609 * @param groupId the primary key of the group 610 * @return the primary key of the default layout for the group (optionally 611 {@link LayoutConstants#DEFAULT_PLID}) 612 */ 613 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 614 public long getDefaultPlid(long groupId); 615 616 /** 617 * Returns primary key of the matching default layout for the group 618 * 619 * @param groupId the primary key of the group 620 * @param privateLayout whether the layout is private to the group 621 * @return the primary key of the default layout for the group; {@link 622 LayoutConstants#DEFAULT_PLID}) otherwise 623 */ 624 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 625 public long getDefaultPlid(long groupId, boolean privateLayout); 626 627 /** 628 * Returns primary key of the default portlet layout for the group 629 * 630 * @param groupId the primary key of the group 631 * @param privateLayout whether the layout is private to the group 632 * @param portletId the primary key of the portlet 633 * @return the primary key of the default portlet layout for the group; 634 {@link LayoutConstants#DEFAULT_PLID} otherwise 635 * @throws PortalException 636 */ 637 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 638 public long getDefaultPlid(long groupId, boolean privateLayout, 639 java.lang.String portletId) throws PortalException; 640 641 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 642 public ExportActionableDynamicQuery getExportActionableDynamicQuery( 643 PortletDataContext portletDataContext); 644 645 /** 646 * Returns the layout for the friendly URL 647 * 648 * @param groupId the primary key of the group 649 * @param privateLayout whether the layout is private to the group 650 * @param friendlyURL the friendly URL of the layout 651 * @return the layout for the friendly URL 652 */ 653 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 654 public Layout getFriendlyURLLayout(long groupId, boolean privateLayout, 655 java.lang.String friendlyURL) throws PortalException; 656 657 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 658 public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery(); 659 660 /** 661 * Returns the layout matching the primary key, group, and privacy; throws a 662 * {@link NoSuchLayoutException} otherwise. 663 * 664 * @param groupId the primary key of the group 665 * @param privateLayout whether the layout is private to the group 666 * @param layoutId the primary key of the layout 667 * @return the matching layout 668 */ 669 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 670 public Layout getLayout(long groupId, boolean privateLayout, long layoutId) 671 throws PortalException; 672 673 /** 674 * Returns the layout with the primary key. 675 * 676 * @param plid the primary key of the layout 677 * @return the layout 678 * @throws PortalException if a layout with the primary key could not be found 679 */ 680 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 681 public Layout getLayout(long plid) throws PortalException; 682 683 /** 684 * Returns the layout for the icon image; throws a {@link 685 * NoSuchLayoutException} otherwise. 686 * 687 * @param iconImageId the primary key of the icon image 688 * @return Returns the layout for the icon image 689 */ 690 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 691 public Layout getLayoutByIconImageId(long iconImageId) 692 throws PortalException; 693 694 /** 695 * Returns the layout matching the UUID, group, and privacy. 696 * 697 * @param uuid the layout's UUID 698 * @param groupId the primary key of the group 699 * @param privateLayout whether the layout is private to the group 700 * @return the matching layout 701 * @throws PortalException if a matching layout could not be found 702 */ 703 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 704 public Layout getLayoutByUuidAndGroupId(java.lang.String uuid, 705 long groupId, boolean privateLayout) throws PortalException; 706 707 /** 708 * Returns the layout references for all the layouts that belong to the 709 * company and belong to the portlet that matches the preferences. 710 * 711 * @param companyId the primary key of the company 712 * @param portletId the primary key of the portlet 713 * @param preferencesKey the portlet's preference key 714 * @param preferencesValue the portlet's preference value 715 * @return the layout references of the matching layouts 716 */ 717 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 718 public LayoutReference[] getLayouts(long companyId, 719 java.lang.String portletId, java.lang.String preferencesKey, 720 java.lang.String preferencesValue); 721 722 /** 723 * Returns all the layouts belonging to the group. 724 * 725 * @param groupId the primary key of the group 726 * @param privateLayout whether the layout is private to the group 727 * @return the matching layouts, or <code>null</code> if no matches were 728 found 729 */ 730 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 731 public List<Layout> getLayouts(long groupId, boolean privateLayout); 732 733 /** 734 * Returns all the layouts that match the layout IDs and belong to the 735 * group. 736 * 737 * @param groupId the primary key of the group 738 * @param privateLayout whether the layout is private to the group 739 * @param layoutIds the primary keys of the layouts 740 * @return the matching layouts, or an empty list if no matches were found 741 */ 742 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 743 public List<Layout> getLayouts(long groupId, boolean privateLayout, 744 long[] layoutIds) throws PortalException; 745 746 /** 747 * Returns all the layouts belonging to the group that are children of the 748 * parent layout. 749 * 750 * @param groupId the primary key of the group 751 * @param privateLayout whether the layout is private to the group 752 * @param parentLayoutId the primary key of the parent layout 753 * @return the matching layouts, or <code>null</code> if no matches were 754 found 755 */ 756 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 757 public List<Layout> getLayouts(long groupId, boolean privateLayout, 758 long parentLayoutId); 759 760 /** 761 * Returns a range of all the layouts belonging to the group that are 762 * children of the parent layout. 763 * 764 * <p> 765 * Useful when paginating results. Returns a maximum of <code>end - 766 * start</code> instances. <code>start</code> and <code>end</code> are not 767 * primary keys, they are indexes in the result set. Thus, <code>0</code> 768 * refers to the first result in the set. Setting both <code>start</code> 769 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 770 * result set. 771 * </p> 772 * 773 * @param groupId the primary key of the group 774 * @param privateLayout whether the layout is private to the group 775 * @param parentLayoutId the primary key of the parent layout 776 * @param incomplete whether the layout is incomplete 777 * @param start the lower bound of the range of layouts 778 * @param end the upper bound of the range of layouts (not inclusive) 779 * @return the matching layouts, or <code>null</code> if no matches were 780 found 781 */ 782 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 783 public List<Layout> getLayouts(long groupId, boolean privateLayout, 784 long parentLayoutId, boolean incomplete, int start, int end); 785 786 /** 787 * Returns all the layouts that match the type and belong to the group. 788 * 789 * @param groupId the primary key of the group 790 * @param privateLayout whether the layout is private to the group 791 * @param type the type of the layouts (optionally {@link 792 LayoutConstants#TYPE_PORTLET}) 793 * @return the matching layouts, or <code>null</code> if no matches were 794 found 795 */ 796 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 797 public List<Layout> getLayouts(long groupId, boolean privateLayout, 798 java.lang.String type); 799 800 /** 801 * Returns a range of all the layouts. 802 * 803 * <p> 804 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.LayoutModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 805 * </p> 806 * 807 * @param start the lower bound of the range of layouts 808 * @param end the upper bound of the range of layouts (not inclusive) 809 * @return the range of layouts 810 */ 811 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 812 public List<Layout> getLayouts(int start, int end); 813 814 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 815 public List<Layout> getLayoutsByLayoutPrototypeUuid( 816 java.lang.String layoutPrototypeUuid); 817 818 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 819 public int getLayoutsByLayoutPrototypeUuidCount( 820 java.lang.String layoutPrototypeUuid); 821 822 /** 823 * Returns all the layouts matching the UUID and company. 824 * 825 * @param uuid the UUID of the layouts 826 * @param companyId the primary key of the company 827 * @return the matching layouts, or an empty list if no matches were found 828 */ 829 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 830 public List<Layout> getLayoutsByUuidAndCompanyId(java.lang.String uuid, 831 long companyId); 832 833 /** 834 * Returns a range of layouts matching the UUID and company. 835 * 836 * @param uuid the UUID of the layouts 837 * @param companyId the primary key of the company 838 * @param start the lower bound of the range of layouts 839 * @param end the upper bound of the range of layouts (not inclusive) 840 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 841 * @return the range of matching layouts, or an empty list if no matches were found 842 */ 843 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 844 public List<Layout> getLayoutsByUuidAndCompanyId(java.lang.String uuid, 845 long companyId, int start, int end, 846 OrderByComparator<Layout> orderByComparator); 847 848 /** 849 * Returns the number of layouts. 850 * 851 * @return the number of layouts 852 */ 853 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 854 public int getLayoutsCount(); 855 856 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 857 public int getLayoutsCount(Group group, boolean privateLayout) 858 throws PortalException; 859 860 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 861 public int getLayoutsCount(Group group, boolean privateLayout, 862 boolean includeUserGroups) throws PortalException; 863 864 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 865 public int getLayoutsCount(Group group, boolean privateLayout, 866 long parentLayoutId); 867 868 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 869 public int getLayoutsCount(User user, boolean privateLayout) 870 throws PortalException; 871 872 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 873 public int getLayoutsCount(User user, boolean privateLayout, 874 boolean includeUserGroups) throws PortalException; 875 876 /** 877 * Returns the primary key to use for the next layout. 878 * 879 * @param groupId the primary key of the group 880 * @param privateLayout whether the layout is private to the group 881 * @return the primary key to use for the next layout 882 */ 883 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 884 public long getNextLayoutId(long groupId, boolean privateLayout); 885 886 /** 887 * Returns all the layouts without resource permissions 888 * 889 * @param roleId the primary key of the role 890 * @return all the layouts without resource permissions 891 */ 892 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 893 public List<Layout> getNoPermissionLayouts(long roleId); 894 895 /** 896 * Returns all the layouts whose friendly URLs are <code>null</code> 897 * 898 * @return all the layouts whose friendly URLs are <code>null</code> 899 */ 900 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 901 public List<Layout> getNullFriendlyURLLayouts(); 902 903 /** 904 * Returns the OSGi service identifier. 905 * 906 * @return the OSGi service identifier 907 */ 908 public java.lang.String getOSGiServiceIdentifier(); 909 910 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 911 public Layout getParentLayout(Layout layout) throws PortalException; 912 913 @Override 914 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 915 public PersistedModel getPersistedModel(Serializable primaryKeyObj) 916 throws PortalException; 917 918 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 919 public List<Layout> getScopeGroupLayouts(long parentGroupId) 920 throws PortalException; 921 922 /** 923 * Returns all the layouts within scope of the group 924 * 925 * @param privateLayout whether the layout is private to the group 926 * @return the layouts within scope of the group 927 */ 928 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 929 public List<Layout> getScopeGroupLayouts(long parentGroupId, 930 boolean privateLayout) throws PortalException; 931 932 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 933 public boolean hasLayoutSetPrototypeLayout(long layoutSetPrototypeId, 934 java.lang.String layoutUuid) throws PortalException; 935 936 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 937 public boolean hasLayoutSetPrototypeLayout( 938 java.lang.String layoutSetPrototypeUuid, long companyId, 939 java.lang.String layoutUuid) throws PortalException; 940 941 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 942 public boolean hasLayouts(Group group) throws PortalException; 943 944 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 945 public boolean hasLayouts(Group group, boolean privateLayout) 946 throws PortalException; 947 948 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 949 public boolean hasLayouts(Group group, boolean privateLayout, 950 boolean includeUserGroups) throws PortalException; 951 952 /** 953 * Returns <code>true</code> if the group has any layouts; 954 * <code>false</code> otherwise. 955 * 956 * @param groupId the primary key of the group 957 * @param privateLayout whether the layout is private to the group 958 * @param parentLayoutId the primary key of the parent layout 959 * @return <code>true</code> if the group has any layouts; 960 <code>false</code> otherwise 961 */ 962 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 963 public boolean hasLayouts(long groupId, boolean privateLayout, 964 long parentLayoutId); 965 966 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 967 public boolean hasLayouts(User user, boolean privateLayout) 968 throws PortalException; 969 970 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 971 public boolean hasLayouts(User user, boolean privateLayout, 972 boolean includeUserGroups) throws PortalException; 973 974 /** 975 * @throws PortalException 976 * @deprecated As of 7.0.0, replaced by {@link 977 com.liferay.exportimport.kernel.service.ExportImportLocalService#importLayouts( 978 ExportImportConfiguration, File)}} 979 */ 980 @java.lang.Deprecated 981 public void importLayouts( 982 ExportImportConfiguration exportImportConfiguration, File file) 983 throws PortalException; 984 985 /** 986 * @throws PortalException 987 * @deprecated As of 7.0.0, replaced by {@link 988 com.liferay.exportimport.kernel.service.ExportImportLocalService#importLayouts( 989 ExportImportConfiguration, InputStream)}} 990 */ 991 @java.lang.Deprecated 992 public void importLayouts( 993 ExportImportConfiguration exportImportConfiguration, InputStream is) 994 throws PortalException; 995 996 /** 997 * Imports the layouts from the byte array. 998 * 999 * @param userId the primary key of the user 1000 * @param groupId the primary key of the group 1001 * @param privateLayout whether the layout is private to the group 1002 * @param parameterMap the mapping of parameters indicating which 1003 information will be imported. For information on the keys 1004 used in the map see {@link 1005 com.liferay.exportimport.kernel.lar.PortletDataHandlerKeys}. 1006 * @param bytes the byte array with the data 1007 * @throws PortalException 1008 * @see com.liferay.exportimport.kernel.lar.LayoutImporter 1009 * @deprecated As of 7.0.0, with no direct replacement 1010 */ 1011 @java.lang.Deprecated 1012 public void importLayouts(long userId, long groupId, boolean privateLayout, 1013 Map<java.lang.String, java.lang.String[]> parameterMap, byte[] bytes) 1014 throws PortalException; 1015 1016 /** 1017 * Imports the layouts from the file. 1018 * 1019 * @param userId the primary key of the user 1020 * @param groupId the primary key of the group 1021 * @param privateLayout whether the layout is private to the group 1022 * @param parameterMap the mapping of parameters indicating which 1023 information will be imported. For information on the keys 1024 used in the map see {@link 1025 com.liferay.exportimport.kernel.lar.PortletDataHandlerKeys}. 1026 * @param file the LAR file with the data 1027 * @throws PortalException 1028 * @see com.liferay.exportimport.kernel.lar.LayoutImporter 1029 * @deprecated As of 7.0.0, with no direct replacement 1030 */ 1031 @java.lang.Deprecated 1032 public void importLayouts(long userId, long groupId, boolean privateLayout, 1033 Map<java.lang.String, java.lang.String[]> parameterMap, File file) 1034 throws PortalException; 1035 1036 /** 1037 * Imports the layouts from the input stream. 1038 * 1039 * @param userId the primary key of the user 1040 * @param groupId the primary key of the group 1041 * @param privateLayout whether the layout is private to the group 1042 * @param parameterMap the mapping of parameters indicating which 1043 information will be imported. For information on the keys 1044 used in the map see {@link 1045 com.liferay.exportimport.kernel.lar.PortletDataHandlerKeys}. 1046 * @param is the input stream 1047 * @throws PortalException 1048 * @see com.liferay.exportimport.kernel.lar.LayoutImporter 1049 * @deprecated As of 7.0.0, with no direct replacement 1050 */ 1051 @java.lang.Deprecated 1052 public void importLayouts(long userId, long groupId, boolean privateLayout, 1053 Map<java.lang.String, java.lang.String[]> parameterMap, InputStream is) 1054 throws PortalException; 1055 1056 /** 1057 * @throws PortalException 1058 * @deprecated As of 7.0.0, replaced by {@link 1059 com.liferay.exportimport.kernel.service.ExportImportLocalService#importLayoutsDataDeletions( 1060 ExportImportConfiguration, File)} 1061 */ 1062 @java.lang.Deprecated 1063 public void importLayoutsDataDeletions( 1064 ExportImportConfiguration exportImportConfiguration, File file) 1065 throws PortalException; 1066 1067 /** 1068 * @throws PortalException 1069 * @deprecated As of 7.0.0, replaced by {@link 1070 com.liferay.exportimport.kernel.service.ExportImportLocalService#importLayoutsInBackground( 1071 long, ExportImportConfiguration, File)} 1072 */ 1073 @java.lang.Deprecated 1074 public long importLayoutsInBackground(long userId, 1075 ExportImportConfiguration exportImportConfiguration, File file) 1076 throws PortalException; 1077 1078 /** 1079 * @throws PortalException 1080 * @deprecated As of 7.0.0, replaced by {@link 1081 com.liferay.exportimport.kernel.service.ExportImportLocalService#importLayoutsInBackground( 1082 long, long, File)} 1083 */ 1084 @java.lang.Deprecated 1085 public long importLayoutsInBackground(long userId, 1086 long exportImportConfigurationId, File file) throws PortalException; 1087 1088 /** 1089 * @throws PortalException 1090 * @deprecated As of 7.0.0, with no direct replacement 1091 */ 1092 @java.lang.Deprecated 1093 public long importLayoutsInBackground(long userId, 1094 java.lang.String taskName, long groupId, boolean privateLayout, 1095 Map<java.lang.String, java.lang.String[]> parameterMap, File file) 1096 throws PortalException; 1097 1098 /** 1099 * @throws PortalException 1100 * @deprecated As of 7.0.0, with no direct replacement 1101 */ 1102 @java.lang.Deprecated 1103 public long importLayoutsInBackground(long userId, 1104 java.lang.String taskName, long groupId, boolean privateLayout, 1105 Map<java.lang.String, java.lang.String[]> parameterMap, InputStream is) 1106 throws PortalException; 1107 1108 /** 1109 * @throws PortalException 1110 * @deprecated As of 7.0.0, replaced by {@link 1111 com.liferay.exportimport.kernel.service.ExportImportLocalService#importPortletDataDeletions( 1112 ExportImportConfiguration, File)} 1113 */ 1114 @java.lang.Deprecated 1115 public void importPortletDataDeletions( 1116 ExportImportConfiguration exportImportConfiguration, File file) 1117 throws PortalException; 1118 1119 /** 1120 * @throws PortalException 1121 * @deprecated As of 7.0.0, replaced by {@link 1122 com.liferay.exportimport.kernel.service.ExportImportLocalService#importPortletInfo( 1123 ExportImportConfiguration, File)} 1124 */ 1125 @java.lang.Deprecated 1126 public void importPortletInfo( 1127 ExportImportConfiguration exportImportConfiguration, File file) 1128 throws PortalException; 1129 1130 /** 1131 * @throws PortalException 1132 * @deprecated As of 7.0.0, replaced by {@link 1133 com.liferay.exportimport.kernel.service.ExportImportLocalService#importPortletInfo( 1134 ExportImportConfiguration, InputStream)} 1135 */ 1136 @java.lang.Deprecated 1137 public void importPortletInfo( 1138 ExportImportConfiguration exportImportConfiguration, InputStream is) 1139 throws PortalException; 1140 1141 /** 1142 * Imports the portlet information (categories, permissions, ... etc.) from 1143 * the file. 1144 * 1145 * @param userId the primary key of the user 1146 * @param plid the primary key of the target layout 1147 * @param groupId the primary key of the target group 1148 * @param portletId the primary key of the portlet 1149 * @param parameterMap the mapping of parameters indicating which 1150 information will be imported. For information on the keys 1151 used in the map see {@link 1152 com.liferay.exportimport.kernel.lar.PortletDataHandlerKeys}. 1153 * @param file the LAR file with the data 1154 * @throws PortalException 1155 * @deprecated As of 7.0.0, with no direct replacement 1156 */ 1157 @java.lang.Deprecated 1158 public void importPortletInfo(long userId, long plid, long groupId, 1159 java.lang.String portletId, 1160 Map<java.lang.String, java.lang.String[]> parameterMap, File file) 1161 throws PortalException; 1162 1163 /** 1164 * Imports the portlet information (categories, permissions, ... etc.) from 1165 * the input stream. 1166 * 1167 * @param userId the primary key of the user 1168 * @param plid the primary key of the layout 1169 * @param groupId the primary key of the group 1170 * @param portletId the primary key of the portlet 1171 * @param parameterMap the mapping of parameters indicating which 1172 information will be imported. For information on the keys 1173 used in the map see {@link 1174 com.liferay.exportimport.kernel.lar.PortletDataHandlerKeys}. 1175 * @param is the input stream 1176 * @throws PortalException 1177 * @deprecated As of 7.0.0, with no direct replacement 1178 */ 1179 @java.lang.Deprecated 1180 public void importPortletInfo(long userId, long plid, long groupId, 1181 java.lang.String portletId, 1182 Map<java.lang.String, java.lang.String[]> parameterMap, InputStream is) 1183 throws PortalException; 1184 1185 /** 1186 * @throws PortalException 1187 * @deprecated As of 7.0.0, with no direct replacement 1188 */ 1189 @java.lang.Deprecated 1190 public void importPortletInfo(long userId, java.lang.String portletId, 1191 Map<java.lang.String, java.lang.String[]> parameterMap, File file) 1192 throws PortalException; 1193 1194 /** 1195 * @throws PortalException 1196 * @deprecated As of 7.0.0, with no direct replacement 1197 */ 1198 @java.lang.Deprecated 1199 public void importPortletInfo(long userId, java.lang.String portletId, 1200 Map<java.lang.String, java.lang.String[]> parameterMap, InputStream is) 1201 throws PortalException; 1202 1203 /** 1204 * @throws PortalException 1205 * @deprecated As of 7.0.0, replaced by {@link 1206 com.liferay.exportimport.kernel.service.ExportImportLocalService#importPortletInfoInBackground( 1207 long, ExportImportConfiguration, File)} 1208 */ 1209 @java.lang.Deprecated 1210 public long importPortletInfoInBackground(long userId, 1211 ExportImportConfiguration exportImportConfiguration, File file) 1212 throws PortalException; 1213 1214 /** 1215 * @throws PortalException 1216 * @deprecated As of 7.0.0, replaced by {@link 1217 com.liferay.exportimport.kernel.service.ExportImportLocalService#importPortletInfoInBackground( 1218 long, long, File)} 1219 */ 1220 @java.lang.Deprecated 1221 public long importPortletInfoInBackground(long userId, 1222 long exportImportConfigurationId, File file) throws PortalException; 1223 1224 /** 1225 * @throws PortalException 1226 * @deprecated As of 7.0.0, with no direct replacement 1227 */ 1228 @java.lang.Deprecated 1229 public long importPortletInfoInBackground(long userId, 1230 java.lang.String taskName, long plid, long groupId, 1231 java.lang.String portletId, 1232 Map<java.lang.String, java.lang.String[]> parameterMap, File file) 1233 throws PortalException; 1234 1235 /** 1236 * @throws PortalException 1237 * @deprecated As of 7.0.0, with no direct replacement 1238 */ 1239 @java.lang.Deprecated 1240 public long importPortletInfoInBackground(long userId, 1241 java.lang.String taskName, long plid, long groupId, 1242 java.lang.String portletId, 1243 Map<java.lang.String, java.lang.String[]> parameterMap, InputStream is) 1244 throws PortalException; 1245 1246 /** 1247 * @throws PortalException 1248 * @deprecated As of 7.0.0, with no direct replacement 1249 */ 1250 @java.lang.Deprecated 1251 public long importPortletInfoInBackground(long userId, 1252 java.lang.String taskName, java.lang.String portletId, 1253 Map<java.lang.String, java.lang.String[]> parameterMap, File file) 1254 throws PortalException; 1255 1256 /** 1257 * @throws PortalException 1258 * @deprecated As of 7.0.0, with no direct replacement 1259 */ 1260 @java.lang.Deprecated 1261 public long importPortletInfoInBackground(long userId, 1262 java.lang.String taskName, java.lang.String portletId, 1263 Map<java.lang.String, java.lang.String[]> parameterMap, InputStream is) 1264 throws PortalException; 1265 1266 /** 1267 * Sets the layouts for the group, replacing and prioritizing all layouts of 1268 * the parent layout. 1269 * 1270 * @param groupId the primary key of the group 1271 * @param privateLayout whether the layout is private to the group 1272 * @param parentLayoutId the primary key of the parent layout 1273 * @param layoutIds the primary keys of the layouts 1274 * @param serviceContext the service context to be applied 1275 */ 1276 public void setLayouts(long groupId, boolean privateLayout, 1277 long parentLayoutId, long[] layoutIds, 1278 com.liferay.portal.kernel.service.ServiceContext serviceContext) 1279 throws PortalException; 1280 1281 public void updateAsset(long userId, Layout layout, 1282 long[] assetCategoryIds, java.lang.String[] assetTagNames) 1283 throws PortalException; 1284 1285 /** 1286 * Updates the friendly URL of the layout. 1287 * 1288 * @param plid the primary key of the layout 1289 * @param friendlyURL the friendly URL to be assigned 1290 * @param languageId the primary key of the language 1291 * @return the updated layout 1292 * @deprecated As of 7.0.0, replaced by {@link #updateFriendlyURL(long, 1293 long, String, String)} 1294 */ 1295 @java.lang.Deprecated 1296 public Layout updateFriendlyURL(long plid, java.lang.String friendlyURL, 1297 java.lang.String languageId) throws PortalException; 1298 1299 /** 1300 * Updates the friendly URL of the layout. 1301 * 1302 * @param userId the primary key of the user 1303 * @param plid the primary key of the layout 1304 * @param friendlyURL the friendly URL to be assigned 1305 * @param languageId the primary key of the language 1306 * @return the updated layout 1307 */ 1308 public Layout updateFriendlyURL(long userId, long plid, 1309 java.lang.String friendlyURL, java.lang.String languageId) 1310 throws PortalException; 1311 1312 public Layout updateIconImage(long plid, byte[] bytes) 1313 throws PortalException; 1314 1315 /** 1316 * Updates the layout. 1317 * 1318 * @param groupId the primary key of the group 1319 * @param privateLayout whether the layout is private to the group 1320 * @param layoutId the primary key of the layout 1321 * @param parentLayoutId the primary key of the layout's new parent layout 1322 * @param nameMap the locales and localized names to merge (optionally 1323 <code>null</code>) 1324 * @param titleMap the locales and localized titles to merge (optionally 1325 <code>null</code>) 1326 * @param descriptionMap the locales and localized descriptions to merge 1327 (optionally <code>null</code>) 1328 * @param keywordsMap the locales and localized keywords to merge 1329 (optionally <code>null</code>) 1330 * @param robotsMap the locales and localized robots to merge (optionally 1331 <code>null</code>) 1332 * @param type the layout's new type (optionally {@link 1333 LayoutConstants#TYPE_PORTLET}) 1334 * @param hidden whether the layout is hidden 1335 * @param friendlyURLMap the layout's locales and localized friendly URLs. 1336 To see how the URL is normalized when accessed, see {@link 1337 com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize( 1338 String)}. 1339 * @param iconImage whether the icon image will be updated 1340 * @param iconBytes the byte array of the layout's new icon image 1341 * @param serviceContext the service context to be applied. Can set the 1342 modification date and expando bridge attributes for the layout. 1343 For layouts that are linked to a layout prototype, attributes 1344 named <code>layoutPrototypeUuid</code> and 1345 <code>layoutPrototypeLinkedEnabled</code> can be specified to 1346 provide the unique identifier of the source prototype and a 1347 boolean to determine whether a link to it should be enabled to 1348 activate propagation of changes made to the linked page in the 1349 prototype. 1350 * @return the updated layout 1351 */ 1352 public Layout updateLayout(long groupId, boolean privateLayout, 1353 long layoutId, long parentLayoutId, 1354 Map<Locale, java.lang.String> nameMap, 1355 Map<Locale, java.lang.String> titleMap, 1356 Map<Locale, java.lang.String> descriptionMap, 1357 Map<Locale, java.lang.String> keywordsMap, 1358 Map<Locale, java.lang.String> robotsMap, java.lang.String type, 1359 boolean hidden, Map<Locale, java.lang.String> friendlyURLMap, 1360 boolean iconImage, byte[] iconBytes, 1361 com.liferay.portal.kernel.service.ServiceContext serviceContext) 1362 throws PortalException; 1363 1364 /** 1365 * Updates the layout replacing its type settings. 1366 * 1367 * @param groupId the primary key of the group 1368 * @param privateLayout whether the layout is private to the group 1369 * @param layoutId the primary key of the layout 1370 * @param typeSettings the settings to load the unicode properties object. 1371 See {@link UnicodeProperties #fastLoad(String)}. 1372 * @return the updated layout 1373 */ 1374 public Layout updateLayout(long groupId, boolean privateLayout, 1375 long layoutId, java.lang.String typeSettings) throws PortalException; 1376 1377 /** 1378 * Updates the layout in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 1379 * 1380 * @param layout the layout 1381 * @return the layout that was updated 1382 */ 1383 @Indexable(type = IndexableType.REINDEX) 1384 public Layout updateLayout(Layout layout); 1385 1386 /** 1387 * Updates the look and feel of the layout. 1388 * 1389 * @param groupId the primary key of the group 1390 * @param privateLayout whether the layout is private to the group 1391 * @param layoutId the primary key of the layout 1392 * @param themeId the primary key of the layout's new theme 1393 * @param colorSchemeId the primary key of the layout's new color scheme 1394 * @param css the layout's new CSS 1395 * @return the updated layout 1396 */ 1397 public Layout updateLookAndFeel(long groupId, boolean privateLayout, 1398 long layoutId, java.lang.String themeId, 1399 java.lang.String colorSchemeId, java.lang.String css) 1400 throws PortalException; 1401 1402 /** 1403 * Updates the name of the layout matching the group, layout ID, and 1404 * privacy. 1405 * 1406 * @param groupId the primary key of the group 1407 * @param privateLayout whether the layout is private to the group 1408 * @param layoutId the primary key of the layout 1409 * @param name the layout's new name 1410 * @param languageId the primary key of the language. For more information 1411 see {@link Locale}. 1412 * @return the updated layout 1413 */ 1414 public Layout updateName(long groupId, boolean privateLayout, 1415 long layoutId, java.lang.String name, java.lang.String languageId) 1416 throws PortalException; 1417 1418 /** 1419 * Updates the name of the layout. 1420 * 1421 * @param layout the layout to be updated 1422 * @param name the layout's new name 1423 * @param languageId the primary key of the language. For more information 1424 see {@link Locale}. 1425 * @return the updated layout 1426 */ 1427 public Layout updateName(Layout layout, java.lang.String name, 1428 java.lang.String languageId) throws PortalException; 1429 1430 /** 1431 * Updates the name of the layout matching the primary key. 1432 * 1433 * @param plid the primary key of the layout 1434 * @param name the name to be assigned 1435 * @param languageId the primary key of the language. For more information 1436 see {@link Locale}. 1437 * @return the updated layout 1438 */ 1439 public Layout updateName(long plid, java.lang.String name, 1440 java.lang.String languageId) throws PortalException; 1441 1442 /** 1443 * Updates the parent layout ID of the layout matching the group, layout ID, 1444 * and privacy. 1445 * 1446 * @param groupId the primary key of the group 1447 * @param privateLayout whether the layout is private to the group 1448 * @param layoutId the primary key of the layout 1449 * @param parentLayoutId the primary key to be assigned to the parent 1450 layout 1451 * @return the matching layout 1452 */ 1453 public Layout updateParentLayoutId(long groupId, boolean privateLayout, 1454 long layoutId, long parentLayoutId) throws PortalException; 1455 1456 /** 1457 * Updates the parent layout ID of the layout matching the primary key. If a 1458 * layout matching the parent primary key is found, the layout ID of that 1459 * layout is assigned, otherwise {@link 1460 * LayoutConstants#DEFAULT_PARENT_LAYOUT_ID} is assigned. 1461 * 1462 * @param plid the primary key of the layout 1463 * @param parentPlid the primary key of the parent layout 1464 * @return the layout matching the primary key 1465 */ 1466 public Layout updateParentLayoutId(long plid, long parentPlid) 1467 throws PortalException; 1468 1469 /** 1470 * Updates the parent layout ID and priority of the layout. 1471 * 1472 * @param plid the primary key of the layout 1473 * @param parentPlid the primary key of the parent layout 1474 * @param priority the layout's new priority 1475 * @return the layout matching the primary key 1476 */ 1477 public Layout updateParentLayoutIdAndPriority(long plid, long parentPlid, 1478 int priority) throws PortalException; 1479 1480 /** 1481 * Updates the priorities of the layouts. 1482 * 1483 * @param groupId the primary key of the group 1484 * @param privateLayout whether the layout is private to the group 1485 * @throws PortalException 1486 */ 1487 public void updatePriorities(long groupId, boolean privateLayout) 1488 throws PortalException; 1489 1490 /** 1491 * Updates the priority of the layout matching the group, layout ID, and 1492 * privacy, setting the layout's priority based on the priorities of the 1493 * next and previous layouts. 1494 * 1495 * @param groupId the primary key of the group 1496 * @param privateLayout whether the layout is private to the group 1497 * @param layoutId the primary key of the layout 1498 * @param nextLayoutId the primary key of the next layout 1499 * @param previousLayoutId the primary key of the previous layout 1500 * @return the updated layout 1501 */ 1502 public Layout updatePriority(long groupId, boolean privateLayout, 1503 long layoutId, long nextLayoutId, long previousLayoutId) 1504 throws PortalException; 1505 1506 /** 1507 * Updates the priority of the layout matching the group, layout ID, and 1508 * privacy. 1509 * 1510 * @param groupId the primary key of the group 1511 * @param privateLayout whether the layout is private to the group 1512 * @param layoutId the primary key of the layout 1513 * @param priority the layout's new priority 1514 * @return the updated layout 1515 */ 1516 public Layout updatePriority(long groupId, boolean privateLayout, 1517 long layoutId, int priority) throws PortalException; 1518 1519 /** 1520 * Updates the priority of the layout. 1521 * 1522 * @param layout the layout to be updated 1523 * @param priority the layout's new priority 1524 * @return the updated layout 1525 */ 1526 public Layout updatePriority(Layout layout, int priority) 1527 throws PortalException; 1528 1529 /** 1530 * Updates the priority of the layout matching the primary key. 1531 * 1532 * @param plid the primary key of the layout 1533 * @param priority the layout's new priority 1534 * @return the updated layout 1535 */ 1536 public Layout updatePriority(long plid, int priority) 1537 throws PortalException; 1538 1539 /** 1540 * @throws PortalException 1541 * @deprecated As of 7.0.0, replaced by {@link 1542 com.liferay.exportimport.kernel.service.ExportImportLocalService#validateImportLayoutsFile( 1543 ExportImportConfiguration, File)} 1544 */ 1545 @java.lang.Deprecated 1546 public MissingReferences validateImportLayoutsFile( 1547 ExportImportConfiguration exportImportConfiguration, File file) 1548 throws PortalException; 1549 1550 /** 1551 * @throws PortalException 1552 * @deprecated As of 7.0.0, replaced by {@link 1553 com.liferay.exportimport.kernel.service.ExportImportLocalService#validateImportLayoutsFile( 1554 ExportImportConfiguration, InputStream)} 1555 */ 1556 @java.lang.Deprecated 1557 public MissingReferences validateImportLayoutsFile( 1558 ExportImportConfiguration exportImportConfiguration, 1559 InputStream inputStream) throws PortalException; 1560 1561 /** 1562 * @throws PortalException 1563 * @deprecated As of 7.0.0, with no direct replacement 1564 */ 1565 @java.lang.Deprecated 1566 public MissingReferences validateImportLayoutsFile(long userId, 1567 long groupId, boolean privateLayout, 1568 Map<java.lang.String, java.lang.String[]> parameterMap, File file) 1569 throws PortalException; 1570 1571 /** 1572 * @throws PortalException 1573 * @deprecated As of 7.0.0, with no direct replacement 1574 */ 1575 @java.lang.Deprecated 1576 public MissingReferences validateImportLayoutsFile(long userId, 1577 long groupId, boolean privateLayout, 1578 Map<java.lang.String, java.lang.String[]> parameterMap, 1579 InputStream inputStream) throws PortalException; 1580 1581 /** 1582 * @throws PortalException 1583 * @deprecated As of 7.0.0, replaced by {@link 1584 com.liferay.exportimport.kernel.service.ExportImportLocalService#validateImportPortletInfo( 1585 ExportImportConfiguration, File)} 1586 */ 1587 @java.lang.Deprecated 1588 public MissingReferences validateImportPortletInfo( 1589 ExportImportConfiguration exportImportConfiguration, File file) 1590 throws PortalException; 1591 1592 /** 1593 * @throws PortalException 1594 * @deprecated As of 7.0.0, replaced by {@link 1595 com.liferay.exportimport.kernel.service.ExportImportLocalService#validateImportPortletInfo( 1596 ExportImportConfiguration, InputStream)} 1597 */ 1598 @java.lang.Deprecated 1599 public MissingReferences validateImportPortletInfo( 1600 ExportImportConfiguration exportImportConfiguration, 1601 InputStream inputStream) throws PortalException; 1602 1603 /** 1604 * @throws PortalException 1605 * @deprecated As of 7.0.0, with no direct replacement 1606 */ 1607 @java.lang.Deprecated 1608 public MissingReferences validateImportPortletInfo(long userId, long plid, 1609 long groupId, java.lang.String portletId, 1610 Map<java.lang.String, java.lang.String[]> parameterMap, File file) 1611 throws PortalException; 1612 1613 /** 1614 * @throws PortalException 1615 * @deprecated As of 7.0.0, with no direct replacement 1616 */ 1617 @java.lang.Deprecated 1618 public MissingReferences validateImportPortletInfo(long userId, long plid, 1619 long groupId, java.lang.String portletId, 1620 Map<java.lang.String, java.lang.String[]> parameterMap, 1621 InputStream inputStream) throws PortalException; 1622 }