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