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