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