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