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 that match the dynamic query. 401 * 402 * @param dynamicQuery the dynamic query 403 * @return the number of rows that match 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 that match 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 that match 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 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 856 public java.util.List<com.liferay.portal.model.Layout> getLayoutsByUuidAndCompanyId( 857 java.lang.String uuid, long companyId); 858 859 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 860 public java.util.List<com.liferay.portal.model.Layout> getLayoutsByUuidAndCompanyId( 861 java.lang.String uuid, long companyId, int start, int end, 862 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Layout> orderByComparator); 863 864 /** 865 * Returns the number of layouts. 866 * 867 * @return the number of layouts 868 */ 869 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 870 public int getLayoutsCount(); 871 872 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 873 public int getLayoutsCount(com.liferay.portal.model.Group group, 874 boolean privateLayout) 875 throws com.liferay.portal.kernel.exception.PortalException; 876 877 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 878 public int getLayoutsCount(com.liferay.portal.model.Group group, 879 boolean privateLayout, boolean includeUserGroups) 880 throws com.liferay.portal.kernel.exception.PortalException; 881 882 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 883 public int getLayoutsCount(com.liferay.portal.model.Group group, 884 boolean privateLayout, long parentLayoutId); 885 886 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 887 public int getLayoutsCount(com.liferay.portal.model.User user, 888 boolean privateLayout) 889 throws com.liferay.portal.kernel.exception.PortalException; 890 891 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 892 public int getLayoutsCount(com.liferay.portal.model.User user, 893 boolean privateLayout, boolean includeUserGroups) 894 throws com.liferay.portal.kernel.exception.PortalException; 895 896 /** 897 * Returns the primary key to use for the next layout. 898 * 899 * @param groupId the primary key of the group 900 * @param privateLayout whether the layout is private to the group 901 * @return the primary key to use for the next layout 902 */ 903 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 904 public long getNextLayoutId(long groupId, boolean privateLayout); 905 906 /** 907 * Returns all the layouts without resource permissions 908 * 909 * @param roleId the primary key of the role 910 * @return all the layouts without resource permissions 911 */ 912 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 913 public java.util.List<com.liferay.portal.model.Layout> getNoPermissionLayouts( 914 long roleId); 915 916 /** 917 * Returns all the layouts whose friendly URLs are <code>null</code> 918 * 919 * @return all the layouts whose friendly URLs are <code>null</code> 920 */ 921 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 922 public java.util.List<com.liferay.portal.model.Layout> getNullFriendlyURLLayouts(); 923 924 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 925 public com.liferay.portal.model.Layout getParentLayout( 926 com.liferay.portal.model.Layout layout) 927 throws com.liferay.portal.kernel.exception.PortalException; 928 929 @Override 930 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 931 public com.liferay.portal.model.PersistedModel getPersistedModel( 932 java.io.Serializable primaryKeyObj) 933 throws com.liferay.portal.kernel.exception.PortalException; 934 935 /** 936 * Returns all the layouts within scope of the group 937 * 938 * @param groupId the primary key of the group 939 * @param privateLayout whether the layout is private to the group 940 * @return the layouts within scope of the group 941 */ 942 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 943 public java.util.List<com.liferay.portal.model.Layout> getScopeGroupLayouts( 944 long groupId, boolean privateLayout); 945 946 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 947 public boolean hasLayoutSetPrototypeLayout(long layoutSetPrototypeId, 948 java.lang.String layoutUuid) 949 throws com.liferay.portal.kernel.exception.PortalException; 950 951 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 952 public boolean hasLayoutSetPrototypeLayout( 953 java.lang.String layoutSetPrototypeUuid, long companyId, 954 java.lang.String layoutUuid) 955 throws com.liferay.portal.kernel.exception.PortalException; 956 957 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 958 public boolean hasLayouts(com.liferay.portal.model.Group group, 959 boolean privateLayout) 960 throws com.liferay.portal.kernel.exception.PortalException; 961 962 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 963 public boolean hasLayouts(com.liferay.portal.model.Group group, 964 boolean privateLayout, boolean includeUserGroups) 965 throws com.liferay.portal.kernel.exception.PortalException; 966 967 /** 968 * Returns <code>true</code> if the group has any layouts; 969 * <code>false</code> otherwise. 970 * 971 * @param groupId the primary key of the group 972 * @param privateLayout whether the layout is private to the group 973 * @param parentLayoutId the primary key of the parent layout 974 * @return <code>true</code> if the group has any layouts; 975 <code>false</code> otherwise 976 */ 977 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 978 public boolean hasLayouts(long groupId, boolean privateLayout, 979 long parentLayoutId); 980 981 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 982 public boolean hasLayouts(com.liferay.portal.model.User user, 983 boolean privateLayout) 984 throws com.liferay.portal.kernel.exception.PortalException; 985 986 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 987 public boolean hasLayouts(com.liferay.portal.model.User user, 988 boolean privateLayout, boolean includeUserGroups) 989 throws com.liferay.portal.kernel.exception.PortalException; 990 991 /** 992 * Imports the layouts from the byte array. 993 * 994 * @param userId the primary key of the user 995 * @param groupId the primary key of the group 996 * @param privateLayout whether the layout is private to the group 997 * @param parameterMap the mapping of parameters indicating which 998 information will be imported. For information on the keys used in 999 the map see {@link 1000 com.liferay.portal.kernel.lar.PortletDataHandlerKeys}. 1001 * @param bytes the byte array with the data 1002 * @throws PortalException if a group or user with the primary key could not 1003 be found, or if some other portal exception occurred 1004 * @see com.liferay.portal.lar.LayoutImporter 1005 */ 1006 public void importLayouts(long userId, long groupId, boolean privateLayout, 1007 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 1008 byte[] bytes) 1009 throws com.liferay.portal.kernel.exception.PortalException; 1010 1011 /** 1012 * Imports the layouts from the file. 1013 * 1014 * @param userId the primary key of the user 1015 * @param groupId the primary key of the group 1016 * @param privateLayout whether the layout is private to the group 1017 * @param parameterMap the mapping of parameters indicating which 1018 information will be imported. For information on the keys used in 1019 the map see {@link 1020 com.liferay.portal.kernel.lar.PortletDataHandlerKeys}. 1021 * @param file the LAR file with the data 1022 * @throws PortalException if a group or user with the primary key could not 1023 be found, or if some other portal exception occurred 1024 * @see com.liferay.portal.lar.LayoutImporter 1025 */ 1026 public void importLayouts(long userId, long groupId, boolean privateLayout, 1027 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 1028 java.io.File file) 1029 throws com.liferay.portal.kernel.exception.PortalException; 1030 1031 /** 1032 * Imports the layouts from the input stream. 1033 * 1034 * @param userId the primary key of the user 1035 * @param groupId the primary key of the group 1036 * @param privateLayout whether the layout is private to the group 1037 * @param parameterMap the mapping of parameters indicating which 1038 information will be imported. For information on the keys used in 1039 the map see {@link 1040 com.liferay.portal.kernel.lar.PortletDataHandlerKeys}. 1041 * @param is the input stream 1042 * @throws PortalException if a group or user with the primary key could not 1043 be found, or if some other portal exception occurred 1044 * @see com.liferay.portal.lar.LayoutImporter 1045 */ 1046 public void importLayouts(long userId, long groupId, boolean privateLayout, 1047 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 1048 java.io.InputStream is) 1049 throws com.liferay.portal.kernel.exception.PortalException; 1050 1051 public long importLayoutsInBackground(long userId, 1052 java.lang.String taskName, long groupId, boolean privateLayout, 1053 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 1054 java.io.File file) 1055 throws com.liferay.portal.kernel.exception.PortalException; 1056 1057 public long importLayoutsInBackground(long userId, 1058 java.lang.String taskName, long groupId, boolean privateLayout, 1059 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 1060 java.io.InputStream is) 1061 throws com.liferay.portal.kernel.exception.PortalException; 1062 1063 /** 1064 * Imports the portlet information (categories, permissions, ... etc.) from 1065 * the file. 1066 * 1067 * @param userId the primary key of the user 1068 * @param plid the primary key of the target layout 1069 * @param groupId the primary key of the target group 1070 * @param portletId the primary key of the portlet 1071 * @param parameterMap the mapping of parameters indicating which 1072 information will be imported. For information on the keys used in 1073 the map see {@link 1074 com.liferay.portal.kernel.lar.PortletDataHandlerKeys}. 1075 * @param file the LAR file with the data 1076 * @throws PortalException if a group, layout, portlet or user with the 1077 primary key could not be found 1078 */ 1079 public void importPortletInfo(long userId, long plid, long groupId, 1080 java.lang.String portletId, 1081 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 1082 java.io.File file) 1083 throws com.liferay.portal.kernel.exception.PortalException; 1084 1085 /** 1086 * Imports the portlet information (categories, permissions, ... etc.) from 1087 * the input stream. 1088 * 1089 * @param userId the primary key of the user 1090 * @param plid the primary key of the layout 1091 * @param groupId the primary key of the group 1092 * @param portletId the primary key of the portlet 1093 * @param parameterMap the mapping of parameters indicating which 1094 information will be imported. For information on the keys used in 1095 the map see {@link 1096 com.liferay.portal.kernel.lar.PortletDataHandlerKeys}. 1097 * @param is the input stream 1098 * @throws PortalException if a group, portlet, layout or user with the 1099 primary key could not be found 1100 */ 1101 public void importPortletInfo(long userId, long plid, long groupId, 1102 java.lang.String portletId, 1103 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 1104 java.io.InputStream is) 1105 throws com.liferay.portal.kernel.exception.PortalException; 1106 1107 public void importPortletInfo(long userId, java.lang.String portletId, 1108 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 1109 java.io.File file) 1110 throws com.liferay.portal.kernel.exception.PortalException; 1111 1112 public void importPortletInfo(long userId, java.lang.String portletId, 1113 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 1114 java.io.InputStream is) 1115 throws com.liferay.portal.kernel.exception.PortalException; 1116 1117 public long importPortletInfoInBackground(long userId, 1118 java.lang.String taskName, long plid, long groupId, 1119 java.lang.String portletId, 1120 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 1121 java.io.File file) 1122 throws com.liferay.portal.kernel.exception.PortalException; 1123 1124 public long importPortletInfoInBackground(long userId, 1125 java.lang.String taskName, long plid, long groupId, 1126 java.lang.String portletId, 1127 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 1128 java.io.InputStream is) 1129 throws com.liferay.portal.kernel.exception.PortalException; 1130 1131 public long importPortletInfoInBackground(long userId, 1132 java.lang.String taskName, java.lang.String portletId, 1133 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 1134 java.io.File file) 1135 throws com.liferay.portal.kernel.exception.PortalException; 1136 1137 public long importPortletInfoInBackground(long userId, 1138 java.lang.String taskName, java.lang.String portletId, 1139 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 1140 java.io.InputStream is) 1141 throws com.liferay.portal.kernel.exception.PortalException; 1142 1143 /** 1144 * Sets the Spring bean ID for this bean. 1145 * 1146 * @param beanIdentifier the Spring bean ID for this bean 1147 */ 1148 public void setBeanIdentifier(java.lang.String beanIdentifier); 1149 1150 /** 1151 * Sets the layouts for the group, replacing and prioritizing all layouts of 1152 * the parent layout. 1153 * 1154 * @param groupId the primary key of the group 1155 * @param privateLayout whether the layout is private to the group 1156 * @param parentLayoutId the primary key of the parent layout 1157 * @param layoutIds the primary keys of the layouts 1158 * @param serviceContext the service context to be applied 1159 * @throws PortalException if a group or layout with the primary key could 1160 not be found, if no layouts were specified, if the first layout 1161 was not page-able, if the first layout was hidden, or if some 1162 other portal exception occurred 1163 */ 1164 public void setLayouts(long groupId, boolean privateLayout, 1165 long parentLayoutId, long[] layoutIds, 1166 com.liferay.portal.service.ServiceContext serviceContext) 1167 throws com.liferay.portal.kernel.exception.PortalException; 1168 1169 public void updateAsset(long userId, 1170 com.liferay.portal.model.Layout layout, long[] assetCategoryIds, 1171 java.lang.String[] assetTagNames) 1172 throws com.liferay.portal.kernel.exception.PortalException; 1173 1174 /** 1175 * Updates the friendly URL of the layout. 1176 * 1177 * @param plid the primary key of the layout 1178 * @param friendlyURL the friendly URL to be assigned 1179 * @param languageId the primary key of the language 1180 * @return the updated layout 1181 * @throws PortalException if a group or layout with the primary key 1182 could not be found 1183 * @deprecated As of 7.0.0, replaced by {@link #updateFriendlyURL(long, 1184 long, String, String)} 1185 */ 1186 @java.lang.Deprecated 1187 public com.liferay.portal.model.Layout updateFriendlyURL(long plid, 1188 java.lang.String friendlyURL, java.lang.String languageId) 1189 throws com.liferay.portal.kernel.exception.PortalException; 1190 1191 /** 1192 * Updates the friendly URL of the layout. 1193 * 1194 * @param userId the primary key of the user 1195 * @param plid the primary key of the layout 1196 * @param friendlyURL the friendly URL to be assigned 1197 * @param languageId the primary key of the language 1198 * @return the updated layout 1199 * @throws PortalException if a group or layout with the primary key could 1200 not be found 1201 */ 1202 public com.liferay.portal.model.Layout updateFriendlyURL(long userId, 1203 long plid, java.lang.String friendlyURL, java.lang.String languageId) 1204 throws com.liferay.portal.kernel.exception.PortalException; 1205 1206 public com.liferay.portal.model.Layout updateIconImage(long plid, 1207 byte[] bytes) 1208 throws com.liferay.portal.kernel.exception.PortalException; 1209 1210 /** 1211 * Updates the layout. 1212 * 1213 * @param groupId the primary key of the group 1214 * @param privateLayout whether the layout is private to the group 1215 * @param layoutId the primary key of the layout 1216 * @param parentLayoutId the primary key of the layout's new parent 1217 layout 1218 * @param nameMap the locales and localized names to merge (optionally 1219 <code>null</code>) 1220 * @param titleMap the locales and localized titles to merge 1221 (optionally <code>null</code>) 1222 * @param descriptionMap the locales and localized descriptions to 1223 merge (optionally <code>null</code>) 1224 * @param keywordsMap the locales and localized keywords to merge 1225 (optionally <code>null</code>) 1226 * @param robotsMap the locales and localized robots to merge 1227 (optionally <code>null</code>) 1228 * @param type the layout's new type (optionally {@link 1229 com.liferay.portal.model.LayoutConstants#TYPE_PORTLET}) 1230 * @param hidden whether the layout is hidden 1231 * @param friendlyURL the layout's new friendly URL (optionally {@link 1232 com.liferay.portal.util.PropsValues#DEFAULT_USER_PRIVATE_LAYOUT_FRIENDLY_URL} 1233 or {@link 1234 com.liferay.portal.util.PropsValues#DEFAULT_USER_PRIVATE_LAYOUT_FRIENDLY_URL}). 1235 The default values can be overridden in 1236 <code>portal-ext.properties</code> by specifying new values 1237 for the corresponding properties defined in {@link 1238 com.liferay.portal.util.PropsValues}. To see how the URL is 1239 normalized when accessed, see {@link 1240 com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize( 1241 String)}. 1242 * @param iconImage whether the icon image will be updated 1243 * @param iconBytes the byte array of the layout's new icon image 1244 * @param serviceContext the service context to be applied. Can set the 1245 modification date and expando bridge attributes for the 1246 layout. For layouts that are linked to a layout prototype, 1247 attributes named <code>layoutPrototypeUuid</code> and 1248 <code>layoutPrototypeLinkedEnabled</code> can be specified to 1249 provide the unique identifier of the source prototype and a 1250 boolean to determine whether a link to it should be enabled 1251 to activate propagation of changes made to the linked page in 1252 the prototype. 1253 * @return the updated layout 1254 * @throws PortalException if a group or layout with the primary key 1255 could not be found, if a unique friendly URL could not be 1256 generated, if a valid parent layout ID to use could not be 1257 found, if the layout parameters were invalid, or if a portal 1258 exception occurred 1259 * @deprecated As of 6.2.0, replaced by {@link #updateLayout(long, boolean, 1260 long, long, Map, Map, Map, Map, Map, String, boolean, Map, 1261 Boolean, byte[], ServiceContext)} 1262 */ 1263 @java.lang.Deprecated 1264 public com.liferay.portal.model.Layout updateLayout(long groupId, 1265 boolean privateLayout, long layoutId, long parentLayoutId, 1266 java.util.Map<java.util.Locale, java.lang.String> nameMap, 1267 java.util.Map<java.util.Locale, java.lang.String> titleMap, 1268 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 1269 java.util.Map<java.util.Locale, java.lang.String> keywordsMap, 1270 java.util.Map<java.util.Locale, java.lang.String> robotsMap, 1271 java.lang.String type, boolean hidden, java.lang.String friendlyURL, 1272 java.lang.Boolean iconImage, byte[] iconBytes, 1273 com.liferay.portal.service.ServiceContext serviceContext) 1274 throws com.liferay.portal.kernel.exception.PortalException; 1275 1276 /** 1277 * Updates the layout. 1278 * 1279 * @param groupId the primary key of the group 1280 * @param privateLayout whether the layout is private to the group 1281 * @param layoutId the primary key of the layout 1282 * @param parentLayoutId the primary key of the layout's new parent layout 1283 * @param nameMap the locales and localized names to merge (optionally 1284 <code>null</code>) 1285 * @param titleMap the locales and localized titles to merge (optionally 1286 <code>null</code>) 1287 * @param descriptionMap the locales and localized descriptions to merge 1288 (optionally <code>null</code>) 1289 * @param keywordsMap the locales and localized keywords to merge 1290 (optionally <code>null</code>) 1291 * @param robotsMap the locales and localized robots to merge (optionally 1292 <code>null</code>) 1293 * @param type the layout's new type (optionally {@link 1294 com.liferay.portal.model.LayoutConstants#TYPE_PORTLET}) 1295 * @param hidden whether the layout is hidden 1296 * @param friendlyURLMap the layout's locales and localized friendly URLs. 1297 To see how the URL is normalized when accessed, see {@link 1298 com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize( 1299 String)}. 1300 * @param iconImage whether the icon image will be updated 1301 * @param iconBytes the byte array of the layout's new icon image 1302 * @param serviceContext the service context to be applied. Can set the 1303 modification date and expando bridge attributes for the layout. 1304 For layouts that are linked to a layout prototype, attributes 1305 named <code>layoutPrototypeUuid</code> and 1306 <code>layoutPrototypeLinkedEnabled</code> can be specified to 1307 provide the unique identifier of the source prototype and a 1308 boolean to determine whether a link to it should be enabled to 1309 activate propagation of changes made to the linked page in the 1310 prototype. 1311 * @return the updated layout 1312 * @throws PortalException if a group or layout with the primary key could 1313 not be found, if a unique friendly URL could not be generated, if 1314 a valid parent layout ID to use could not be found, if the layout 1315 parameters were invalid, or if a portal exception occurred 1316 */ 1317 public com.liferay.portal.model.Layout updateLayout(long groupId, 1318 boolean privateLayout, long layoutId, long parentLayoutId, 1319 java.util.Map<java.util.Locale, java.lang.String> nameMap, 1320 java.util.Map<java.util.Locale, java.lang.String> titleMap, 1321 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 1322 java.util.Map<java.util.Locale, java.lang.String> keywordsMap, 1323 java.util.Map<java.util.Locale, java.lang.String> robotsMap, 1324 java.lang.String type, boolean hidden, 1325 java.util.Map<java.util.Locale, java.lang.String> friendlyURLMap, 1326 boolean iconImage, byte[] iconBytes, 1327 com.liferay.portal.service.ServiceContext serviceContext) 1328 throws com.liferay.portal.kernel.exception.PortalException; 1329 1330 /** 1331 * Updates the layout replacing its type settings. 1332 * 1333 * @param groupId the primary key of the group 1334 * @param privateLayout whether the layout is private to the group 1335 * @param layoutId the primary key of the layout 1336 * @param typeSettings the settings to load the unicode properties object. 1337 See {@link com.liferay.portal.kernel.util.UnicodeProperties 1338 #fastLoad(String)}. 1339 * @return the updated layout 1340 * @throws PortalException if a matching layout could not be found or if a 1341 portal exception occurred 1342 */ 1343 public com.liferay.portal.model.Layout updateLayout(long groupId, 1344 boolean privateLayout, long layoutId, java.lang.String typeSettings) 1345 throws com.liferay.portal.kernel.exception.PortalException; 1346 1347 /** 1348 * Updates the layout in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 1349 * 1350 * @param layout the layout 1351 * @return the layout that was updated 1352 */ 1353 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 1354 public com.liferay.portal.model.Layout updateLayout( 1355 com.liferay.portal.model.Layout layout); 1356 1357 /** 1358 * Updates the look and feel of the layout. 1359 * 1360 * @param groupId the primary key of the group 1361 * @param privateLayout whether the layout is private to the group 1362 * @param layoutId the primary key of the layout 1363 * @param themeId the primary key of the layout's new theme 1364 * @param colorSchemeId the primary key of the layout's new color scheme 1365 * @param css the layout's new CSS 1366 * @param wapTheme whether the theme is for WAP browsers 1367 * @return the updated layout 1368 * @throws PortalException if a matching layout could not be found 1369 */ 1370 public com.liferay.portal.model.Layout updateLookAndFeel(long groupId, 1371 boolean privateLayout, long layoutId, java.lang.String themeId, 1372 java.lang.String colorSchemeId, java.lang.String css, boolean wapTheme) 1373 throws com.liferay.portal.kernel.exception.PortalException; 1374 1375 /** 1376 * Updates the name of the layout matching the group, layout ID, and 1377 * privacy. 1378 * 1379 * @param groupId the primary key of the group 1380 * @param privateLayout whether the layout is private to the group 1381 * @param layoutId the primary key of the layout 1382 * @param name the layout's new name 1383 * @param languageId the primary key of the language. For more information 1384 see {@link java.util.Locale}. 1385 * @return the updated layout 1386 * @throws PortalException if a matching layout could not be found or if the 1387 new name was <code>null</code> 1388 */ 1389 public com.liferay.portal.model.Layout updateName(long groupId, 1390 boolean privateLayout, long layoutId, java.lang.String name, 1391 java.lang.String languageId) 1392 throws com.liferay.portal.kernel.exception.PortalException; 1393 1394 /** 1395 * Updates the name of the layout. 1396 * 1397 * @param layout the layout to be updated 1398 * @param name the layout's new name 1399 * @param languageId the primary key of the language. For more information 1400 see {@link java.util.Locale}. 1401 * @return the updated layout 1402 * @throws PortalException if the new name was <code>null</code> 1403 */ 1404 public com.liferay.portal.model.Layout updateName( 1405 com.liferay.portal.model.Layout layout, java.lang.String name, 1406 java.lang.String languageId) 1407 throws com.liferay.portal.kernel.exception.PortalException; 1408 1409 /** 1410 * Updates the name of the layout matching the primary key. 1411 * 1412 * @param plid the primary key of the layout 1413 * @param name the name to be assigned 1414 * @param languageId the primary key of the language. For more information 1415 see {@link java.util.Locale}. 1416 * @return the updated layout 1417 * @throws PortalException if a layout with the primary key could not be 1418 found or if the name was <code>null</code> 1419 */ 1420 public com.liferay.portal.model.Layout updateName(long plid, 1421 java.lang.String name, java.lang.String languageId) 1422 throws com.liferay.portal.kernel.exception.PortalException; 1423 1424 /** 1425 * Updates the parent layout ID of the layout matching the group, layout ID, 1426 * and privacy. 1427 * 1428 * @param groupId the primary key of the group 1429 * @param privateLayout whether the layout is private to the group 1430 * @param layoutId the primary key of the layout 1431 * @param parentLayoutId the primary key to be assigned to the parent 1432 layout 1433 * @return the matching layout 1434 * @throws PortalException if a valid parent layout ID to use could not be 1435 found or if a matching layout could not be found 1436 */ 1437 public com.liferay.portal.model.Layout updateParentLayoutId(long groupId, 1438 boolean privateLayout, long layoutId, long parentLayoutId) 1439 throws com.liferay.portal.kernel.exception.PortalException; 1440 1441 /** 1442 * Updates the parent layout ID of the layout matching the primary key. If a 1443 * layout matching the parent primary key is found, the layout ID of that 1444 * layout is assigned, otherwise {@link 1445 * com.liferay.portal.model.LayoutConstants#DEFAULT_PARENT_LAYOUT_ID} is 1446 * assigned. 1447 * 1448 * @param plid the primary key of the layout 1449 * @param parentPlid the primary key of the parent layout 1450 * @return the layout matching the primary key 1451 * @throws PortalException if a layout with the primary key could not be 1452 found or if a valid parent layout ID to use could not be found 1453 */ 1454 public com.liferay.portal.model.Layout updateParentLayoutId(long plid, 1455 long parentPlid) 1456 throws com.liferay.portal.kernel.exception.PortalException; 1457 1458 /** 1459 * Updates the parent layout ID and priority of the layout. 1460 * 1461 * @param plid the primary key of the layout 1462 * @param parentPlid the primary key of the parent layout 1463 * @param priority the layout's new priority 1464 * @return the layout matching the primary key 1465 * @throws PortalException if a layout with the primary key could not be 1466 found or if a valid parent layout ID could not be found 1467 */ 1468 public com.liferay.portal.model.Layout updateParentLayoutIdAndPriority( 1469 long plid, long parentPlid, int priority) 1470 throws com.liferay.portal.kernel.exception.PortalException; 1471 1472 /** 1473 * Updates the priorities of the layouts. 1474 * 1475 * @param groupId the primary key of the group 1476 * @param privateLayout whether the layout is private to the group 1477 * @throws PortalException if a matching layout could not be found 1478 */ 1479 public void updatePriorities(long groupId, boolean privateLayout) 1480 throws com.liferay.portal.kernel.exception.PortalException; 1481 1482 /** 1483 * Updates the priority of the layout matching the group, layout ID, and 1484 * privacy, setting the layout's priority based on the priorities of the 1485 * next and previous layouts. 1486 * 1487 * @param groupId the primary key of the group 1488 * @param privateLayout whether the layout is private to the group 1489 * @param layoutId the primary key of the layout 1490 * @param nextLayoutId the primary key of the next layout 1491 * @param previousLayoutId the primary key of the previous layout 1492 * @return the updated layout 1493 * @throws PortalException if a matching layout could not be found 1494 */ 1495 public com.liferay.portal.model.Layout updatePriority(long groupId, 1496 boolean privateLayout, long layoutId, long nextLayoutId, 1497 long previousLayoutId) 1498 throws com.liferay.portal.kernel.exception.PortalException; 1499 1500 /** 1501 * Updates the priority of the layout matching the group, layout ID, and 1502 * privacy. 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 priority the layout's new priority 1508 * @return the updated layout 1509 * @throws PortalException if a matching layout could not be found 1510 */ 1511 public com.liferay.portal.model.Layout updatePriority(long groupId, 1512 boolean privateLayout, long layoutId, int priority) 1513 throws com.liferay.portal.kernel.exception.PortalException; 1514 1515 /** 1516 * Updates the priority of the layout. 1517 * 1518 * @param layout the layout to be updated 1519 * @param priority the layout's new priority 1520 * @return the updated layout 1521 * @throws PortalException if a portal exception occurred 1522 */ 1523 public com.liferay.portal.model.Layout updatePriority( 1524 com.liferay.portal.model.Layout layout, int priority) 1525 throws com.liferay.portal.kernel.exception.PortalException; 1526 1527 /** 1528 * Updates the priority of the layout matching the primary key. 1529 * 1530 * @param plid the primary key of the layout 1531 * @param priority the layout's new priority 1532 * @return the updated layout 1533 * @throws PortalException if a layout with the primary key could not be 1534 found 1535 */ 1536 public com.liferay.portal.model.Layout updatePriority(long plid, 1537 int priority) 1538 throws com.liferay.portal.kernel.exception.PortalException; 1539 1540 /** 1541 * Updates the names of the portlets within scope of the group, the scope of 1542 * the layout's UUID, and the privacy. 1543 * 1544 * @param groupId the primary key of the group 1545 * @param privateLayout whether the layout is private to the group 1546 * @param layoutId the primary key of the layout whose UUID to match 1547 * @param name the new name for the portlets 1548 * @param languageId the primary key of the language 1549 * @throws PortalException if a matching layout could not be found 1550 * @see com.liferay.portlet.portletconfiguration.action.EditScopeAction 1551 * @deprecated As of 6.2.0, with no direct replacement 1552 */ 1553 @java.lang.Deprecated 1554 public void updateScopedPortletNames(long groupId, boolean privateLayout, 1555 long layoutId, java.lang.String name, java.lang.String languageId) 1556 throws com.liferay.portal.kernel.exception.PortalException; 1557 1558 /** 1559 * @deprecated As of 6.2.0, with no direct replacement 1560 */ 1561 @java.lang.Deprecated 1562 public void updateScopedPortletNames(long groupId, boolean privateLayout, 1563 long layoutId, 1564 java.util.Map<java.util.Locale, java.lang.String> nameMap, 1565 java.util.List<java.util.Locale> nameMapModifiedLocales) 1566 throws com.liferay.portal.kernel.exception.PortalException; 1567 1568 public com.liferay.portal.kernel.lar.MissingReferences validateImportLayoutsFile( 1569 long userId, long groupId, boolean privateLayout, 1570 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 1571 java.io.File file) 1572 throws com.liferay.portal.kernel.exception.PortalException; 1573 1574 public com.liferay.portal.kernel.lar.MissingReferences validateImportLayoutsFile( 1575 long userId, long groupId, boolean privateLayout, 1576 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 1577 java.io.InputStream inputStream) 1578 throws com.liferay.portal.kernel.exception.PortalException; 1579 1580 public com.liferay.portal.kernel.lar.MissingReferences validateImportPortletInfo( 1581 long userId, long plid, long groupId, java.lang.String portletId, 1582 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 1583 java.io.File file) 1584 throws com.liferay.portal.kernel.exception.PortalException; 1585 1586 public com.liferay.portal.kernel.lar.MissingReferences validateImportPortletInfo( 1587 long userId, long plid, long groupId, java.lang.String portletId, 1588 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 1589 java.io.InputStream inputStream) 1590 throws com.liferay.portal.kernel.exception.PortalException; 1591 }