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