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