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