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