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