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