001 /** 002 * Copyright (c) 2000-2013 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 aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 020 import com.liferay.portal.kernel.util.ReferenceRegistry; 021 022 /** 023 * Provides the local service utility for Layout. This utility wraps 024 * {@link com.liferay.portal.service.impl.LayoutLocalServiceImpl} and is the 025 * primary access point for service operations in application layer code running 026 * on the local server. Methods of this service will not have security checks 027 * based on the propagated JAAS credentials because this service can only be 028 * accessed from within the same VM. 029 * 030 * @author Brian Wing Shun Chan 031 * @see LayoutLocalService 032 * @see com.liferay.portal.service.base.LayoutLocalServiceBaseImpl 033 * @see com.liferay.portal.service.impl.LayoutLocalServiceImpl 034 * @generated 035 */ 036 @ProviderType 037 public class LayoutLocalServiceUtil { 038 /* 039 * NOTE FOR DEVELOPERS: 040 * 041 * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.LayoutLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. 042 */ 043 044 /** 045 * Adds the layout to the database. Also notifies the appropriate model listeners. 046 * 047 * @param layout the layout 048 * @return the layout that was added 049 * @throws SystemException if a system exception occurred 050 */ 051 public static com.liferay.portal.model.Layout addLayout( 052 com.liferay.portal.model.Layout layout) 053 throws com.liferay.portal.kernel.exception.SystemException { 054 return getService().addLayout(layout); 055 } 056 057 /** 058 * Creates a new layout with the primary key. Does not add the layout to the database. 059 * 060 * @param plid the primary key for the new layout 061 * @return the new layout 062 */ 063 public static com.liferay.portal.model.Layout createLayout(long plid) { 064 return getService().createLayout(plid); 065 } 066 067 /** 068 * Deletes the layout with the primary key from the database. Also notifies the appropriate model listeners. 069 * 070 * @param plid the primary key of the layout 071 * @return the layout that was removed 072 * @throws PortalException if a layout with the primary key could not be found 073 * @throws SystemException if a system exception occurred 074 */ 075 public static com.liferay.portal.model.Layout deleteLayout(long plid) 076 throws com.liferay.portal.kernel.exception.PortalException, 077 com.liferay.portal.kernel.exception.SystemException { 078 return getService().deleteLayout(plid); 079 } 080 081 /** 082 * Deletes the layout from the database. Also notifies the appropriate model listeners. 083 * 084 * @param layout the layout 085 * @return the layout that was removed 086 * @throws SystemException if a system exception occurred 087 */ 088 public static com.liferay.portal.model.Layout deleteLayout( 089 com.liferay.portal.model.Layout layout) 090 throws com.liferay.portal.kernel.exception.SystemException { 091 return getService().deleteLayout(layout); 092 } 093 094 public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { 095 return getService().dynamicQuery(); 096 } 097 098 /** 099 * Performs a dynamic query on the database and returns the matching rows. 100 * 101 * @param dynamicQuery the dynamic query 102 * @return the matching rows 103 * @throws SystemException if a system exception occurred 104 */ 105 @SuppressWarnings("rawtypes") 106 public static java.util.List dynamicQuery( 107 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) 108 throws com.liferay.portal.kernel.exception.SystemException { 109 return getService().dynamicQuery(dynamicQuery); 110 } 111 112 /** 113 * Performs a dynamic query on the database and returns a range of the matching rows. 114 * 115 * <p> 116 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.LayoutModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 117 * </p> 118 * 119 * @param dynamicQuery the dynamic query 120 * @param start the lower bound of the range of model instances 121 * @param end the upper bound of the range of model instances (not inclusive) 122 * @return the range of matching rows 123 * @throws SystemException if a system exception occurred 124 */ 125 @SuppressWarnings("rawtypes") 126 public static java.util.List dynamicQuery( 127 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 128 int end) throws com.liferay.portal.kernel.exception.SystemException { 129 return getService().dynamicQuery(dynamicQuery, start, end); 130 } 131 132 /** 133 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 134 * 135 * <p> 136 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.LayoutModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 137 * </p> 138 * 139 * @param dynamicQuery the dynamic query 140 * @param start the lower bound of the range of model instances 141 * @param end the upper bound of the range of model instances (not inclusive) 142 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 143 * @return the ordered range of matching rows 144 * @throws SystemException if a system exception occurred 145 */ 146 @SuppressWarnings("rawtypes") 147 public static java.util.List dynamicQuery( 148 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 149 int end, 150 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 151 throws com.liferay.portal.kernel.exception.SystemException { 152 return getService() 153 .dynamicQuery(dynamicQuery, start, end, orderByComparator); 154 } 155 156 /** 157 * Returns the number of rows that match the dynamic query. 158 * 159 * @param dynamicQuery the dynamic query 160 * @return the number of rows that match the dynamic query 161 * @throws SystemException if a system exception occurred 162 */ 163 public static long dynamicQueryCount( 164 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) 165 throws com.liferay.portal.kernel.exception.SystemException { 166 return getService().dynamicQueryCount(dynamicQuery); 167 } 168 169 /** 170 * Returns the number of rows that match the dynamic query. 171 * 172 * @param dynamicQuery the dynamic query 173 * @param projection the projection to apply to the query 174 * @return the number of rows that match the dynamic query 175 * @throws SystemException if a system exception occurred 176 */ 177 public static long dynamicQueryCount( 178 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 179 com.liferay.portal.kernel.dao.orm.Projection projection) 180 throws com.liferay.portal.kernel.exception.SystemException { 181 return getService().dynamicQueryCount(dynamicQuery, projection); 182 } 183 184 public static com.liferay.portal.model.Layout fetchLayout(long plid) 185 throws com.liferay.portal.kernel.exception.SystemException { 186 return getService().fetchLayout(plid); 187 } 188 189 /** 190 * Returns the layout with the matching UUID and company. 191 * 192 * @param uuid the layout's UUID 193 * @param companyId the primary key of the company 194 * @return the matching layout, or <code>null</code> if a matching layout could not be found 195 * @throws SystemException if a system exception occurred 196 */ 197 public static com.liferay.portal.model.Layout fetchLayoutByUuidAndCompanyId( 198 java.lang.String uuid, long companyId) 199 throws com.liferay.portal.kernel.exception.SystemException { 200 return getService().fetchLayoutByUuidAndCompanyId(uuid, companyId); 201 } 202 203 /** 204 * Returns the layout matching the UUID, group, and privacy. 205 * 206 * @param uuid the layout's UUID 207 * @param groupId the primary key of the group 208 * @param privateLayout whether the layout is private to the group 209 * @return the matching layout, or <code>null</code> if a matching layout could not be found 210 * @throws SystemException if a system exception occurred 211 */ 212 public static com.liferay.portal.model.Layout fetchLayoutByUuidAndGroupId( 213 java.lang.String uuid, long groupId, boolean privateLayout) 214 throws com.liferay.portal.kernel.exception.SystemException { 215 return getService() 216 .fetchLayoutByUuidAndGroupId(uuid, groupId, privateLayout); 217 } 218 219 /** 220 * Returns the layout with the primary key. 221 * 222 * @param plid the primary key of the layout 223 * @return the layout 224 * @throws PortalException if a layout with the primary key could not be found 225 * @throws SystemException if a system exception occurred 226 */ 227 public static com.liferay.portal.model.Layout getLayout(long plid) 228 throws com.liferay.portal.kernel.exception.PortalException, 229 com.liferay.portal.kernel.exception.SystemException { 230 return getService().getLayout(plid); 231 } 232 233 public static com.liferay.portal.model.PersistedModel getPersistedModel( 234 java.io.Serializable primaryKeyObj) 235 throws com.liferay.portal.kernel.exception.PortalException, 236 com.liferay.portal.kernel.exception.SystemException { 237 return getService().getPersistedModel(primaryKeyObj); 238 } 239 240 /** 241 * Returns the layout with the matching UUID and company. 242 * 243 * @param uuid the layout's UUID 244 * @param companyId the primary key of the company 245 * @return the matching layout 246 * @throws PortalException if a matching layout could not be found 247 * @throws SystemException if a system exception occurred 248 */ 249 public static com.liferay.portal.model.Layout getLayoutByUuidAndCompanyId( 250 java.lang.String uuid, long companyId) 251 throws com.liferay.portal.kernel.exception.PortalException, 252 com.liferay.portal.kernel.exception.SystemException { 253 return getService().getLayoutByUuidAndCompanyId(uuid, companyId); 254 } 255 256 /** 257 * Returns the layout matching the UUID, group, and privacy. 258 * 259 * @param uuid the layout's UUID 260 * @param groupId the primary key of the group 261 * @param privateLayout whether the layout is private to the group 262 * @return the matching layout 263 * @throws PortalException if a matching layout could not be found 264 * @throws SystemException if a system exception occurred 265 */ 266 public static com.liferay.portal.model.Layout getLayoutByUuidAndGroupId( 267 java.lang.String uuid, long groupId, boolean privateLayout) 268 throws com.liferay.portal.kernel.exception.PortalException, 269 com.liferay.portal.kernel.exception.SystemException { 270 return getService() 271 .getLayoutByUuidAndGroupId(uuid, groupId, privateLayout); 272 } 273 274 /** 275 * Returns a range of all the layouts. 276 * 277 * <p> 278 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.LayoutModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 279 * </p> 280 * 281 * @param start the lower bound of the range of layouts 282 * @param end the upper bound of the range of layouts (not inclusive) 283 * @return the range of layouts 284 * @throws SystemException if a system exception occurred 285 */ 286 public static java.util.List<com.liferay.portal.model.Layout> getLayouts( 287 int start, int end) 288 throws com.liferay.portal.kernel.exception.SystemException { 289 return getService().getLayouts(start, end); 290 } 291 292 /** 293 * Returns the number of layouts. 294 * 295 * @return the number of layouts 296 * @throws SystemException if a system exception occurred 297 */ 298 public static int getLayoutsCount() 299 throws com.liferay.portal.kernel.exception.SystemException { 300 return getService().getLayoutsCount(); 301 } 302 303 /** 304 * Updates the layout in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 305 * 306 * @param layout the layout 307 * @return the layout that was updated 308 * @throws SystemException if a system exception occurred 309 */ 310 public static com.liferay.portal.model.Layout updateLayout( 311 com.liferay.portal.model.Layout layout) 312 throws com.liferay.portal.kernel.exception.SystemException { 313 return getService().updateLayout(layout); 314 } 315 316 /** 317 * Returns the Spring bean ID for this bean. 318 * 319 * @return the Spring bean ID for this bean 320 */ 321 public static java.lang.String getBeanIdentifier() { 322 return getService().getBeanIdentifier(); 323 } 324 325 /** 326 * Sets the Spring bean ID for this bean. 327 * 328 * @param beanIdentifier the Spring bean ID for this bean 329 */ 330 public static void setBeanIdentifier(java.lang.String beanIdentifier) { 331 getService().setBeanIdentifier(beanIdentifier); 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 348 (optionally {@link 349 com.liferay.portal.model.LayoutConstants#DEFAULT_PARENT_LAYOUT_ID}) 350 * @param nameMap the layout's locales and localized names 351 * @param titleMap the layout's locales and localized titles 352 * @param descriptionMap the layout's locales and localized 353 descriptions 354 * @param keywordsMap the layout's locales and localized keywords 355 * @param robotsMap the layout's locales and localized robots 356 * @param type the layout's type (optionally {@link 357 com.liferay.portal.model.LayoutConstants#TYPE_PORTLET}). The 358 possible types can be found in {@link 359 com.liferay.portal.model.LayoutConstants}. 360 * @param hidden whether the layout is hidden 361 * @param friendlyURL the layout's friendly URL (optionally {@link 362 com.liferay.portal.util.PropsValues#DEFAULT_USER_PRIVATE_LAYOUT_FRIENDLY_URL} 363 or {@link 364 com.liferay.portal.util.PropsValues#DEFAULT_USER_PUBLIC_LAYOUT_FRIENDLY_URL}). 365 The default values can be overridden in 366 <code>portal-ext.properties</code> by specifying new values 367 for the corresponding properties defined in {@link 368 com.liferay.portal.util.PropsValues}. To see how the URL is 369 normalized when accessed, see {@link 370 com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize( 371 String)}. 372 * @param serviceContext the service context to be applied. Must set 373 the UUID for the layout. Can set the creation date, 374 modification date and the expando bridge attributes for the 375 layout. For layouts that belong to a layout set prototype, an 376 attribute named <code>layoutUpdateable</code> can be set to 377 specify whether site administrators can modify this page 378 within their site. For layouts that are created from a layout 379 prototype, attributes named <code>layoutPrototypeUuid</code> 380 and <code>layoutPrototypeLinkedEnabled</code> can be 381 specified to provide the unique identifier of the source 382 prototype and a boolean to determine whether a link to it 383 should be enabled to activate propagation of changes made to 384 the linked page in the prototype. 385 * @return the layout 386 * @throws PortalException if a group or user with the primary key could 387 not be found, if layout values were invalid, or if a portal 388 exception occurred 389 * @throws SystemException if a system exception occurred 390 * @deprecated As of 6.2.0, replaced by {@link #addLayout(long, long, 391 boolean, long, Map, Map, Map, Map, Map, String, String, 392 boolean, Map, ServiceContext)} 393 */ 394 public static com.liferay.portal.model.Layout addLayout(long userId, 395 long groupId, boolean privateLayout, long parentLayoutId, 396 java.util.Map<java.util.Locale, java.lang.String> nameMap, 397 java.util.Map<java.util.Locale, java.lang.String> titleMap, 398 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 399 java.util.Map<java.util.Locale, java.lang.String> keywordsMap, 400 java.util.Map<java.util.Locale, java.lang.String> robotsMap, 401 java.lang.String type, boolean hidden, java.lang.String friendlyURL, 402 com.liferay.portal.service.ServiceContext serviceContext) 403 throws com.liferay.portal.kernel.exception.PortalException, 404 com.liferay.portal.kernel.exception.SystemException { 405 return getService() 406 .addLayout(userId, groupId, privateLayout, parentLayoutId, 407 nameMap, titleMap, descriptionMap, keywordsMap, robotsMap, type, 408 hidden, friendlyURL, serviceContext); 409 } 410 411 /** 412 * Adds a layout with additional parameters. 413 * 414 * <p> 415 * This method handles the creation of the layout including its resources, 416 * metadata, and internal data structures. It is not necessary to make 417 * subsequent calls to any methods to setup default groups, resources, ... 418 * etc. 419 * </p> 420 * 421 * @param userId the primary key of the user 422 * @param groupId the primary key of the group 423 * @param privateLayout whether the layout is private to the group 424 * @param parentLayoutId the primary key of the parent layout (optionally 425 {@link 426 com.liferay.portal.model.LayoutConstants#DEFAULT_PARENT_LAYOUT_ID}) 427 * @param nameMap the layout's locales and localized names 428 * @param titleMap the layout's locales and localized titles 429 * @param descriptionMap the layout's locales and localized descriptions 430 * @param keywordsMap the layout's locales and localized keywords 431 * @param robotsMap the layout's locales and localized robots 432 * @param type the layout's type (optionally {@link 433 com.liferay.portal.model.LayoutConstants#TYPE_PORTLET}). The 434 possible types can be found in {@link 435 com.liferay.portal.model.LayoutConstants}. 436 * @param typeSettings the settings to load the unicode properties object. 437 See {@link com.liferay.portal.kernel.util.UnicodeProperties 438 #fastLoad(String)}. 439 * @param hidden whether the layout is hidden 440 * @param friendlyURLMap the layout's locales and localized friendly URLs. 441 To see how the URL is normalized when accessed, see {@link 442 com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize( 443 String)}. 444 * @param serviceContext the service context to be applied. Must set the 445 UUID for the layout. Can set the creation date, modification 446 date, and expando bridge attributes for the layout. For layouts 447 that belong to a layout set prototype, an attribute named 448 <code>layoutUpdateable</code> can be set to specify whether site 449 administrators can modify this page within their site. For 450 layouts that are created from a layout prototype, attributes 451 named <code>layoutPrototypeUuid</code> and 452 <code>layoutPrototypeLinkedEnabled</code> can be specified to 453 provide the unique identifier of the source prototype and a 454 boolean to determine whether a link to it should be enabled to 455 activate propagation of changes made to the linked page in the 456 prototype. 457 * @return the layout 458 * @throws PortalException if a group or user with the primary key could not 459 be found, if layout values were invalid, or if a portal exception 460 occurred 461 * @throws SystemException if a system exception occurred 462 */ 463 public static com.liferay.portal.model.Layout addLayout(long userId, 464 long groupId, boolean privateLayout, long parentLayoutId, 465 java.util.Map<java.util.Locale, java.lang.String> nameMap, 466 java.util.Map<java.util.Locale, java.lang.String> titleMap, 467 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 468 java.util.Map<java.util.Locale, java.lang.String> keywordsMap, 469 java.util.Map<java.util.Locale, java.lang.String> robotsMap, 470 java.lang.String type, java.lang.String typeSettings, boolean hidden, 471 java.util.Map<java.util.Locale, java.lang.String> friendlyURLMap, 472 com.liferay.portal.service.ServiceContext serviceContext) 473 throws com.liferay.portal.kernel.exception.PortalException, 474 com.liferay.portal.kernel.exception.SystemException { 475 return getService() 476 .addLayout(userId, groupId, privateLayout, parentLayoutId, 477 nameMap, titleMap, descriptionMap, keywordsMap, robotsMap, type, 478 typeSettings, hidden, friendlyURLMap, serviceContext); 479 } 480 481 /** 482 * Adds a layout with single entry maps for name, title, and description to 483 * the default locale. 484 * 485 * <p> 486 * This method handles the creation of the layout including its resources, 487 * metadata, and internal data structures. It is not necessary to make 488 * subsequent calls to any methods to setup default groups, resources, ... 489 * etc. 490 * </p> 491 * 492 * @param userId the primary key of the user 493 * @param groupId the primary key of the group 494 * @param privateLayout whether the layout is private to the group 495 * @param parentLayoutId the primary key of the parent layout (optionally 496 {@link 497 com.liferay.portal.model.LayoutConstants#DEFAULT_PARENT_LAYOUT_ID}). 498 The possible values can be found in {@link 499 com.liferay.portal.model.LayoutConstants}. 500 * @param name the layout's name (optionally {@link 501 com.liferay.portal.util.PropsValues#DEFAULT_USER_PRIVATE_LAYOUT_NAME} 502 or {@link 503 com.liferay.portal.util.PropsValues#DEFAULT_USER_PUBLIC_LAYOUT_NAME}). 504 The default values can be overridden in 505 <code>portal-ext.properties</code> by specifying new values for 506 the corresponding properties defined in {@link 507 com.liferay.portal.util.PropsValues} 508 * @param title the layout's title 509 * @param description the layout's description 510 * @param type the layout's type (optionally {@link 511 com.liferay.portal.model.LayoutConstants#TYPE_PORTLET}). The 512 possible types can be found in {@link 513 com.liferay.portal.model.LayoutConstants}. 514 * @param hidden whether the layout is hidden 515 * @param friendlyURL the friendly URL of the layout (optionally {@link 516 com.liferay.portal.util.PropsValues#DEFAULT_USER_PRIVATE_LAYOUT_FRIENDLY_URL} 517 or {@link 518 com.liferay.portal.util.PropsValues#DEFAULT_USER_PUBLIC_LAYOUT_FRIENDLY_URL}). 519 The default values can be overridden in 520 <code>portal-ext.properties</code> by specifying new values for 521 the corresponding properties defined in {@link 522 com.liferay.portal.util.PropsValues}. To see how the URL is 523 normalized when accessed, see {@link 524 com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize( 525 String)}. 526 * @param serviceContext the service context to be applied. Must set the 527 UUID for the layout. Can set the creation date and modification 528 date for the layout. For layouts that belong to a layout set 529 prototype, an attribute named <code>layoutUpdateable</code> can 530 be set to specify whether site administrators can modify this 531 page within their site. 532 * @return the layout 533 * @throws PortalException if a group or user with the primary key could not 534 be found, or if a portal exception occurred 535 * @throws SystemException if a system exception occurred 536 */ 537 public static com.liferay.portal.model.Layout addLayout(long userId, 538 long groupId, boolean privateLayout, long parentLayoutId, 539 java.lang.String name, java.lang.String title, 540 java.lang.String description, java.lang.String type, boolean hidden, 541 java.lang.String friendlyURL, 542 com.liferay.portal.service.ServiceContext serviceContext) 543 throws com.liferay.portal.kernel.exception.PortalException, 544 com.liferay.portal.kernel.exception.SystemException { 545 return getService() 546 .addLayout(userId, groupId, privateLayout, parentLayoutId, 547 name, title, description, type, hidden, friendlyURL, serviceContext); 548 } 549 550 /** 551 * Deletes the layout, its child layouts, and its associated resources. 552 * 553 * @param layout the layout 554 * @param updateLayoutSet whether the layout set's page counter needs to be 555 updated 556 * @param serviceContext the service context to be applied 557 * @throws PortalException if a portal exception occurred 558 * @throws SystemException if a system exception occurred 559 */ 560 public static void deleteLayout(com.liferay.portal.model.Layout layout, 561 boolean updateLayoutSet, 562 com.liferay.portal.service.ServiceContext serviceContext) 563 throws com.liferay.portal.kernel.exception.PortalException, 564 com.liferay.portal.kernel.exception.SystemException { 565 getService().deleteLayout(layout, updateLayoutSet, serviceContext); 566 } 567 568 /** 569 * Deletes the layout with the primary key, also deleting the layout's child 570 * layouts, and associated resources. 571 * 572 * @param groupId the primary key of the group 573 * @param privateLayout whether the layout is private to the group 574 * @param layoutId the primary key of the layout 575 * @param serviceContext the service context to be applied 576 * @throws PortalException if a matching layout could not be found , or if 577 some other portal exception occurred 578 * @throws SystemException if a system exception occurred 579 */ 580 public static void deleteLayout(long groupId, boolean privateLayout, 581 long layoutId, com.liferay.portal.service.ServiceContext serviceContext) 582 throws com.liferay.portal.kernel.exception.PortalException, 583 com.liferay.portal.kernel.exception.SystemException { 584 getService() 585 .deleteLayout(groupId, privateLayout, layoutId, serviceContext); 586 } 587 588 /** 589 * Deletes the layout with the plid, also deleting the layout's child 590 * layouts, and associated resources. 591 * 592 * @param plid the primary key of the layout 593 * @param serviceContext the service context to be applied 594 * @throws PortalException if a layout with the primary key could not be 595 found , or if some other portal exception occurred 596 * @throws SystemException if a system exception occurred 597 */ 598 public static void deleteLayout(long plid, 599 com.liferay.portal.service.ServiceContext serviceContext) 600 throws com.liferay.portal.kernel.exception.PortalException, 601 com.liferay.portal.kernel.exception.SystemException { 602 getService().deleteLayout(plid, serviceContext); 603 } 604 605 /** 606 * Deletes the group's private or non-private layouts, also deleting the 607 * layouts' child layouts, and associated resources. 608 * 609 * @param groupId the primary key of the group 610 * @param privateLayout whether the layout is private to the group 611 * @param serviceContext the service context to be applied. The parent 612 layout set's page count will be updated by default, unless an 613 attribute named <code>updatePageCount</code> is set to 614 <code>false</code>. 615 * @throws PortalException if a group with the primary key could not be 616 found or if a layout set for the group and privacy could not be 617 found 618 * @throws SystemException if a system exception occurred 619 */ 620 public static void deleteLayouts(long groupId, boolean privateLayout, 621 com.liferay.portal.service.ServiceContext serviceContext) 622 throws com.liferay.portal.kernel.exception.PortalException, 623 com.liferay.portal.kernel.exception.SystemException { 624 getService().deleteLayouts(groupId, privateLayout, serviceContext); 625 } 626 627 /** 628 * Exports layouts with the primary keys and criteria as a byte array. 629 * 630 * @param groupId the primary key of the group 631 * @param privateLayout whether the layout is private to the group 632 * @param layoutIds the primary keys of the layouts to be exported 633 * @param parameterMap the mapping of parameters indicating which 634 information to export. For information on the keys used in the 635 map see {@link 636 com.liferay.portal.kernel.lar.PortletDataHandlerKeys}. 637 * @param startDate the export's start date 638 * @param endDate the export's end date 639 * @return the layouts as a byte array 640 * @throws PortalException if a group or any layout with the primary key 641 could not be found, or if some other portal exception occurred 642 * @throws SystemException if a system exception occurred 643 */ 644 public static byte[] exportLayouts(long groupId, boolean privateLayout, 645 long[] layoutIds, 646 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 647 java.util.Date startDate, java.util.Date endDate) 648 throws com.liferay.portal.kernel.exception.PortalException, 649 com.liferay.portal.kernel.exception.SystemException { 650 return getService() 651 .exportLayouts(groupId, privateLayout, layoutIds, 652 parameterMap, startDate, endDate); 653 } 654 655 /** 656 * Exports all layouts that match the criteria as a byte array. 657 * 658 * @param groupId the primary key of the group 659 * @param privateLayout whether the layout is private to the group 660 * @param parameterMap the mapping of parameters indicating which 661 information to export. For information on the keys used in the 662 map see {@link 663 com.liferay.portal.kernel.lar.PortletDataHandlerKeys}. 664 * @param startDate the export's start date 665 * @param endDate the export's end date 666 * @return the layout as a byte array 667 * @throws PortalException if a group with the primary key could not be 668 found or if some other portal exception occurred 669 * @throws SystemException if a system exception occurred 670 */ 671 public static byte[] exportLayouts(long groupId, boolean privateLayout, 672 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 673 java.util.Date startDate, java.util.Date endDate) 674 throws com.liferay.portal.kernel.exception.PortalException, 675 com.liferay.portal.kernel.exception.SystemException { 676 return getService() 677 .exportLayouts(groupId, privateLayout, parameterMap, 678 startDate, endDate); 679 } 680 681 /** 682 * Exports the layouts that match the primary keys and criteria as a file. 683 * 684 * @param groupId the primary key of the group 685 * @param privateLayout whether the layout is private to the group 686 * @param layoutIds the primary keys of the layouts to be exported 687 (optionally <code>null</code>) 688 * @param parameterMap the mapping of parameters indicating which 689 information to export. For information on the keys used in the 690 map see {@link 691 com.liferay.portal.kernel.lar.PortletDataHandlerKeys}. 692 * @param startDate the export's start date 693 * @param endDate the export's end date 694 * @return the layouts as a File 695 * @throws PortalException if a group or any layout with the primary key 696 could not be found, or if some other portal exception occurred 697 * @throws SystemException if a system exception occurred 698 */ 699 public static java.io.File exportLayoutsAsFile(long groupId, 700 boolean privateLayout, long[] layoutIds, 701 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 702 java.util.Date startDate, java.util.Date endDate) 703 throws com.liferay.portal.kernel.exception.PortalException, 704 com.liferay.portal.kernel.exception.SystemException { 705 return getService() 706 .exportLayoutsAsFile(groupId, privateLayout, layoutIds, 707 parameterMap, startDate, endDate); 708 } 709 710 public static long exportLayoutsAsFileInBackground(long userId, 711 java.lang.String taskName, long groupId, boolean privateLayout, 712 long[] layoutIds, 713 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 714 java.util.Date startDate, java.util.Date endDate, 715 java.lang.String fileName) 716 throws com.liferay.portal.kernel.exception.PortalException, 717 com.liferay.portal.kernel.exception.SystemException { 718 return getService() 719 .exportLayoutsAsFileInBackground(userId, taskName, groupId, 720 privateLayout, layoutIds, parameterMap, startDate, endDate, fileName); 721 } 722 723 /** 724 * Exports the portlet information (categories, permissions, ... etc.) as a 725 * byte array. 726 * 727 * @param plid the primary key of the layout 728 * @param groupId the primary key of the group 729 * @param portletId the primary key of the portlet 730 * @param parameterMap the mapping of parameters indicating which 731 information to export. For information on the keys used in the 732 map see {@link 733 com.liferay.portal.kernel.lar.PortletDataHandlerKeys}. 734 * @param startDate the export's start date 735 * @param endDate the export's end date 736 * @return the portlet information as a byte array 737 * @throws PortalException if a group or portlet with the primary key could 738 not be found, or if some other portal exception occurred 739 * @throws SystemException if a system exception occurred 740 */ 741 public static byte[] exportPortletInfo(long plid, long groupId, 742 java.lang.String portletId, 743 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 744 java.util.Date startDate, java.util.Date endDate) 745 throws com.liferay.portal.kernel.exception.PortalException, 746 com.liferay.portal.kernel.exception.SystemException { 747 return getService() 748 .exportPortletInfo(plid, groupId, portletId, parameterMap, 749 startDate, endDate); 750 } 751 752 public static byte[] exportPortletInfo(long companyId, 753 java.lang.String portletId, 754 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 755 java.util.Date startDate, java.util.Date endDate) 756 throws com.liferay.portal.kernel.exception.PortalException, 757 com.liferay.portal.kernel.exception.SystemException { 758 return getService() 759 .exportPortletInfo(companyId, portletId, parameterMap, 760 startDate, endDate); 761 } 762 763 /** 764 * Exports the portlet information (categories, permissions, ... etc.) as a 765 * file. 766 * 767 * @param plid the primary key of the layout 768 * @param groupId the primary key of the group 769 * @param portletId the primary key of the portlet 770 * @param parameterMap the mapping of parameters indicating which 771 information to export. For information on the keys used in the 772 map see {@link 773 com.liferay.portal.kernel.lar.PortletDataHandlerKeys}. 774 * @param startDate the export's start date 775 * @param endDate the export's end date 776 * @return the portlet information as a file 777 * @throws PortalException if a group or portlet with the primary key could 778 not be found, or if some other portal exception occurred 779 * @throws SystemException if a system exception occurred 780 */ 781 public static java.io.File exportPortletInfoAsFile(long plid, long groupId, 782 java.lang.String portletId, 783 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 784 java.util.Date startDate, java.util.Date endDate) 785 throws com.liferay.portal.kernel.exception.PortalException, 786 com.liferay.portal.kernel.exception.SystemException { 787 return getService() 788 .exportPortletInfoAsFile(plid, groupId, portletId, 789 parameterMap, startDate, endDate); 790 } 791 792 public static java.io.File exportPortletInfoAsFile(long companyId, 793 java.lang.String portletId, 794 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 795 java.util.Date startDate, java.util.Date endDate) 796 throws com.liferay.portal.kernel.exception.PortalException, 797 com.liferay.portal.kernel.exception.SystemException { 798 return getService() 799 .exportPortletInfoAsFile(companyId, portletId, parameterMap, 800 startDate, endDate); 801 } 802 803 public static long exportPortletInfoAsFileInBackground(long userId, 804 java.lang.String taskName, long plid, long groupId, 805 java.lang.String portletId, 806 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 807 java.util.Date startDate, java.util.Date endDate, 808 java.lang.String fileName) 809 throws com.liferay.portal.kernel.exception.PortalException, 810 com.liferay.portal.kernel.exception.SystemException { 811 return getService() 812 .exportPortletInfoAsFileInBackground(userId, taskName, plid, 813 groupId, portletId, parameterMap, startDate, endDate, fileName); 814 } 815 816 public static long exportPortletInfoAsFileInBackground(long userId, 817 java.lang.String taskName, java.lang.String portletId, 818 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 819 java.util.Date startDate, java.util.Date endDate, 820 java.lang.String fileName) 821 throws com.liferay.portal.kernel.exception.PortalException, 822 com.liferay.portal.kernel.exception.SystemException { 823 return getService() 824 .exportPortletInfoAsFileInBackground(userId, taskName, 825 portletId, parameterMap, startDate, endDate, fileName); 826 } 827 828 public static com.liferay.portal.model.Layout fetchFirstLayout( 829 long groupId, boolean privateLayout, long parentLayoutId) 830 throws com.liferay.portal.kernel.exception.SystemException { 831 return getService() 832 .fetchFirstLayout(groupId, privateLayout, parentLayoutId); 833 } 834 835 public static com.liferay.portal.model.Layout fetchLayout(long groupId, 836 boolean privateLayout, long layoutId) 837 throws com.liferay.portal.kernel.exception.SystemException { 838 return getService().fetchLayout(groupId, privateLayout, layoutId); 839 } 840 841 public static com.liferay.portal.model.Layout fetchLayoutByFriendlyURL( 842 long groupId, boolean privateLayout, java.lang.String friendlyURL) 843 throws com.liferay.portal.kernel.exception.SystemException { 844 return getService() 845 .fetchLayoutByFriendlyURL(groupId, privateLayout, friendlyURL); 846 } 847 848 /** 849 * Returns the primary key of the default layout for the group 850 * 851 * @param groupId the primary key of the group 852 * @return the primary key of the default layout for the group (optionally 853 {@link com.liferay.portal.model.LayoutConstants#DEFAULT_PLID}) 854 * @throws SystemException if a system exception occurred 855 */ 856 public static long getDefaultPlid(long groupId) 857 throws com.liferay.portal.kernel.exception.SystemException { 858 return getService().getDefaultPlid(groupId); 859 } 860 861 /** 862 * Returns primary key of the matching default layout for the group 863 * 864 * @param groupId the primary key of the group 865 * @param privateLayout whether the layout is private to the group 866 * @return the primary key of the default layout for the group; {@link 867 com.liferay.portal.model.LayoutConstants#DEFAULT_PLID}) otherwise 868 * @throws SystemException if a system exception occurred 869 */ 870 public static long getDefaultPlid(long groupId, boolean privateLayout) 871 throws com.liferay.portal.kernel.exception.SystemException { 872 return getService().getDefaultPlid(groupId, privateLayout); 873 } 874 875 /** 876 * Returns primary key of the default portlet layout for the group 877 * 878 * @param groupId the primary key of the group 879 * @param privateLayout whether the layout is private to the group 880 * @param portletId the primary key of the portlet 881 * @return the primary key of the default portlet layout for the group; 882 {@link com.liferay.portal.model.LayoutConstants#DEFAULT_PLID} 883 otherwise 884 * @throws PortalException if a portlet with the primary key could not be 885 found 886 * @throws SystemException if a system exception occurred 887 */ 888 public static long getDefaultPlid(long groupId, boolean privateLayout, 889 java.lang.String portletId) 890 throws com.liferay.portal.kernel.exception.PortalException, 891 com.liferay.portal.kernel.exception.SystemException { 892 return getService().getDefaultPlid(groupId, privateLayout, portletId); 893 } 894 895 /** 896 * Returns the layout for the friendly URL 897 * 898 * @param groupId the primary key of the group 899 * @param privateLayout whether the layout is private to the group 900 * @param friendlyURL the friendly URL of the layout 901 * @return the layout for the friendly URL 902 * @throws PortalException if the friendly URL is <code>null</code> or a 903 matching layout could not be found 904 * @throws SystemException if a system exception occurred 905 */ 906 public static com.liferay.portal.model.Layout getFriendlyURLLayout( 907 long groupId, boolean privateLayout, java.lang.String friendlyURL) 908 throws com.liferay.portal.kernel.exception.PortalException, 909 com.liferay.portal.kernel.exception.SystemException { 910 return getService() 911 .getFriendlyURLLayout(groupId, privateLayout, friendlyURL); 912 } 913 914 /** 915 * Returns the layout matching the primary key, group, and privacy; throws a 916 * {@link com.liferay.portal.NoSuchLayoutException} otherwise. 917 * 918 * @param groupId the primary key of the group 919 * @param privateLayout whether the layout is private to the group 920 * @param layoutId the primary key of the layout 921 * @return the matching layout 922 * @throws PortalException if a matching layout could not be found 923 * @throws SystemException if a system exception occurred 924 */ 925 public static com.liferay.portal.model.Layout getLayout(long groupId, 926 boolean privateLayout, long layoutId) 927 throws com.liferay.portal.kernel.exception.PortalException, 928 com.liferay.portal.kernel.exception.SystemException { 929 return getService().getLayout(groupId, privateLayout, layoutId); 930 } 931 932 /** 933 * Returns the layout for the icon image; throws a {@link 934 * com.liferay.portal.NoSuchLayoutException} otherwise. 935 * 936 * @param iconImageId the primary key of the icon image 937 * @return Returns the layout for the icon image 938 * @throws PortalException if an icon image with the primary key could not 939 be found 940 * @throws SystemException if a system exception occurred 941 */ 942 public static com.liferay.portal.model.Layout getLayoutByIconImageId( 943 long iconImageId) 944 throws com.liferay.portal.kernel.exception.PortalException, 945 com.liferay.portal.kernel.exception.SystemException { 946 return getService().getLayoutByIconImageId(iconImageId); 947 } 948 949 /** 950 * Returns all the layouts belonging to the group. 951 * 952 * @param groupId the primary key of the group 953 * @param privateLayout whether the layout is private to the group 954 * @return the matching layouts, or <code>null</code> if no matches were 955 found 956 * @throws SystemException if a system exception occurred 957 */ 958 public static java.util.List<com.liferay.portal.model.Layout> getLayouts( 959 long groupId, boolean privateLayout) 960 throws com.liferay.portal.kernel.exception.SystemException { 961 return getService().getLayouts(groupId, privateLayout); 962 } 963 964 /** 965 * Returns all the layouts belonging to the group that are children of the 966 * parent layout. 967 * 968 * @param groupId the primary key of the group 969 * @param privateLayout whether the layout is private to the group 970 * @param parentLayoutId the primary key of the parent layout 971 * @return the matching layouts, or <code>null</code> if no matches were 972 found 973 * @throws SystemException if a system exception occurred 974 */ 975 public static java.util.List<com.liferay.portal.model.Layout> getLayouts( 976 long groupId, boolean privateLayout, long parentLayoutId) 977 throws com.liferay.portal.kernel.exception.SystemException { 978 return getService().getLayouts(groupId, privateLayout, parentLayoutId); 979 } 980 981 /** 982 * Returns a range of all the layouts belonging to the group that are 983 * children of the parent layout. 984 * 985 * <p> 986 * Useful when paginating results. Returns a maximum of <code>end - 987 * start</code> instances. <code>start</code> and <code>end</code> are not 988 * primary keys, they are indexes in the result set. Thus, <code>0</code> 989 * refers to the first result in the set. Setting both <code>start</code> 990 * and <code>end</code> to {@link 991 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 992 * result set. 993 * </p> 994 * 995 * @param groupId the primary key of the group 996 * @param privateLayout whether the layout is private to the group 997 * @param parentLayoutId the primary key of the parent layout 998 * @param incomplete whether the layout is incomplete 999 * @param start the lower bound of the range of layouts 1000 * @param end the upper bound of the range of layouts (not inclusive) 1001 * @return the matching layouts, or <code>null</code> if no matches were 1002 found 1003 * @throws SystemException if a system exception occurred 1004 */ 1005 public static java.util.List<com.liferay.portal.model.Layout> getLayouts( 1006 long groupId, boolean privateLayout, long parentLayoutId, 1007 boolean incomplete, int start, int end) 1008 throws com.liferay.portal.kernel.exception.SystemException { 1009 return getService() 1010 .getLayouts(groupId, privateLayout, parentLayoutId, 1011 incomplete, start, end); 1012 } 1013 1014 /** 1015 * Returns all the layouts that match the layout IDs and belong to the 1016 * group. 1017 * 1018 * @param groupId the primary key of the group 1019 * @param privateLayout whether the layout is private to the group 1020 * @param layoutIds the primary keys of the layouts 1021 * @return the matching layouts, or an empty list if no matches were found 1022 * @throws PortalException if a group or layout with the primary key could 1023 not be found 1024 * @throws SystemException if a system exception occurred 1025 */ 1026 public static java.util.List<com.liferay.portal.model.Layout> getLayouts( 1027 long groupId, boolean privateLayout, long[] layoutIds) 1028 throws com.liferay.portal.kernel.exception.PortalException, 1029 com.liferay.portal.kernel.exception.SystemException { 1030 return getService().getLayouts(groupId, privateLayout, layoutIds); 1031 } 1032 1033 /** 1034 * Returns all the layouts that match the type and belong to the group. 1035 * 1036 * @param groupId the primary key of the group 1037 * @param privateLayout whether the layout is private to the group 1038 * @param type the type of the layouts (optionally {@link 1039 com.liferay.portal.model.LayoutConstants#TYPE_PORTLET}) 1040 * @return the matching layouts, or <code>null</code> if no matches were 1041 found 1042 * @throws SystemException if a system exception occurred 1043 */ 1044 public static java.util.List<com.liferay.portal.model.Layout> getLayouts( 1045 long groupId, boolean privateLayout, java.lang.String type) 1046 throws com.liferay.portal.kernel.exception.SystemException { 1047 return getService().getLayouts(groupId, privateLayout, type); 1048 } 1049 1050 /** 1051 * Returns the layout references for all the layouts that belong to the 1052 * company and belong to the portlet that matches the preferences. 1053 * 1054 * @param companyId the primary key of the company 1055 * @param portletId the primary key of the portlet 1056 * @param preferencesKey the portlet's preference key 1057 * @param preferencesValue the portlet's preference value 1058 * @return the layout references of the matching layouts 1059 * @throws SystemException if a system exception occurred 1060 */ 1061 public static com.liferay.portal.model.LayoutReference[] getLayouts( 1062 long companyId, java.lang.String portletId, 1063 java.lang.String preferencesKey, java.lang.String preferencesValue) 1064 throws com.liferay.portal.kernel.exception.SystemException { 1065 return getService() 1066 .getLayouts(companyId, portletId, preferencesKey, 1067 preferencesValue); 1068 } 1069 1070 public static java.util.List<com.liferay.portal.model.Layout> getLayoutsByLayoutPrototypeUuid( 1071 java.lang.String layoutPrototypeUuid) 1072 throws com.liferay.portal.kernel.exception.SystemException { 1073 return getService().getLayoutsByLayoutPrototypeUuid(layoutPrototypeUuid); 1074 } 1075 1076 public static int getLayoutsByLayoutPrototypeUuidCount( 1077 java.lang.String layoutPrototypeUuid) 1078 throws com.liferay.portal.kernel.exception.SystemException { 1079 return getService() 1080 .getLayoutsByLayoutPrototypeUuidCount(layoutPrototypeUuid); 1081 } 1082 1083 public static int getLayoutsCount(com.liferay.portal.model.Group group, 1084 boolean privateLayout) 1085 throws com.liferay.portal.kernel.exception.PortalException, 1086 com.liferay.portal.kernel.exception.SystemException { 1087 return getService().getLayoutsCount(group, privateLayout); 1088 } 1089 1090 public static int getLayoutsCount(com.liferay.portal.model.Group group, 1091 boolean privateLayout, boolean includeUserGroups) 1092 throws com.liferay.portal.kernel.exception.PortalException, 1093 com.liferay.portal.kernel.exception.SystemException { 1094 return getService() 1095 .getLayoutsCount(group, privateLayout, includeUserGroups); 1096 } 1097 1098 public static int getLayoutsCount(com.liferay.portal.model.User user, 1099 boolean privateLayout) 1100 throws com.liferay.portal.kernel.exception.PortalException, 1101 com.liferay.portal.kernel.exception.SystemException { 1102 return getService().getLayoutsCount(user, privateLayout); 1103 } 1104 1105 public static int getLayoutsCount(com.liferay.portal.model.User user, 1106 boolean privateLayout, boolean includeUserGroups) 1107 throws com.liferay.portal.kernel.exception.PortalException, 1108 com.liferay.portal.kernel.exception.SystemException { 1109 return getService() 1110 .getLayoutsCount(user, privateLayout, includeUserGroups); 1111 } 1112 1113 /** 1114 * Returns the primary key to use for the next layout. 1115 * 1116 * @param groupId the primary key of the group 1117 * @param privateLayout whether the layout is private to the group 1118 * @return the primary key to use for the next layout 1119 * @throws SystemException if a system exception occurred 1120 */ 1121 public static long getNextLayoutId(long groupId, boolean privateLayout) 1122 throws com.liferay.portal.kernel.exception.SystemException { 1123 return getService().getNextLayoutId(groupId, privateLayout); 1124 } 1125 1126 /** 1127 * Returns all the layouts without resource permissions 1128 * 1129 * @param roleId the primary key of the role 1130 * @return all the layouts without resource permissions 1131 * @throws SystemException if a system exception occurred 1132 */ 1133 public static java.util.List<com.liferay.portal.model.Layout> getNoPermissionLayouts( 1134 long roleId) throws com.liferay.portal.kernel.exception.SystemException { 1135 return getService().getNoPermissionLayouts(roleId); 1136 } 1137 1138 /** 1139 * Returns all the layouts whose friendly URLs are <code>null</code> 1140 * 1141 * @return all the layouts whose friendly URLs are <code>null</code> 1142 * @throws SystemException if a system exception occurred 1143 */ 1144 public static java.util.List<com.liferay.portal.model.Layout> getNullFriendlyURLLayouts() 1145 throws com.liferay.portal.kernel.exception.SystemException { 1146 return getService().getNullFriendlyURLLayouts(); 1147 } 1148 1149 public static com.liferay.portal.model.Layout getParentLayout( 1150 com.liferay.portal.model.Layout layout) 1151 throws com.liferay.portal.kernel.exception.PortalException, 1152 com.liferay.portal.kernel.exception.SystemException { 1153 return getService().getParentLayout(layout); 1154 } 1155 1156 /** 1157 * Returns all the layouts within scope of the group 1158 * 1159 * @param groupId the primary key of the group 1160 * @param privateLayout whether the layout is private to the group 1161 * @return the layouts within scope of the group 1162 * @throws SystemException if a system exception occurred 1163 */ 1164 public static java.util.List<com.liferay.portal.model.Layout> getScopeGroupLayouts( 1165 long groupId, boolean privateLayout) 1166 throws com.liferay.portal.kernel.exception.SystemException { 1167 return getService().getScopeGroupLayouts(groupId, privateLayout); 1168 } 1169 1170 public static boolean hasLayouts(com.liferay.portal.model.Group group, 1171 boolean privateLayout) 1172 throws com.liferay.portal.kernel.exception.PortalException, 1173 com.liferay.portal.kernel.exception.SystemException { 1174 return getService().hasLayouts(group, privateLayout); 1175 } 1176 1177 public static boolean hasLayouts(com.liferay.portal.model.Group group, 1178 boolean privateLayout, boolean includeUserGroups) 1179 throws com.liferay.portal.kernel.exception.PortalException, 1180 com.liferay.portal.kernel.exception.SystemException { 1181 return getService().hasLayouts(group, privateLayout, includeUserGroups); 1182 } 1183 1184 /** 1185 * Returns <code>true</code> if the group has any layouts; 1186 * <code>false</code> otherwise. 1187 * 1188 * @param groupId the primary key of the group 1189 * @param privateLayout whether the layout is private to the group 1190 * @param parentLayoutId the primary key of the parent layout 1191 * @return <code>true</code> if the group has any layouts; 1192 <code>false</code> otherwise 1193 * @throws SystemException if a system exception occurred 1194 */ 1195 public static boolean hasLayouts(long groupId, boolean privateLayout, 1196 long parentLayoutId) 1197 throws com.liferay.portal.kernel.exception.SystemException { 1198 return getService().hasLayouts(groupId, privateLayout, parentLayoutId); 1199 } 1200 1201 public static boolean hasLayouts(com.liferay.portal.model.User user, 1202 boolean privateLayout) 1203 throws com.liferay.portal.kernel.exception.PortalException, 1204 com.liferay.portal.kernel.exception.SystemException { 1205 return getService().hasLayouts(user, privateLayout); 1206 } 1207 1208 public static boolean hasLayouts(com.liferay.portal.model.User user, 1209 boolean privateLayout, boolean includeUserGroups) 1210 throws com.liferay.portal.kernel.exception.PortalException, 1211 com.liferay.portal.kernel.exception.SystemException { 1212 return getService().hasLayouts(user, privateLayout, includeUserGroups); 1213 } 1214 1215 public static boolean hasLayoutSetPrototypeLayout( 1216 long layoutSetPrototypeId, java.lang.String layoutUuid) 1217 throws com.liferay.portal.kernel.exception.PortalException, 1218 com.liferay.portal.kernel.exception.SystemException { 1219 return getService() 1220 .hasLayoutSetPrototypeLayout(layoutSetPrototypeId, layoutUuid); 1221 } 1222 1223 public static boolean hasLayoutSetPrototypeLayout( 1224 java.lang.String layoutSetPrototypeUuid, long companyId, 1225 java.lang.String layoutUuid) 1226 throws com.liferay.portal.kernel.exception.PortalException, 1227 com.liferay.portal.kernel.exception.SystemException { 1228 return getService() 1229 .hasLayoutSetPrototypeLayout(layoutSetPrototypeUuid, 1230 companyId, layoutUuid); 1231 } 1232 1233 /** 1234 * Imports the layouts from the byte array. 1235 * 1236 * @param userId the primary key of the user 1237 * @param groupId the primary key of the group 1238 * @param privateLayout whether the layout is private to the group 1239 * @param parameterMap the mapping of parameters indicating which 1240 information will be imported. For information on the keys used in 1241 the map see {@link 1242 com.liferay.portal.kernel.lar.PortletDataHandlerKeys}. 1243 * @param bytes the byte array with the data 1244 * @throws PortalException if a group or user with the primary key could not 1245 be found, or if some other portal exception occurred 1246 * @throws SystemException if a system exception occurred 1247 * @see com.liferay.portal.lar.LayoutImporter 1248 */ 1249 public static void importLayouts(long userId, long groupId, 1250 boolean privateLayout, 1251 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 1252 byte[] bytes) 1253 throws com.liferay.portal.kernel.exception.PortalException, 1254 com.liferay.portal.kernel.exception.SystemException { 1255 getService() 1256 .importLayouts(userId, groupId, privateLayout, parameterMap, bytes); 1257 } 1258 1259 /** 1260 * Imports the layouts from the file. 1261 * 1262 * @param userId the primary key of the user 1263 * @param groupId the primary key of the group 1264 * @param privateLayout whether the layout is private to the group 1265 * @param parameterMap the mapping of parameters indicating which 1266 information will be imported. For information on the keys used in 1267 the map see {@link 1268 com.liferay.portal.kernel.lar.PortletDataHandlerKeys}. 1269 * @param file the LAR file with the data 1270 * @throws PortalException if a group or user with the primary key could not 1271 be found, or if some other portal exception occurred 1272 * @throws SystemException if a system exception occurred 1273 * @see com.liferay.portal.lar.LayoutImporter 1274 */ 1275 public static void importLayouts(long userId, long groupId, 1276 boolean privateLayout, 1277 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 1278 java.io.File file) 1279 throws com.liferay.portal.kernel.exception.PortalException, 1280 com.liferay.portal.kernel.exception.SystemException { 1281 getService() 1282 .importLayouts(userId, groupId, privateLayout, parameterMap, file); 1283 } 1284 1285 /** 1286 * Imports the layouts from the input stream. 1287 * 1288 * @param userId the primary key of the user 1289 * @param groupId the primary key of the group 1290 * @param privateLayout whether the layout is private to the group 1291 * @param parameterMap the mapping of parameters indicating which 1292 information will be imported. For information on the keys used in 1293 the map see {@link 1294 com.liferay.portal.kernel.lar.PortletDataHandlerKeys}. 1295 * @param is the input stream 1296 * @throws PortalException if a group or user with the primary key could not 1297 be found, or if some other portal exception occurred 1298 * @throws SystemException if a system exception occurred 1299 * @see com.liferay.portal.lar.LayoutImporter 1300 */ 1301 public static void importLayouts(long userId, long groupId, 1302 boolean privateLayout, 1303 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 1304 java.io.InputStream is) 1305 throws com.liferay.portal.kernel.exception.PortalException, 1306 com.liferay.portal.kernel.exception.SystemException { 1307 getService() 1308 .importLayouts(userId, groupId, privateLayout, parameterMap, is); 1309 } 1310 1311 public static long importLayoutsInBackground(long userId, 1312 java.lang.String taskName, long groupId, boolean privateLayout, 1313 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 1314 java.io.File file) 1315 throws com.liferay.portal.kernel.exception.PortalException, 1316 com.liferay.portal.kernel.exception.SystemException { 1317 return getService() 1318 .importLayoutsInBackground(userId, taskName, groupId, 1319 privateLayout, parameterMap, file); 1320 } 1321 1322 public static long importLayoutsInBackground(long userId, 1323 java.lang.String taskName, long groupId, boolean privateLayout, 1324 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 1325 java.io.InputStream is) 1326 throws com.liferay.portal.kernel.exception.PortalException, 1327 com.liferay.portal.kernel.exception.SystemException { 1328 return getService() 1329 .importLayoutsInBackground(userId, taskName, groupId, 1330 privateLayout, parameterMap, is); 1331 } 1332 1333 /** 1334 * Imports the portlet information (categories, permissions, ... etc.) from 1335 * the file. 1336 * 1337 * @param userId the primary key of the user 1338 * @param plid the primary key of the target layout 1339 * @param groupId the primary key of the target group 1340 * @param portletId the primary key of the portlet 1341 * @param parameterMap the mapping of parameters indicating which 1342 information will be imported. For information on the keys used in 1343 the map see {@link 1344 com.liferay.portal.kernel.lar.PortletDataHandlerKeys}. 1345 * @param file the LAR file with the data 1346 * @throws PortalException if a group, layout, portlet or user with the 1347 primary key could not be found 1348 * @throws SystemException if a system exception occurred 1349 */ 1350 public static void importPortletInfo(long userId, long plid, long groupId, 1351 java.lang.String portletId, 1352 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 1353 java.io.File file) 1354 throws com.liferay.portal.kernel.exception.PortalException, 1355 com.liferay.portal.kernel.exception.SystemException { 1356 getService() 1357 .importPortletInfo(userId, plid, groupId, portletId, parameterMap, 1358 file); 1359 } 1360 1361 /** 1362 * Imports the portlet information (categories, permissions, ... etc.) from 1363 * the input stream. 1364 * 1365 * @param userId the primary key of the user 1366 * @param plid the primary key of the layout 1367 * @param groupId the primary key of the group 1368 * @param portletId the primary key of the portlet 1369 * @param parameterMap the mapping of parameters indicating which 1370 information will be imported. For information on the keys used in 1371 the map see {@link 1372 com.liferay.portal.kernel.lar.PortletDataHandlerKeys}. 1373 * @param is the input stream 1374 * @throws PortalException if a group, portlet, layout or user with the 1375 primary key could not be found 1376 * @throws SystemException if a system exception occurred 1377 */ 1378 public static void importPortletInfo(long userId, long plid, long groupId, 1379 java.lang.String portletId, 1380 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 1381 java.io.InputStream is) 1382 throws com.liferay.portal.kernel.exception.PortalException, 1383 com.liferay.portal.kernel.exception.SystemException { 1384 getService() 1385 .importPortletInfo(userId, plid, groupId, portletId, parameterMap, 1386 is); 1387 } 1388 1389 public static void importPortletInfo(long userId, 1390 java.lang.String portletId, 1391 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 1392 java.io.File file) 1393 throws com.liferay.portal.kernel.exception.PortalException, 1394 com.liferay.portal.kernel.exception.SystemException { 1395 getService().importPortletInfo(userId, portletId, parameterMap, file); 1396 } 1397 1398 public static void importPortletInfo(long userId, 1399 java.lang.String portletId, 1400 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 1401 java.io.InputStream is) 1402 throws com.liferay.portal.kernel.exception.PortalException, 1403 com.liferay.portal.kernel.exception.SystemException { 1404 getService().importPortletInfo(userId, portletId, parameterMap, is); 1405 } 1406 1407 public static long importPortletInfoInBackground(long userId, 1408 java.lang.String taskName, long plid, long groupId, 1409 java.lang.String portletId, 1410 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 1411 java.io.File file) 1412 throws com.liferay.portal.kernel.exception.PortalException, 1413 com.liferay.portal.kernel.exception.SystemException { 1414 return getService() 1415 .importPortletInfoInBackground(userId, taskName, plid, 1416 groupId, portletId, parameterMap, file); 1417 } 1418 1419 public static long importPortletInfoInBackground(long userId, 1420 java.lang.String taskName, long plid, long groupId, 1421 java.lang.String portletId, 1422 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 1423 java.io.InputStream is) 1424 throws com.liferay.portal.kernel.exception.PortalException, 1425 com.liferay.portal.kernel.exception.SystemException { 1426 return getService() 1427 .importPortletInfoInBackground(userId, taskName, plid, 1428 groupId, portletId, parameterMap, is); 1429 } 1430 1431 public static long importPortletInfoInBackground(long userId, 1432 java.lang.String taskName, java.lang.String portletId, 1433 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 1434 java.io.File file) 1435 throws com.liferay.portal.kernel.exception.PortalException, 1436 com.liferay.portal.kernel.exception.SystemException { 1437 return getService() 1438 .importPortletInfoInBackground(userId, taskName, portletId, 1439 parameterMap, file); 1440 } 1441 1442 public static long importPortletInfoInBackground(long userId, 1443 java.lang.String taskName, java.lang.String portletId, 1444 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 1445 java.io.InputStream is) 1446 throws com.liferay.portal.kernel.exception.PortalException, 1447 com.liferay.portal.kernel.exception.SystemException { 1448 return getService() 1449 .importPortletInfoInBackground(userId, taskName, portletId, 1450 parameterMap, is); 1451 } 1452 1453 /** 1454 * Sets the layouts for the group, replacing and prioritizing all layouts of 1455 * the parent layout. 1456 * 1457 * @param groupId the primary key of the group 1458 * @param privateLayout whether the layout is private to the group 1459 * @param parentLayoutId the primary key of the parent layout 1460 * @param layoutIds the primary keys of the layouts 1461 * @param serviceContext the service context to be applied 1462 * @throws PortalException if a group or layout with the primary key could 1463 not be found, if no layouts were specified, if the first layout 1464 was not page-able, if the first layout was hidden, or if some 1465 other portal exception occurred 1466 * @throws SystemException if a system exception occurred 1467 */ 1468 public static void setLayouts(long groupId, boolean privateLayout, 1469 long parentLayoutId, long[] layoutIds, 1470 com.liferay.portal.service.ServiceContext serviceContext) 1471 throws com.liferay.portal.kernel.exception.PortalException, 1472 com.liferay.portal.kernel.exception.SystemException { 1473 getService() 1474 .setLayouts(groupId, privateLayout, parentLayoutId, layoutIds, 1475 serviceContext); 1476 } 1477 1478 /** 1479 * Updates the friendly URL of the layout. 1480 * 1481 * @param plid the primary key of the layout 1482 * @param friendlyURL the friendly URL to be assigned 1483 * @param languageId the primary key of the language 1484 * @return the updated layout 1485 * @throws PortalException if a group or layout with the primary key could 1486 not be found 1487 * @throws SystemException if a system exception occurred 1488 */ 1489 public static com.liferay.portal.model.Layout updateFriendlyURL(long plid, 1490 java.lang.String friendlyURL, java.lang.String languageId) 1491 throws com.liferay.portal.kernel.exception.PortalException, 1492 com.liferay.portal.kernel.exception.SystemException { 1493 return getService().updateFriendlyURL(plid, friendlyURL, languageId); 1494 } 1495 1496 /** 1497 * Updates the layout. 1498 * 1499 * @param groupId the primary key of the group 1500 * @param privateLayout whether the layout is private to the group 1501 * @param layoutId the primary key of the layout 1502 * @param parentLayoutId the primary key of the layout's new parent layout 1503 * @param nameMap the locales and localized names to merge (optionally 1504 <code>null</code>) 1505 * @param titleMap the locales and localized titles to merge (optionally 1506 <code>null</code>) 1507 * @param descriptionMap the locales and localized descriptions to merge 1508 (optionally <code>null</code>) 1509 * @param keywordsMap the locales and localized keywords to merge 1510 (optionally <code>null</code>) 1511 * @param robotsMap the locales and localized robots to merge (optionally 1512 <code>null</code>) 1513 * @param type the layout's new type (optionally {@link 1514 com.liferay.portal.model.LayoutConstants#TYPE_PORTLET}) 1515 * @param hidden whether the layout is hidden 1516 * @param friendlyURLMap the layout's locales and localized friendly URLs. 1517 To see how the URL is normalized when accessed, see {@link 1518 com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize( 1519 String)}. 1520 * @param iconImage whether the icon image will be updated 1521 * @param iconBytes the byte array of the layout's new icon image 1522 * @param serviceContext the service context to be applied. Can set the 1523 modification date and expando bridge attributes for the layout. 1524 For layouts that are linked to a layout prototype, attributes 1525 named <code>layoutPrototypeUuid</code> and 1526 <code>layoutPrototypeLinkedEnabled</code> can be specified to 1527 provide the unique identifier of the source prototype and a 1528 boolean to determine whether a link to it should be enabled to 1529 activate propagation of changes made to the linked page in the 1530 prototype. 1531 * @return the updated layout 1532 * @throws PortalException if a group or layout with the primary key could 1533 not be found, if a unique friendly URL could not be generated, if 1534 a valid parent layout ID to use could not be found, if the layout 1535 parameters were invalid, or if a portal exception occurred 1536 * @throws SystemException if a system exception occurred 1537 */ 1538 public static com.liferay.portal.model.Layout updateLayout(long groupId, 1539 boolean privateLayout, long layoutId, long parentLayoutId, 1540 java.util.Map<java.util.Locale, java.lang.String> nameMap, 1541 java.util.Map<java.util.Locale, java.lang.String> titleMap, 1542 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 1543 java.util.Map<java.util.Locale, java.lang.String> keywordsMap, 1544 java.util.Map<java.util.Locale, java.lang.String> robotsMap, 1545 java.lang.String type, boolean hidden, 1546 java.util.Map<java.util.Locale, java.lang.String> friendlyURLMap, 1547 java.lang.Boolean iconImage, byte[] iconBytes, 1548 com.liferay.portal.service.ServiceContext serviceContext) 1549 throws com.liferay.portal.kernel.exception.PortalException, 1550 com.liferay.portal.kernel.exception.SystemException { 1551 return getService() 1552 .updateLayout(groupId, privateLayout, layoutId, 1553 parentLayoutId, nameMap, titleMap, descriptionMap, keywordsMap, 1554 robotsMap, type, hidden, friendlyURLMap, iconImage, iconBytes, 1555 serviceContext); 1556 } 1557 1558 /** 1559 * Updates the layout. 1560 * 1561 * @param groupId the primary key of the group 1562 * @param privateLayout whether the layout is private to the group 1563 * @param layoutId the primary key of the layout 1564 * @param parentLayoutId the primary key of the layout's new parent 1565 layout 1566 * @param nameMap the locales and localized names to merge (optionally 1567 <code>null</code>) 1568 * @param titleMap the locales and localized titles to merge 1569 (optionally <code>null</code>) 1570 * @param descriptionMap the locales and localized descriptions to 1571 merge (optionally <code>null</code>) 1572 * @param keywordsMap the locales and localized keywords to merge 1573 (optionally <code>null</code>) 1574 * @param robotsMap the locales and localized robots to merge 1575 (optionally <code>null</code>) 1576 * @param type the layout's new type (optionally {@link 1577 com.liferay.portal.model.LayoutConstants#TYPE_PORTLET}) 1578 * @param hidden whether the layout is hidden 1579 * @param friendlyURL the layout's new friendly URL (optionally {@link 1580 com.liferay.portal.util.PropsValues#DEFAULT_USER_PRIVATE_LAYOUT_FRIENDLY_URL} 1581 or {@link 1582 com.liferay.portal.util.PropsValues#DEFAULT_USER_PRIVATE_LAYOUT_FRIENDLY_URL}). 1583 The default values can be overridden in 1584 <code>portal-ext.properties</code> by specifying new values 1585 for the corresponding properties defined in {@link 1586 com.liferay.portal.util.PropsValues}. To see how the URL is 1587 normalized when accessed, see {@link 1588 com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize( 1589 String)}. 1590 * @param iconImage whether the icon image will be updated 1591 * @param iconBytes the byte array of the layout's new icon image 1592 * @param serviceContext the service context to be applied. Can set the 1593 modification date and expando bridge attributes for the 1594 layout. For layouts that are linked to a layout prototype, 1595 attributes named <code>layoutPrototypeUuid</code> and 1596 <code>layoutPrototypeLinkedEnabled</code> can be specified to 1597 provide the unique identifier of the source prototype and a 1598 boolean to determine whether a link to it should be enabled 1599 to activate propagation of changes made to the linked page in 1600 the prototype. 1601 * @return the updated layout 1602 * @throws PortalException if a group or layout with the primary key 1603 could not be found, if a unique friendly URL could not be 1604 generated, if a valid parent layout ID to use could not be 1605 found, if the layout parameters were invalid, or if a portal 1606 exception occurred 1607 * @throws SystemException if a system exception occurred 1608 * @deprecated As of 6.2.0, replaced by {@link #updateLayout(long, boolean, 1609 long, long, Map, Map, Map, Map, Map, String, boolean, Map, 1610 Boolean, byte[], ServiceContext)} 1611 */ 1612 public static com.liferay.portal.model.Layout updateLayout(long groupId, 1613 boolean privateLayout, long layoutId, long parentLayoutId, 1614 java.util.Map<java.util.Locale, java.lang.String> nameMap, 1615 java.util.Map<java.util.Locale, java.lang.String> titleMap, 1616 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 1617 java.util.Map<java.util.Locale, java.lang.String> keywordsMap, 1618 java.util.Map<java.util.Locale, java.lang.String> robotsMap, 1619 java.lang.String type, boolean hidden, java.lang.String friendlyURL, 1620 java.lang.Boolean iconImage, byte[] iconBytes, 1621 com.liferay.portal.service.ServiceContext serviceContext) 1622 throws com.liferay.portal.kernel.exception.PortalException, 1623 com.liferay.portal.kernel.exception.SystemException { 1624 return getService() 1625 .updateLayout(groupId, privateLayout, layoutId, 1626 parentLayoutId, nameMap, titleMap, descriptionMap, keywordsMap, 1627 robotsMap, type, hidden, friendlyURL, iconImage, iconBytes, 1628 serviceContext); 1629 } 1630 1631 /** 1632 * Updates the layout replacing its type settings. 1633 * 1634 * @param groupId the primary key of the group 1635 * @param privateLayout whether the layout is private to the group 1636 * @param layoutId the primary key of the layout 1637 * @param typeSettings the settings to load the unicode properties object. 1638 See {@link com.liferay.portal.kernel.util.UnicodeProperties 1639 #fastLoad(String)}. 1640 * @return the updated layout 1641 * @throws PortalException if a matching layout could not be found or if a 1642 portal exception occurred 1643 * @throws SystemException if a system exception occurred 1644 */ 1645 public static com.liferay.portal.model.Layout updateLayout(long groupId, 1646 boolean privateLayout, long layoutId, java.lang.String typeSettings) 1647 throws com.liferay.portal.kernel.exception.PortalException, 1648 com.liferay.portal.kernel.exception.SystemException { 1649 return getService() 1650 .updateLayout(groupId, privateLayout, layoutId, typeSettings); 1651 } 1652 1653 /** 1654 * Updates the look and feel of the layout. 1655 * 1656 * @param groupId the primary key of the group 1657 * @param privateLayout whether the layout is private to the group 1658 * @param layoutId the primary key of the layout 1659 * @param themeId the primary key of the layout's new theme 1660 * @param colorSchemeId the primary key of the layout's new color scheme 1661 * @param css the layout's new CSS 1662 * @param wapTheme whether the theme is for WAP browsers 1663 * @return the updated layout 1664 * @throws PortalException if a matching layout could not be found 1665 * @throws SystemException if a system exception occurred 1666 */ 1667 public static com.liferay.portal.model.Layout updateLookAndFeel( 1668 long groupId, boolean privateLayout, long layoutId, 1669 java.lang.String themeId, java.lang.String colorSchemeId, 1670 java.lang.String css, boolean wapTheme) 1671 throws com.liferay.portal.kernel.exception.PortalException, 1672 com.liferay.portal.kernel.exception.SystemException { 1673 return getService() 1674 .updateLookAndFeel(groupId, privateLayout, layoutId, 1675 themeId, colorSchemeId, css, wapTheme); 1676 } 1677 1678 /** 1679 * Updates the name of the layout. 1680 * 1681 * @param layout the layout to be updated 1682 * @param name the layout's new name 1683 * @param languageId the primary key of the language. For more information 1684 see {@link java.util.Locale}. 1685 * @return the updated layout 1686 * @throws PortalException if the new name was <code>null</code> 1687 * @throws SystemException if a system exception occurred 1688 */ 1689 public static com.liferay.portal.model.Layout updateName( 1690 com.liferay.portal.model.Layout layout, java.lang.String name, 1691 java.lang.String languageId) 1692 throws com.liferay.portal.kernel.exception.PortalException, 1693 com.liferay.portal.kernel.exception.SystemException { 1694 return getService().updateName(layout, name, languageId); 1695 } 1696 1697 /** 1698 * Updates the name of the layout matching the group, layout ID, and 1699 * privacy. 1700 * 1701 * @param groupId the primary key of the group 1702 * @param privateLayout whether the layout is private to the group 1703 * @param layoutId the primary key of the layout 1704 * @param name the layout's new name 1705 * @param languageId the primary key of the language. For more information 1706 see {@link java.util.Locale}. 1707 * @return the updated layout 1708 * @throws PortalException if a matching layout could not be found or if the 1709 new name was <code>null</code> 1710 * @throws SystemException if a system exception occurred 1711 */ 1712 public static com.liferay.portal.model.Layout updateName(long groupId, 1713 boolean privateLayout, long layoutId, java.lang.String name, 1714 java.lang.String languageId) 1715 throws com.liferay.portal.kernel.exception.PortalException, 1716 com.liferay.portal.kernel.exception.SystemException { 1717 return getService() 1718 .updateName(groupId, privateLayout, layoutId, name, 1719 languageId); 1720 } 1721 1722 /** 1723 * Updates the name of the layout matching the primary key. 1724 * 1725 * @param plid the primary key of the layout 1726 * @param name the name to be assigned 1727 * @param languageId the primary key of the language. For more information 1728 see {@link java.util.Locale}. 1729 * @return the updated layout 1730 * @throws PortalException if a layout with the primary key could not be 1731 found or if the name was <code>null</code> 1732 * @throws SystemException if a system exception occurred 1733 */ 1734 public static com.liferay.portal.model.Layout updateName(long plid, 1735 java.lang.String name, java.lang.String languageId) 1736 throws com.liferay.portal.kernel.exception.PortalException, 1737 com.liferay.portal.kernel.exception.SystemException { 1738 return getService().updateName(plid, name, languageId); 1739 } 1740 1741 /** 1742 * Updates the parent layout ID of the layout matching the group, layout ID, 1743 * and privacy. 1744 * 1745 * @param groupId the primary key of the group 1746 * @param privateLayout whether the layout is private to the group 1747 * @param layoutId the primary key of the layout 1748 * @param parentLayoutId the primary key to be assigned to the parent 1749 layout 1750 * @return the matching layout 1751 * @throws PortalException if a valid parent layout ID to use could not be 1752 found or if a matching layout could not be found 1753 * @throws SystemException if a system exception occurred 1754 */ 1755 public static com.liferay.portal.model.Layout updateParentLayoutId( 1756 long groupId, boolean privateLayout, long layoutId, long parentLayoutId) 1757 throws com.liferay.portal.kernel.exception.PortalException, 1758 com.liferay.portal.kernel.exception.SystemException { 1759 return getService() 1760 .updateParentLayoutId(groupId, privateLayout, layoutId, 1761 parentLayoutId); 1762 } 1763 1764 /** 1765 * Updates the parent layout ID of the layout matching the primary key. If a 1766 * layout matching the parent primary key is found, the layout ID of that 1767 * layout is assigned, otherwise {@link 1768 * com.liferay.portal.model.LayoutConstants#DEFAULT_PARENT_LAYOUT_ID} is 1769 * assigned. 1770 * 1771 * @param plid the primary key of the layout 1772 * @param parentPlid the primary key of the parent layout 1773 * @return the layout matching the primary key 1774 * @throws PortalException if a layout with the primary key could not be 1775 found or if a valid parent layout ID to use could not be found 1776 * @throws SystemException if a system exception occurred 1777 */ 1778 public static com.liferay.portal.model.Layout updateParentLayoutId( 1779 long plid, long parentPlid) 1780 throws com.liferay.portal.kernel.exception.PortalException, 1781 com.liferay.portal.kernel.exception.SystemException { 1782 return getService().updateParentLayoutId(plid, parentPlid); 1783 } 1784 1785 public static com.liferay.portal.model.Layout updateParentLayoutIdAndPriority( 1786 long plid, long parentPlid, int priority) 1787 throws com.liferay.portal.kernel.exception.PortalException, 1788 com.liferay.portal.kernel.exception.SystemException { 1789 return getService() 1790 .updateParentLayoutIdAndPriority(plid, parentPlid, priority); 1791 } 1792 1793 /** 1794 * Updates the priorities of the layouts. 1795 * 1796 * @param groupId the primary key of the group 1797 * @param privateLayout whether the layout is private to the group 1798 * @throws PortalException if a matching layout could not be found 1799 * @throws SystemException if a system exception occurred 1800 */ 1801 public static void updatePriorities(long groupId, boolean privateLayout) 1802 throws com.liferay.portal.kernel.exception.PortalException, 1803 com.liferay.portal.kernel.exception.SystemException { 1804 getService().updatePriorities(groupId, privateLayout); 1805 } 1806 1807 /** 1808 * Updates the priority of the layout. 1809 * 1810 * @param layout the layout to be updated 1811 * @param priority the layout's new priority 1812 * @return the updated layout 1813 * @throws PortalException if a portal exception occurred 1814 * @throws SystemException if a system exception occurred 1815 */ 1816 public static com.liferay.portal.model.Layout updatePriority( 1817 com.liferay.portal.model.Layout layout, int priority) 1818 throws com.liferay.portal.kernel.exception.PortalException, 1819 com.liferay.portal.kernel.exception.SystemException { 1820 return getService().updatePriority(layout, priority); 1821 } 1822 1823 /** 1824 * Updates the priority of the layout matching the group, layout ID, and 1825 * privacy. 1826 * 1827 * @param groupId the primary key of the group 1828 * @param privateLayout whether the layout is private to the group 1829 * @param layoutId the primary key of the layout 1830 * @param priority the layout's new priority 1831 * @return the updated layout 1832 * @throws PortalException if a matching layout could not be found 1833 * @throws SystemException if a system exception occurred 1834 */ 1835 public static com.liferay.portal.model.Layout updatePriority(long groupId, 1836 boolean privateLayout, long layoutId, int priority) 1837 throws com.liferay.portal.kernel.exception.PortalException, 1838 com.liferay.portal.kernel.exception.SystemException { 1839 return getService() 1840 .updatePriority(groupId, privateLayout, layoutId, priority); 1841 } 1842 1843 /** 1844 * Updates the priority of the layout matching the group, layout ID, and 1845 * privacy, setting the layout's priority based on the priorities of the 1846 * next and previous layouts. 1847 * 1848 * @param groupId the primary key of the group 1849 * @param privateLayout whether the layout is private to the group 1850 * @param layoutId the primary key of the layout 1851 * @param nextLayoutId the primary key of the next layout 1852 * @param previousLayoutId the primary key of the previous layout 1853 * @return the updated layout 1854 * @throws PortalException if a matching layout could not be found 1855 * @throws SystemException if a system exception occurred 1856 */ 1857 public static com.liferay.portal.model.Layout updatePriority(long groupId, 1858 boolean privateLayout, long layoutId, long nextLayoutId, 1859 long previousLayoutId) 1860 throws com.liferay.portal.kernel.exception.PortalException, 1861 com.liferay.portal.kernel.exception.SystemException { 1862 return getService() 1863 .updatePriority(groupId, privateLayout, layoutId, 1864 nextLayoutId, previousLayoutId); 1865 } 1866 1867 /** 1868 * Updates the priority of the layout matching the primary key. 1869 * 1870 * @param plid the primary key of the layout 1871 * @param priority the layout's new priority 1872 * @return the updated layout 1873 * @throws PortalException if a layout with the primary key could not be 1874 found 1875 * @throws SystemException if a system exception occurred 1876 */ 1877 public static com.liferay.portal.model.Layout updatePriority(long plid, 1878 int priority) 1879 throws com.liferay.portal.kernel.exception.PortalException, 1880 com.liferay.portal.kernel.exception.SystemException { 1881 return getService().updatePriority(plid, priority); 1882 } 1883 1884 /** 1885 * @deprecated As of 6.2.0, with no direct replacement 1886 */ 1887 public static void updateScopedPortletNames(long groupId, 1888 boolean privateLayout, long layoutId, 1889 java.util.Map<java.util.Locale, java.lang.String> nameMap, 1890 java.util.List<java.util.Locale> nameMapModifiedLocales) 1891 throws com.liferay.portal.kernel.exception.PortalException, 1892 com.liferay.portal.kernel.exception.SystemException { 1893 getService() 1894 .updateScopedPortletNames(groupId, privateLayout, layoutId, 1895 nameMap, nameMapModifiedLocales); 1896 } 1897 1898 /** 1899 * Updates the names of the portlets within scope of the group, the scope of 1900 * the layout's UUID, and the privacy. 1901 * 1902 * @param groupId the primary key of the group 1903 * @param privateLayout whether the layout is private to the group 1904 * @param layoutId the primary key of the layout whose UUID to match 1905 * @param name the new name for the portlets 1906 * @param languageId the primary key of the language 1907 * @throws PortalException if a matching layout could not be found 1908 * @throws SystemException if a system exception occurred 1909 * @see com.liferay.portlet.portletconfiguration.action.EditScopeAction 1910 * @deprecated As of 6.2.0, with no direct replacement 1911 */ 1912 public static void updateScopedPortletNames(long groupId, 1913 boolean privateLayout, long layoutId, java.lang.String name, 1914 java.lang.String languageId) 1915 throws com.liferay.portal.kernel.exception.PortalException, 1916 com.liferay.portal.kernel.exception.SystemException { 1917 getService() 1918 .updateScopedPortletNames(groupId, privateLayout, layoutId, name, 1919 languageId); 1920 } 1921 1922 public static com.liferay.portal.kernel.lar.MissingReferences validateImportLayoutsFile( 1923 long userId, long groupId, boolean privateLayout, 1924 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 1925 java.io.File file) 1926 throws com.liferay.portal.kernel.exception.PortalException, 1927 com.liferay.portal.kernel.exception.SystemException { 1928 return getService() 1929 .validateImportLayoutsFile(userId, groupId, privateLayout, 1930 parameterMap, file); 1931 } 1932 1933 public static com.liferay.portal.kernel.lar.MissingReferences validateImportLayoutsFile( 1934 long userId, long groupId, boolean privateLayout, 1935 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 1936 java.io.InputStream inputStream) 1937 throws com.liferay.portal.kernel.exception.PortalException, 1938 com.liferay.portal.kernel.exception.SystemException { 1939 return getService() 1940 .validateImportLayoutsFile(userId, groupId, privateLayout, 1941 parameterMap, inputStream); 1942 } 1943 1944 public static com.liferay.portal.kernel.lar.MissingReferences validateImportPortletInfo( 1945 long userId, long plid, long groupId, java.lang.String portletId, 1946 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 1947 java.io.File file) 1948 throws com.liferay.portal.kernel.exception.PortalException, 1949 com.liferay.portal.kernel.exception.SystemException { 1950 return getService() 1951 .validateImportPortletInfo(userId, plid, groupId, portletId, 1952 parameterMap, file); 1953 } 1954 1955 public static com.liferay.portal.kernel.lar.MissingReferences validateImportPortletInfo( 1956 long userId, long plid, long groupId, java.lang.String portletId, 1957 java.util.Map<java.lang.String, java.lang.String[]> parameterMap, 1958 java.io.InputStream inputStream) 1959 throws com.liferay.portal.kernel.exception.PortalException, 1960 com.liferay.portal.kernel.exception.SystemException { 1961 return getService() 1962 .validateImportPortletInfo(userId, plid, groupId, portletId, 1963 parameterMap, inputStream); 1964 } 1965 1966 public static LayoutLocalService getService() { 1967 if (_service == null) { 1968 _service = (LayoutLocalService)PortalBeanLocatorUtil.locate(LayoutLocalService.class.getName()); 1969 1970 ReferenceRegistry.registerReference(LayoutLocalServiceUtil.class, 1971 "_service"); 1972 } 1973 1974 return _service; 1975 } 1976 1977 /** 1978 * @deprecated As of 6.2.0 1979 */ 1980 public void setService(LayoutLocalService service) { 1981 } 1982 1983 private static LayoutLocalService _service; 1984 }