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