001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the local service utility for Layout. This utility wraps
024     * {@link com.liferay.portal.service.impl.LayoutLocalServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on the local server. Methods of this service will not have security checks
027     * based on the propagated JAAS credentials because this service can only be
028     * accessed from within the same VM.
029     *
030     * @author Brian Wing Shun Chan
031     * @see LayoutLocalService
032     * @see com.liferay.portal.service.base.LayoutLocalServiceBaseImpl
033     * @see com.liferay.portal.service.impl.LayoutLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class LayoutLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.LayoutLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * Adds the layout to the database. Also notifies the appropriate model listeners.
046            *
047            * @param layout the layout
048            * @return the layout that was added
049            */
050            public static com.liferay.portal.model.Layout addLayout(
051                    com.liferay.portal.model.Layout layout) {
052                    return getService().addLayout(layout);
053            }
054    
055            /**
056            * Adds a layout with single entry maps for name, title, and description to
057            * the default locale.
058            *
059            * <p>
060            * This method handles the creation of the layout including its resources,
061            * metadata, and internal data structures. It is not necessary to make
062            * subsequent calls to any methods to setup default groups, resources, ...
063            * etc.
064            * </p>
065            *
066            * @param userId the primary key of the user
067            * @param groupId the primary key of the group
068            * @param privateLayout whether the layout is private to the group
069            * @param parentLayoutId the primary key of the parent layout (optionally
070            {@link
071            com.liferay.portal.model.LayoutConstants#DEFAULT_PARENT_LAYOUT_ID}).
072            The possible values can be found in {@link
073            com.liferay.portal.model.LayoutConstants}.
074            * @param name the layout's name (optionally {@link
075            com.liferay.portal.util.PropsValues#DEFAULT_USER_PRIVATE_LAYOUT_NAME}
076            or {@link
077            com.liferay.portal.util.PropsValues#DEFAULT_USER_PUBLIC_LAYOUT_NAME}).
078            The default values can be overridden in
079            <code>portal-ext.properties</code> by specifying new values for
080            the corresponding properties defined in {@link
081            com.liferay.portal.util.PropsValues}
082            * @param title the layout's title
083            * @param description the layout's description
084            * @param type the layout's type (optionally {@link
085            com.liferay.portal.model.LayoutConstants#TYPE_PORTLET}). The
086            possible types can be found in {@link
087            com.liferay.portal.model.LayoutConstants}.
088            * @param hidden whether the layout is hidden
089            * @param friendlyURL the friendly URL of the layout (optionally {@link
090            com.liferay.portal.util.PropsValues#DEFAULT_USER_PRIVATE_LAYOUT_FRIENDLY_URL}
091            or {@link
092            com.liferay.portal.util.PropsValues#DEFAULT_USER_PUBLIC_LAYOUT_FRIENDLY_URL}).
093            The default values can be overridden in
094            <code>portal-ext.properties</code> by specifying new values for
095            the corresponding properties defined in {@link
096            com.liferay.portal.util.PropsValues}. To see how the URL is
097            normalized when accessed, see {@link
098            com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize(
099            String)}.
100            * @param serviceContext the service context to be applied. Must set the
101            UUID for the layout. Can set the creation date and modification
102            date for the layout. For layouts that belong to a layout set
103            prototype, an attribute named <code>layoutUpdateable</code> can
104            be set to specify whether site administrators can modify this
105            page within their site.
106            * @return the layout
107            * @throws PortalException if a group or user with the primary key could not
108            be found, or if a portal exception occurred
109            */
110            public static com.liferay.portal.model.Layout addLayout(long userId,
111                    long groupId, boolean privateLayout, long parentLayoutId,
112                    java.lang.String name, java.lang.String title,
113                    java.lang.String description, java.lang.String type, boolean hidden,
114                    java.lang.String friendlyURL,
115                    com.liferay.portal.service.ServiceContext serviceContext)
116                    throws com.liferay.portal.kernel.exception.PortalException {
117                    return getService()
118                                       .addLayout(userId, groupId, privateLayout, parentLayoutId,
119                            name, title, description, type, hidden, friendlyURL, serviceContext);
120            }
121    
122            /**
123            * Adds a layout.
124            *
125            * <p>
126            * This method handles the creation of the layout including its resources,
127            * metadata, and internal data structures. It is not necessary to make
128            * subsequent calls to any methods to setup default groups, resources, ...
129            * etc.
130            * </p>
131            *
132            * @param userId the primary key of the user
133            * @param groupId the primary key of the group
134            * @param privateLayout whether the layout is private to the group
135            * @param parentLayoutId the primary key of the parent layout
136            (optionally {@link
137            com.liferay.portal.model.LayoutConstants#DEFAULT_PARENT_LAYOUT_ID})
138            * @param nameMap the layout's locales and localized names
139            * @param titleMap the layout's locales and localized titles
140            * @param descriptionMap the layout's locales and localized
141            descriptions
142            * @param keywordsMap the layout's locales and localized keywords
143            * @param robotsMap the layout's locales and localized robots
144            * @param type the layout's type (optionally {@link
145            com.liferay.portal.model.LayoutConstants#TYPE_PORTLET}). The
146            possible types can be found in {@link
147            com.liferay.portal.model.LayoutConstants}.
148            * @param hidden whether the layout is hidden
149            * @param friendlyURL the layout's friendly URL (optionally {@link
150            com.liferay.portal.util.PropsValues#DEFAULT_USER_PRIVATE_LAYOUT_FRIENDLY_URL}
151            or {@link
152            com.liferay.portal.util.PropsValues#DEFAULT_USER_PUBLIC_LAYOUT_FRIENDLY_URL}).
153            The default values can be overridden in
154            <code>portal-ext.properties</code> by specifying new values
155            for the corresponding properties defined in {@link
156            com.liferay.portal.util.PropsValues}. To see how the URL is
157            normalized when accessed, see {@link
158            com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize(
159            String)}.
160            * @param serviceContext the service context to be applied. Must set
161            the UUID for the layout. Can set the creation date,
162            modification date and the expando bridge attributes for the
163            layout. For layouts that belong to a layout set prototype, an
164            attribute named <code>layoutUpdateable</code> can be set to
165            specify whether site administrators can modify this page
166            within their site. For layouts that are created from a layout
167            prototype, attributes named <code>layoutPrototypeUuid</code>
168            and <code>layoutPrototypeLinkedEnabled</code> can be
169            specified to provide the unique identifier of the source
170            prototype and a boolean to determine whether a link to it
171            should be enabled to activate propagation of changes made to
172            the linked page in the prototype.
173            * @return the layout
174            * @throws PortalException if a group or user with the primary key could
175            not be found, if layout values were invalid, or if a portal
176            exception occurred
177            * @deprecated As of 6.2.0, replaced by {@link #addLayout(long, long,
178            boolean, long, Map, Map, Map, Map, Map, String, String,
179            boolean, Map, ServiceContext)}
180            */
181            @Deprecated
182            public static com.liferay.portal.model.Layout addLayout(long userId,
183                    long groupId, boolean privateLayout, long parentLayoutId,
184                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
185                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
186                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
187                    java.util.Map<java.util.Locale, java.lang.String> keywordsMap,
188                    java.util.Map<java.util.Locale, java.lang.String> robotsMap,
189                    java.lang.String type, boolean hidden, java.lang.String friendlyURL,
190                    com.liferay.portal.service.ServiceContext serviceContext)
191                    throws com.liferay.portal.kernel.exception.PortalException {
192                    return getService()
193                                       .addLayout(userId, groupId, privateLayout, parentLayoutId,
194                            nameMap, titleMap, descriptionMap, keywordsMap, robotsMap, type,
195                            hidden, friendlyURL, serviceContext);
196            }
197    
198            /**
199            * Adds a layout with additional parameters.
200            *
201            * <p>
202            * This method handles the creation of the layout including its resources,
203            * metadata, and internal data structures. It is not necessary to make
204            * subsequent calls to any methods to setup default groups, resources, ...
205            * etc.
206            * </p>
207            *
208            * @param userId the primary key of the user
209            * @param groupId the primary key of the group
210            * @param privateLayout whether the layout is private to the group
211            * @param parentLayoutId the primary key of the parent layout (optionally
212            {@link
213            com.liferay.portal.model.LayoutConstants#DEFAULT_PARENT_LAYOUT_ID})
214            * @param nameMap the layout's locales and localized names
215            * @param titleMap the layout's locales and localized titles
216            * @param descriptionMap the layout's locales and localized descriptions
217            * @param keywordsMap the layout's locales and localized keywords
218            * @param robotsMap the layout's locales and localized robots
219            * @param type the layout's type (optionally {@link
220            com.liferay.portal.model.LayoutConstants#TYPE_PORTLET}). The
221            possible types can be found in {@link
222            com.liferay.portal.model.LayoutConstants}.
223            * @param typeSettings the settings to load the unicode properties object.
224            See {@link com.liferay.portal.kernel.util.UnicodeProperties
225            #fastLoad(String)}.
226            * @param hidden whether the layout is hidden
227            * @param friendlyURLMap the layout's locales and localized friendly URLs.
228            To see how the URL is normalized when accessed, see {@link
229            com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize(
230            String)}.
231            * @param serviceContext the service context to be applied. Must set the
232            UUID for the layout. Can set the creation date, modification
233            date, and expando bridge attributes for the layout. For layouts
234            that belong to a layout set prototype, an attribute named
235            <code>layoutUpdateable</code> can be set to specify whether site
236            administrators can modify this page within their site. For
237            layouts that are created from a layout prototype, attributes
238            named <code>layoutPrototypeUuid</code> and
239            <code>layoutPrototypeLinkedEnabled</code> can be specified to
240            provide the unique identifier of the source prototype and a
241            boolean to determine whether a link to it should be enabled to
242            activate propagation of changes made to the linked page in the
243            prototype.
244            * @return the layout
245            * @throws PortalException if a group or user with the primary key could not
246            be found, if layout values were invalid, or if a portal exception
247            occurred
248            */
249            public static com.liferay.portal.model.Layout addLayout(long userId,
250                    long groupId, boolean privateLayout, long parentLayoutId,
251                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
252                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
253                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
254                    java.util.Map<java.util.Locale, java.lang.String> keywordsMap,
255                    java.util.Map<java.util.Locale, java.lang.String> robotsMap,
256                    java.lang.String type, java.lang.String typeSettings, boolean hidden,
257                    java.util.Map<java.util.Locale, java.lang.String> friendlyURLMap,
258                    com.liferay.portal.service.ServiceContext serviceContext)
259                    throws com.liferay.portal.kernel.exception.PortalException {
260                    return getService()
261                                       .addLayout(userId, groupId, privateLayout, parentLayoutId,
262                            nameMap, titleMap, descriptionMap, keywordsMap, robotsMap, type,
263                            typeSettings, hidden, friendlyURLMap, serviceContext);
264            }
265    
266            /**
267            * Creates a new layout with the primary key. Does not add the layout to the database.
268            *
269            * @param plid the primary key for the new layout
270            * @return the new layout
271            */
272            public static com.liferay.portal.model.Layout createLayout(long plid) {
273                    return getService().createLayout(plid);
274            }
275    
276            /**
277            * Deletes the layout with the primary key, also deleting the layout's child
278            * layouts, and associated resources.
279            *
280            * @param groupId the primary key of the group
281            * @param privateLayout whether the layout is private to the group
282            * @param layoutId the primary key of the layout
283            * @param serviceContext the service context to be applied
284            * @throws PortalException if a matching layout could not be found , or if
285            some other portal exception occurred
286            */
287            public static void deleteLayout(long groupId, boolean privateLayout,
288                    long layoutId, com.liferay.portal.service.ServiceContext serviceContext)
289                    throws com.liferay.portal.kernel.exception.PortalException {
290                    getService()
291                            .deleteLayout(groupId, privateLayout, layoutId, serviceContext);
292            }
293    
294            /**
295            * Deletes the layout from the database. Also notifies the appropriate model listeners.
296            *
297            * @param layout the layout
298            * @return the layout that was removed
299            */
300            public static com.liferay.portal.model.Layout deleteLayout(
301                    com.liferay.portal.model.Layout layout) {
302                    return getService().deleteLayout(layout);
303            }
304    
305            /**
306            * Deletes the layout, its child layouts, and its associated resources.
307            *
308            * @param layout the layout
309            * @param updateLayoutSet whether the layout set's page counter needs to be
310            updated
311            * @param serviceContext the service context to be applied
312            * @throws PortalException if a portal exception occurred
313            */
314            public static void deleteLayout(com.liferay.portal.model.Layout layout,
315                    boolean updateLayoutSet,
316                    com.liferay.portal.service.ServiceContext serviceContext)
317                    throws com.liferay.portal.kernel.exception.PortalException {
318                    getService().deleteLayout(layout, updateLayoutSet, serviceContext);
319            }
320    
321            /**
322            * Deletes the layout with the primary key from the database. Also notifies the appropriate model listeners.
323            *
324            * @param plid the primary key of the layout
325            * @return the layout that was removed
326            * @throws PortalException if a layout with the primary key could not be found
327            */
328            public static com.liferay.portal.model.Layout deleteLayout(long plid)
329                    throws com.liferay.portal.kernel.exception.PortalException {
330                    return getService().deleteLayout(plid);
331            }
332    
333            /**
334            * Deletes the layout with the plid, also deleting the layout's child
335            * layouts, and associated resources.
336            *
337            * @param plid the primary key of the layout
338            * @param serviceContext the service context to be applied
339            * @throws PortalException if a layout with the primary key could not be
340            found , or if some other portal exception occurred
341            */
342            public static void deleteLayout(long plid,
343                    com.liferay.portal.service.ServiceContext serviceContext)
344                    throws com.liferay.portal.kernel.exception.PortalException {
345                    getService().deleteLayout(plid, serviceContext);
346            }
347    
348            /**
349            * Deletes the group's private or non-private layouts, also deleting the
350            * layouts' child layouts, and associated resources.
351            *
352            * @param groupId the primary key of the group
353            * @param privateLayout whether the layout is private to the group
354            * @param serviceContext the service context to be applied. The parent
355            layout set's page count will be updated by default, unless an
356            attribute named <code>updatePageCount</code> is set to
357            <code>false</code>.
358            * @throws PortalException if a group with the primary key could not be
359            found or if a layout set for the group and privacy could not be
360            found
361            */
362            public static void deleteLayouts(long groupId, boolean privateLayout,
363                    com.liferay.portal.service.ServiceContext serviceContext)
364                    throws com.liferay.portal.kernel.exception.PortalException {
365                    getService().deleteLayouts(groupId, privateLayout, serviceContext);
366            }
367    
368            /**
369            * @throws PortalException
370            */
371            public static com.liferay.portal.model.PersistedModel deletePersistedModel(
372                    com.liferay.portal.model.PersistedModel persistedModel)
373                    throws com.liferay.portal.kernel.exception.PortalException {
374                    return getService().deletePersistedModel(persistedModel);
375            }
376    
377            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
378                    return getService().dynamicQuery();
379            }
380    
381            /**
382            * Performs a dynamic query on the database and returns the matching rows.
383            *
384            * @param dynamicQuery the dynamic query
385            * @return the matching rows
386            */
387            public static <T> java.util.List<T> dynamicQuery(
388                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
389                    return getService().dynamicQuery(dynamicQuery);
390            }
391    
392            /**
393            * Performs a dynamic query on the database and returns a range of the matching rows.
394            *
395            * <p>
396            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.LayoutModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
397            * </p>
398            *
399            * @param dynamicQuery the dynamic query
400            * @param start the lower bound of the range of model instances
401            * @param end the upper bound of the range of model instances (not inclusive)
402            * @return the range of matching rows
403            */
404            public static <T> java.util.List<T> dynamicQuery(
405                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
406                    int end) {
407                    return getService().dynamicQuery(dynamicQuery, start, end);
408            }
409    
410            /**
411            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
412            *
413            * <p>
414            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.LayoutModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
415            * </p>
416            *
417            * @param dynamicQuery the dynamic query
418            * @param start the lower bound of the range of model instances
419            * @param end the upper bound of the range of model instances (not inclusive)
420            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
421            * @return the ordered range of matching rows
422            */
423            public static <T> java.util.List<T> dynamicQuery(
424                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
425                    int end,
426                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
427                    return getService()
428                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
429            }
430    
431            /**
432            * Returns the number of rows matching the dynamic query.
433            *
434            * @param dynamicQuery the dynamic query
435            * @return the number of rows matching the dynamic query
436            */
437            public static long dynamicQueryCount(
438                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
439                    return getService().dynamicQueryCount(dynamicQuery);
440            }
441    
442            /**
443            * Returns the number of rows matching the dynamic query.
444            *
445            * @param dynamicQuery the dynamic query
446            * @param projection the projection to apply to the query
447            * @return the number of rows matching the dynamic query
448            */
449            public static long dynamicQueryCount(
450                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
451                    com.liferay.portal.kernel.dao.orm.Projection projection) {
452                    return getService().dynamicQueryCount(dynamicQuery, projection);
453            }
454    
455            /**
456            * Exports layouts with the primary keys and criteria as a byte array.
457            *
458            * @param groupId the primary key of the group
459            * @param privateLayout whether the layout is private to the group
460            * @param layoutIds the primary keys of the layouts to be exported
461            * @param parameterMap the mapping of parameters indicating which
462            information to export. For information on the keys used in 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            /**
981            * Returns all the layouts matching the UUID and company.
982            *
983            * @param uuid the UUID of the layouts
984            * @param companyId the primary key of the company
985            * @return the matching layouts, or an empty list if no matches were found
986            */
987            public static java.util.List<com.liferay.portal.model.Layout> getLayoutsByUuidAndCompanyId(
988                    java.lang.String uuid, long companyId) {
989                    return getService().getLayoutsByUuidAndCompanyId(uuid, companyId);
990            }
991    
992            /**
993            * Returns a range of layouts matching the UUID and company.
994            *
995            * @param uuid the UUID of the layouts
996            * @param companyId the primary key of the company
997            * @param start the lower bound of the range of layouts
998            * @param end the upper bound of the range of layouts (not inclusive)
999            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1000            * @return the range of matching layouts, or an empty list if no matches were found
1001            */
1002            public static java.util.List<com.liferay.portal.model.Layout> getLayoutsByUuidAndCompanyId(
1003                    java.lang.String uuid, long companyId, int start, int end,
1004                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Layout> orderByComparator) {
1005                    return getService()
1006                                       .getLayoutsByUuidAndCompanyId(uuid, companyId, start, end,
1007                            orderByComparator);
1008            }
1009    
1010            /**
1011            * Returns the number of layouts.
1012            *
1013            * @return the number of layouts
1014            */
1015            public static int getLayoutsCount() {
1016                    return getService().getLayoutsCount();
1017            }
1018    
1019            public static int getLayoutsCount(com.liferay.portal.model.Group group,
1020                    boolean privateLayout)
1021                    throws com.liferay.portal.kernel.exception.PortalException {
1022                    return getService().getLayoutsCount(group, privateLayout);
1023            }
1024    
1025            public static int getLayoutsCount(com.liferay.portal.model.Group group,
1026                    boolean privateLayout, boolean includeUserGroups)
1027                    throws com.liferay.portal.kernel.exception.PortalException {
1028                    return getService()
1029                                       .getLayoutsCount(group, privateLayout, includeUserGroups);
1030            }
1031    
1032            public static int getLayoutsCount(com.liferay.portal.model.Group group,
1033                    boolean privateLayout, long parentLayoutId) {
1034                    return getService().getLayoutsCount(group, privateLayout, parentLayoutId);
1035            }
1036    
1037            public static int getLayoutsCount(com.liferay.portal.model.User user,
1038                    boolean privateLayout)
1039                    throws com.liferay.portal.kernel.exception.PortalException {
1040                    return getService().getLayoutsCount(user, privateLayout);
1041            }
1042    
1043            public static int getLayoutsCount(com.liferay.portal.model.User user,
1044                    boolean privateLayout, boolean includeUserGroups)
1045                    throws com.liferay.portal.kernel.exception.PortalException {
1046                    return getService()
1047                                       .getLayoutsCount(user, privateLayout, includeUserGroups);
1048            }
1049    
1050            /**
1051            * Returns the primary key to use for the next layout.
1052            *
1053            * @param groupId the primary key of the group
1054            * @param privateLayout whether the layout is private to the group
1055            * @return the primary key to use for the next layout
1056            */
1057            public static long getNextLayoutId(long groupId, boolean privateLayout) {
1058                    return getService().getNextLayoutId(groupId, privateLayout);
1059            }
1060    
1061            /**
1062            * Returns all the layouts without resource permissions
1063            *
1064            * @param roleId the primary key of the role
1065            * @return all the layouts without resource permissions
1066            */
1067            public static java.util.List<com.liferay.portal.model.Layout> getNoPermissionLayouts(
1068                    long roleId) {
1069                    return getService().getNoPermissionLayouts(roleId);
1070            }
1071    
1072            /**
1073            * Returns all the layouts whose friendly URLs are <code>null</code>
1074            *
1075            * @return all the layouts whose friendly URLs are <code>null</code>
1076            */
1077            public static java.util.List<com.liferay.portal.model.Layout> getNullFriendlyURLLayouts() {
1078                    return getService().getNullFriendlyURLLayouts();
1079            }
1080    
1081            public static com.liferay.portal.model.Layout getParentLayout(
1082                    com.liferay.portal.model.Layout layout)
1083                    throws com.liferay.portal.kernel.exception.PortalException {
1084                    return getService().getParentLayout(layout);
1085            }
1086    
1087            public static com.liferay.portal.model.PersistedModel getPersistedModel(
1088                    java.io.Serializable primaryKeyObj)
1089                    throws com.liferay.portal.kernel.exception.PortalException {
1090                    return getService().getPersistedModel(primaryKeyObj);
1091            }
1092    
1093            /**
1094            * Returns all the layouts within scope of the group
1095            *
1096            * @param groupId the primary key of the group
1097            * @param privateLayout whether the layout is private to the group
1098            * @return the layouts within scope of the group
1099            */
1100            public static java.util.List<com.liferay.portal.model.Layout> getScopeGroupLayouts(
1101                    long groupId, boolean privateLayout) {
1102                    return getService().getScopeGroupLayouts(groupId, privateLayout);
1103            }
1104    
1105            public static boolean hasLayoutSetPrototypeLayout(
1106                    long layoutSetPrototypeId, java.lang.String layoutUuid)
1107                    throws com.liferay.portal.kernel.exception.PortalException {
1108                    return getService()
1109                                       .hasLayoutSetPrototypeLayout(layoutSetPrototypeId, layoutUuid);
1110            }
1111    
1112            public static boolean hasLayoutSetPrototypeLayout(
1113                    java.lang.String layoutSetPrototypeUuid, long companyId,
1114                    java.lang.String layoutUuid)
1115                    throws com.liferay.portal.kernel.exception.PortalException {
1116                    return getService()
1117                                       .hasLayoutSetPrototypeLayout(layoutSetPrototypeUuid,
1118                            companyId, layoutUuid);
1119            }
1120    
1121            public static boolean hasLayouts(com.liferay.portal.model.Group group,
1122                    boolean privateLayout)
1123                    throws com.liferay.portal.kernel.exception.PortalException {
1124                    return getService().hasLayouts(group, privateLayout);
1125            }
1126    
1127            public static boolean hasLayouts(com.liferay.portal.model.Group group,
1128                    boolean privateLayout, boolean includeUserGroups)
1129                    throws com.liferay.portal.kernel.exception.PortalException {
1130                    return getService().hasLayouts(group, privateLayout, includeUserGroups);
1131            }
1132    
1133            /**
1134            * Returns <code>true</code> if the group has any layouts;
1135            * <code>false</code> otherwise.
1136            *
1137            * @param groupId the primary key of the group
1138            * @param privateLayout whether the layout is private to the group
1139            * @param parentLayoutId the primary key of the parent layout
1140            * @return <code>true</code> if the group has any layouts;
1141            <code>false</code> otherwise
1142            */
1143            public static boolean hasLayouts(long groupId, boolean privateLayout,
1144                    long parentLayoutId) {
1145                    return getService().hasLayouts(groupId, privateLayout, parentLayoutId);
1146            }
1147    
1148            public static boolean hasLayouts(com.liferay.portal.model.User user,
1149                    boolean privateLayout)
1150                    throws com.liferay.portal.kernel.exception.PortalException {
1151                    return getService().hasLayouts(user, privateLayout);
1152            }
1153    
1154            public static boolean hasLayouts(com.liferay.portal.model.User user,
1155                    boolean privateLayout, boolean includeUserGroups)
1156                    throws com.liferay.portal.kernel.exception.PortalException {
1157                    return getService().hasLayouts(user, privateLayout, includeUserGroups);
1158            }
1159    
1160            /**
1161            * Imports the layouts from the byte array.
1162            *
1163            * @param userId the primary key of the user
1164            * @param groupId the primary key of the group
1165            * @param privateLayout whether the layout is private to the group
1166            * @param parameterMap the mapping of parameters indicating which
1167            information will be imported. For information on the keys used in
1168            the map see {@link
1169            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}.
1170            * @param bytes the byte array with the data
1171            * @throws PortalException if a group or user with the primary key could not
1172            be found, or if some other portal exception occurred
1173            * @see com.liferay.portal.lar.LayoutImporter
1174            */
1175            public static void importLayouts(long userId, long groupId,
1176                    boolean privateLayout,
1177                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
1178                    byte[] bytes)
1179                    throws com.liferay.portal.kernel.exception.PortalException {
1180                    getService()
1181                            .importLayouts(userId, groupId, privateLayout, parameterMap, bytes);
1182            }
1183    
1184            /**
1185            * Imports the layouts from the file.
1186            *
1187            * @param userId the primary key of the user
1188            * @param groupId the primary key of the group
1189            * @param privateLayout whether the layout is private to the group
1190            * @param parameterMap the mapping of parameters indicating which
1191            information will be imported. For information on the keys used in
1192            the map see {@link
1193            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}.
1194            * @param file the LAR file with the data
1195            * @throws PortalException if a group or user with the primary key could not
1196            be found, or if some other portal exception occurred
1197            * @see com.liferay.portal.lar.LayoutImporter
1198            */
1199            public static void importLayouts(long userId, long groupId,
1200                    boolean privateLayout,
1201                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
1202                    java.io.File file)
1203                    throws com.liferay.portal.kernel.exception.PortalException {
1204                    getService()
1205                            .importLayouts(userId, groupId, privateLayout, parameterMap, file);
1206            }
1207    
1208            /**
1209            * Imports the layouts from the input stream.
1210            *
1211            * @param userId the primary key of the user
1212            * @param groupId the primary key of the group
1213            * @param privateLayout whether the layout is private to the group
1214            * @param parameterMap the mapping of parameters indicating which
1215            information will be imported. For information on the keys used in
1216            the map see {@link
1217            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}.
1218            * @param is the input stream
1219            * @throws PortalException if a group or user with the primary key could not
1220            be found, or if some other portal exception occurred
1221            * @see com.liferay.portal.lar.LayoutImporter
1222            */
1223            public static void importLayouts(long userId, long groupId,
1224                    boolean privateLayout,
1225                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
1226                    java.io.InputStream is)
1227                    throws com.liferay.portal.kernel.exception.PortalException {
1228                    getService()
1229                            .importLayouts(userId, groupId, privateLayout, parameterMap, is);
1230            }
1231    
1232            public static long importLayoutsInBackground(long userId,
1233                    java.lang.String taskName, long groupId, boolean privateLayout,
1234                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
1235                    java.io.File file)
1236                    throws com.liferay.portal.kernel.exception.PortalException {
1237                    return getService()
1238                                       .importLayoutsInBackground(userId, taskName, groupId,
1239                            privateLayout, parameterMap, file);
1240            }
1241    
1242            public static long importLayoutsInBackground(long userId,
1243                    java.lang.String taskName, long groupId, boolean privateLayout,
1244                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
1245                    java.io.InputStream is)
1246                    throws com.liferay.portal.kernel.exception.PortalException {
1247                    return getService()
1248                                       .importLayoutsInBackground(userId, taskName, groupId,
1249                            privateLayout, parameterMap, is);
1250            }
1251    
1252            /**
1253            * Imports the portlet information (categories, permissions, ... etc.) from
1254            * the file.
1255            *
1256            * @param userId the primary key of the user
1257            * @param plid the primary key of the target layout
1258            * @param groupId the primary key of the target group
1259            * @param portletId the primary key of the portlet
1260            * @param parameterMap the mapping of parameters indicating which
1261            information will be imported. For information on the keys used in
1262            the map see {@link
1263            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}.
1264            * @param file the LAR file with the data
1265            * @throws PortalException if a group, layout, portlet or user with the
1266            primary key could not be found
1267            */
1268            public static void importPortletInfo(long userId, long plid, long groupId,
1269                    java.lang.String portletId,
1270                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
1271                    java.io.File file)
1272                    throws com.liferay.portal.kernel.exception.PortalException {
1273                    getService()
1274                            .importPortletInfo(userId, plid, groupId, portletId, parameterMap,
1275                            file);
1276            }
1277    
1278            /**
1279            * Imports the portlet information (categories, permissions, ... etc.) from
1280            * the input stream.
1281            *
1282            * @param userId the primary key of the user
1283            * @param plid the primary key of the layout
1284            * @param groupId the primary key of the group
1285            * @param portletId the primary key of the portlet
1286            * @param parameterMap the mapping of parameters indicating which
1287            information will be imported. For information on the keys used in
1288            the map see {@link
1289            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}.
1290            * @param is the input stream
1291            * @throws PortalException if a group, portlet, layout or user with the
1292            primary key could not be found
1293            */
1294            public static void importPortletInfo(long userId, long plid, long groupId,
1295                    java.lang.String portletId,
1296                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
1297                    java.io.InputStream is)
1298                    throws com.liferay.portal.kernel.exception.PortalException {
1299                    getService()
1300                            .importPortletInfo(userId, plid, groupId, portletId, parameterMap,
1301                            is);
1302            }
1303    
1304            public static void importPortletInfo(long userId,
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                    getService().importPortletInfo(userId, portletId, parameterMap, file);
1310            }
1311    
1312            public static void importPortletInfo(long userId,
1313                    java.lang.String portletId,
1314                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
1315                    java.io.InputStream is)
1316                    throws com.liferay.portal.kernel.exception.PortalException {
1317                    getService().importPortletInfo(userId, portletId, parameterMap, is);
1318            }
1319    
1320            public static long importPortletInfoInBackground(long userId,
1321                    java.lang.String taskName, long plid, long groupId,
1322                    java.lang.String portletId,
1323                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
1324                    java.io.File file)
1325                    throws com.liferay.portal.kernel.exception.PortalException {
1326                    return getService()
1327                                       .importPortletInfoInBackground(userId, taskName, plid,
1328                            groupId, portletId, parameterMap, file);
1329            }
1330    
1331            public static long importPortletInfoInBackground(long userId,
1332                    java.lang.String taskName, long plid, long groupId,
1333                    java.lang.String portletId,
1334                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
1335                    java.io.InputStream is)
1336                    throws com.liferay.portal.kernel.exception.PortalException {
1337                    return getService()
1338                                       .importPortletInfoInBackground(userId, taskName, plid,
1339                            groupId, portletId, parameterMap, is);
1340            }
1341    
1342            public static long importPortletInfoInBackground(long userId,
1343                    java.lang.String taskName, java.lang.String portletId,
1344                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
1345                    java.io.File file)
1346                    throws com.liferay.portal.kernel.exception.PortalException {
1347                    return getService()
1348                                       .importPortletInfoInBackground(userId, taskName, portletId,
1349                            parameterMap, file);
1350            }
1351    
1352            public static long importPortletInfoInBackground(long userId,
1353                    java.lang.String taskName, java.lang.String portletId,
1354                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
1355                    java.io.InputStream is)
1356                    throws com.liferay.portal.kernel.exception.PortalException {
1357                    return getService()
1358                                       .importPortletInfoInBackground(userId, taskName, portletId,
1359                            parameterMap, is);
1360            }
1361    
1362            /**
1363            * Sets the Spring bean ID for this bean.
1364            *
1365            * @param beanIdentifier the Spring bean ID for this bean
1366            */
1367            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
1368                    getService().setBeanIdentifier(beanIdentifier);
1369            }
1370    
1371            /**
1372            * Sets the layouts for the group, replacing and prioritizing all layouts of
1373            * the parent layout.
1374            *
1375            * @param groupId the primary key of the group
1376            * @param privateLayout whether the layout is private to the group
1377            * @param parentLayoutId the primary key of the parent layout
1378            * @param layoutIds the primary keys of the layouts
1379            * @param serviceContext the service context to be applied
1380            * @throws PortalException if a group or layout with the primary key could
1381            not be found, if no layouts were specified, if the first layout
1382            was not page-able, if the first layout was hidden, or if some
1383            other portal exception occurred
1384            */
1385            public static void setLayouts(long groupId, boolean privateLayout,
1386                    long parentLayoutId, long[] layoutIds,
1387                    com.liferay.portal.service.ServiceContext serviceContext)
1388                    throws com.liferay.portal.kernel.exception.PortalException {
1389                    getService()
1390                            .setLayouts(groupId, privateLayout, parentLayoutId, layoutIds,
1391                            serviceContext);
1392            }
1393    
1394            public static void updateAsset(long userId,
1395                    com.liferay.portal.model.Layout layout, long[] assetCategoryIds,
1396                    java.lang.String[] assetTagNames)
1397                    throws com.liferay.portal.kernel.exception.PortalException {
1398                    getService().updateAsset(userId, layout, assetCategoryIds, assetTagNames);
1399            }
1400    
1401            /**
1402            * Updates the friendly URL of the layout.
1403            *
1404            * @param plid the primary key of the layout
1405            * @param friendlyURL the friendly URL to be assigned
1406            * @param languageId the primary key of the language
1407            * @return the updated layout
1408            * @throws PortalException if a group or layout with the primary key
1409            could not be found
1410            * @deprecated As of 7.0.0, replaced by {@link #updateFriendlyURL(long,
1411            long, String, String)}
1412            */
1413            @Deprecated
1414            public static com.liferay.portal.model.Layout updateFriendlyURL(long plid,
1415                    java.lang.String friendlyURL, java.lang.String languageId)
1416                    throws com.liferay.portal.kernel.exception.PortalException {
1417                    return getService().updateFriendlyURL(plid, friendlyURL, languageId);
1418            }
1419    
1420            /**
1421            * Updates the friendly URL of the layout.
1422            *
1423            * @param userId the primary key of the user
1424            * @param plid the primary key of the layout
1425            * @param friendlyURL the friendly URL to be assigned
1426            * @param languageId the primary key of the language
1427            * @return the updated layout
1428            * @throws PortalException if a group or layout with the primary key could
1429            not be found
1430            */
1431            public static com.liferay.portal.model.Layout updateFriendlyURL(
1432                    long userId, long plid, java.lang.String friendlyURL,
1433                    java.lang.String languageId)
1434                    throws com.liferay.portal.kernel.exception.PortalException {
1435                    return getService()
1436                                       .updateFriendlyURL(userId, plid, friendlyURL, languageId);
1437            }
1438    
1439            public static com.liferay.portal.model.Layout updateIconImage(long plid,
1440                    byte[] bytes)
1441                    throws com.liferay.portal.kernel.exception.PortalException {
1442                    return getService().updateIconImage(plid, bytes);
1443            }
1444    
1445            /**
1446            * Updates the layout.
1447            *
1448            * @param groupId the primary key of the group
1449            * @param privateLayout whether the layout is private to the group
1450            * @param layoutId the primary key of the layout
1451            * @param parentLayoutId the primary key of the layout's new parent
1452            layout
1453            * @param nameMap the locales and localized names to merge (optionally
1454            <code>null</code>)
1455            * @param titleMap the locales and localized titles to merge
1456            (optionally <code>null</code>)
1457            * @param descriptionMap the locales and localized descriptions to
1458            merge (optionally <code>null</code>)
1459            * @param keywordsMap the locales and localized keywords to merge
1460            (optionally <code>null</code>)
1461            * @param robotsMap the locales and localized robots to merge
1462            (optionally <code>null</code>)
1463            * @param type the layout's new type (optionally {@link
1464            com.liferay.portal.model.LayoutConstants#TYPE_PORTLET})
1465            * @param hidden whether the layout is hidden
1466            * @param friendlyURL the layout's new friendly URL (optionally {@link
1467            com.liferay.portal.util.PropsValues#DEFAULT_USER_PRIVATE_LAYOUT_FRIENDLY_URL}
1468            or {@link
1469            com.liferay.portal.util.PropsValues#DEFAULT_USER_PRIVATE_LAYOUT_FRIENDLY_URL}).
1470            The default values can be overridden in
1471            <code>portal-ext.properties</code> by specifying new values
1472            for the corresponding properties defined in {@link
1473            com.liferay.portal.util.PropsValues}. To see how the URL is
1474            normalized when accessed, see {@link
1475            com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize(
1476            String)}.
1477            * @param iconImage whether the icon image will be updated
1478            * @param iconBytes the byte array of the layout's new icon image
1479            * @param serviceContext the service context to be applied. Can set the
1480            modification date and expando bridge attributes for the
1481            layout. For layouts that are linked to a layout prototype,
1482            attributes named <code>layoutPrototypeUuid</code> and
1483            <code>layoutPrototypeLinkedEnabled</code> can be specified to
1484            provide the unique identifier of the source prototype and a
1485            boolean to determine whether a link to it should be enabled
1486            to activate propagation of changes made to the linked page in
1487            the prototype.
1488            * @return the updated layout
1489            * @throws PortalException if a group or layout with the primary key
1490            could not be found, if a unique friendly URL could not be
1491            generated, if a valid parent layout ID to use could not be
1492            found, if the layout parameters were invalid, or if a portal
1493            exception occurred
1494            * @deprecated As of 6.2.0, replaced by {@link #updateLayout(long, boolean,
1495            long, long, Map, Map, Map, Map, Map, String, boolean, Map,
1496            Boolean, byte[], ServiceContext)}
1497            */
1498            @Deprecated
1499            public static com.liferay.portal.model.Layout updateLayout(long groupId,
1500                    boolean privateLayout, long layoutId, long parentLayoutId,
1501                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
1502                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
1503                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
1504                    java.util.Map<java.util.Locale, java.lang.String> keywordsMap,
1505                    java.util.Map<java.util.Locale, java.lang.String> robotsMap,
1506                    java.lang.String type, boolean hidden, java.lang.String friendlyURL,
1507                    java.lang.Boolean iconImage, byte[] iconBytes,
1508                    com.liferay.portal.service.ServiceContext serviceContext)
1509                    throws com.liferay.portal.kernel.exception.PortalException {
1510                    return getService()
1511                                       .updateLayout(groupId, privateLayout, layoutId,
1512                            parentLayoutId, nameMap, titleMap, descriptionMap, keywordsMap,
1513                            robotsMap, type, hidden, friendlyURL, iconImage, iconBytes,
1514                            serviceContext);
1515            }
1516    
1517            /**
1518            * Updates the layout.
1519            *
1520            * @param groupId the primary key of the group
1521            * @param privateLayout whether the layout is private to the group
1522            * @param layoutId the primary key of the layout
1523            * @param parentLayoutId the primary key of the layout's new parent layout
1524            * @param nameMap the locales and localized names to merge (optionally
1525            <code>null</code>)
1526            * @param titleMap the locales and localized titles to merge (optionally
1527            <code>null</code>)
1528            * @param descriptionMap the locales and localized descriptions to merge
1529            (optionally <code>null</code>)
1530            * @param keywordsMap the locales and localized keywords to merge
1531            (optionally <code>null</code>)
1532            * @param robotsMap the locales and localized robots to merge (optionally
1533            <code>null</code>)
1534            * @param type the layout's new type (optionally {@link
1535            com.liferay.portal.model.LayoutConstants#TYPE_PORTLET})
1536            * @param hidden whether the layout is hidden
1537            * @param friendlyURLMap the layout's locales and localized friendly URLs.
1538            To see how the URL is normalized when accessed, see {@link
1539            com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize(
1540            String)}.
1541            * @param iconImage whether the icon image will be updated
1542            * @param iconBytes the byte array of the layout's new icon image
1543            * @param serviceContext the service context to be applied. Can set the
1544            modification date and expando bridge attributes for the layout.
1545            For layouts that are linked to a layout prototype, attributes
1546            named <code>layoutPrototypeUuid</code> and
1547            <code>layoutPrototypeLinkedEnabled</code> can be specified to
1548            provide the unique identifier of the source prototype and a
1549            boolean to determine whether a link to it should be enabled to
1550            activate propagation of changes made to the linked page in the
1551            prototype.
1552            * @return the updated layout
1553            * @throws PortalException if a group or layout with the primary key could
1554            not be found, if a unique friendly URL could not be generated, if
1555            a valid parent layout ID to use could not be found, if the layout
1556            parameters were invalid, or if a portal exception occurred
1557            */
1558            public static com.liferay.portal.model.Layout updateLayout(long groupId,
1559                    boolean privateLayout, long layoutId, long parentLayoutId,
1560                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
1561                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
1562                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
1563                    java.util.Map<java.util.Locale, java.lang.String> keywordsMap,
1564                    java.util.Map<java.util.Locale, java.lang.String> robotsMap,
1565                    java.lang.String type, boolean hidden,
1566                    java.util.Map<java.util.Locale, java.lang.String> friendlyURLMap,
1567                    boolean iconImage, byte[] iconBytes,
1568                    com.liferay.portal.service.ServiceContext serviceContext)
1569                    throws com.liferay.portal.kernel.exception.PortalException {
1570                    return getService()
1571                                       .updateLayout(groupId, privateLayout, layoutId,
1572                            parentLayoutId, nameMap, titleMap, descriptionMap, keywordsMap,
1573                            robotsMap, type, hidden, friendlyURLMap, iconImage, iconBytes,
1574                            serviceContext);
1575            }
1576    
1577            /**
1578            * Updates the layout replacing its type settings.
1579            *
1580            * @param groupId the primary key of the group
1581            * @param privateLayout whether the layout is private to the group
1582            * @param layoutId the primary key of the layout
1583            * @param typeSettings the settings to load the unicode properties object.
1584            See {@link com.liferay.portal.kernel.util.UnicodeProperties
1585            #fastLoad(String)}.
1586            * @return the updated layout
1587            * @throws PortalException if a matching layout could not be found or if a
1588            portal exception occurred
1589            */
1590            public static com.liferay.portal.model.Layout updateLayout(long groupId,
1591                    boolean privateLayout, long layoutId, java.lang.String typeSettings)
1592                    throws com.liferay.portal.kernel.exception.PortalException {
1593                    return getService()
1594                                       .updateLayout(groupId, privateLayout, layoutId, typeSettings);
1595            }
1596    
1597            /**
1598            * Updates the layout in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
1599            *
1600            * @param layout the layout
1601            * @return the layout that was updated
1602            */
1603            public static com.liferay.portal.model.Layout updateLayout(
1604                    com.liferay.portal.model.Layout layout) {
1605                    return getService().updateLayout(layout);
1606            }
1607    
1608            /**
1609            * Updates the look and feel of the layout.
1610            *
1611            * @param groupId the primary key of the group
1612            * @param privateLayout whether the layout is private to the group
1613            * @param layoutId the primary key of the layout
1614            * @param themeId the primary key of the layout's new theme
1615            * @param colorSchemeId the primary key of the layout's new color scheme
1616            * @param css the layout's new CSS
1617            * @param wapTheme whether the theme is for WAP browsers
1618            * @return the updated layout
1619            * @throws PortalException if a matching layout could not be found
1620            */
1621            public static com.liferay.portal.model.Layout updateLookAndFeel(
1622                    long groupId, boolean privateLayout, long layoutId,
1623                    java.lang.String themeId, java.lang.String colorSchemeId,
1624                    java.lang.String css, boolean wapTheme)
1625                    throws com.liferay.portal.kernel.exception.PortalException {
1626                    return getService()
1627                                       .updateLookAndFeel(groupId, privateLayout, layoutId,
1628                            themeId, colorSchemeId, css, wapTheme);
1629            }
1630    
1631            /**
1632            * Updates the name of the layout matching the group, layout ID, and
1633            * privacy.
1634            *
1635            * @param groupId the primary key of the group
1636            * @param privateLayout whether the layout is private to the group
1637            * @param layoutId the primary key of the layout
1638            * @param name the layout's new name
1639            * @param languageId the primary key of the language. For more information
1640            see {@link java.util.Locale}.
1641            * @return the updated layout
1642            * @throws PortalException if a matching layout could not be found or if the
1643            new name was <code>null</code>
1644            */
1645            public static com.liferay.portal.model.Layout updateName(long groupId,
1646                    boolean privateLayout, long layoutId, java.lang.String name,
1647                    java.lang.String languageId)
1648                    throws com.liferay.portal.kernel.exception.PortalException {
1649                    return getService()
1650                                       .updateName(groupId, privateLayout, layoutId, name,
1651                            languageId);
1652            }
1653    
1654            /**
1655            * Updates the name of the layout.
1656            *
1657            * @param layout the layout to be updated
1658            * @param name the layout's new name
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 the new name was <code>null</code>
1663            */
1664            public static com.liferay.portal.model.Layout updateName(
1665                    com.liferay.portal.model.Layout layout, java.lang.String name,
1666                    java.lang.String languageId)
1667                    throws com.liferay.portal.kernel.exception.PortalException {
1668                    return getService().updateName(layout, name, languageId);
1669            }
1670    
1671            /**
1672            * Updates the name of the layout matching the primary key.
1673            *
1674            * @param plid the primary key of the layout
1675            * @param name the name to be assigned
1676            * @param languageId the primary key of the language. For more information
1677            see {@link java.util.Locale}.
1678            * @return the updated layout
1679            * @throws PortalException if a layout with the primary key could not be
1680            found or if the name was <code>null</code>
1681            */
1682            public static com.liferay.portal.model.Layout updateName(long plid,
1683                    java.lang.String name, java.lang.String languageId)
1684                    throws com.liferay.portal.kernel.exception.PortalException {
1685                    return getService().updateName(plid, name, languageId);
1686            }
1687    
1688            /**
1689            * Updates the parent layout ID of the layout matching the group, layout ID,
1690            * and privacy.
1691            *
1692            * @param groupId the primary key of the group
1693            * @param privateLayout whether the layout is private to the group
1694            * @param layoutId the primary key of the layout
1695            * @param parentLayoutId the primary key to be assigned to the parent
1696            layout
1697            * @return the matching layout
1698            * @throws PortalException if a valid parent layout ID to use could not be
1699            found or if a matching layout could not be found
1700            */
1701            public static com.liferay.portal.model.Layout updateParentLayoutId(
1702                    long groupId, boolean privateLayout, long layoutId, long parentLayoutId)
1703                    throws com.liferay.portal.kernel.exception.PortalException {
1704                    return getService()
1705                                       .updateParentLayoutId(groupId, privateLayout, layoutId,
1706                            parentLayoutId);
1707            }
1708    
1709            /**
1710            * Updates the parent layout ID of the layout matching the primary key. If a
1711            * layout matching the parent primary key is found, the layout ID of that
1712            * layout is assigned, otherwise {@link
1713            * com.liferay.portal.model.LayoutConstants#DEFAULT_PARENT_LAYOUT_ID} is
1714            * assigned.
1715            *
1716            * @param plid the primary key of the layout
1717            * @param parentPlid the primary key of the parent layout
1718            * @return the layout matching the primary key
1719            * @throws PortalException if a layout with the primary key could not be
1720            found or if a valid parent layout ID to use could not be found
1721            */
1722            public static com.liferay.portal.model.Layout updateParentLayoutId(
1723                    long plid, long parentPlid)
1724                    throws com.liferay.portal.kernel.exception.PortalException {
1725                    return getService().updateParentLayoutId(plid, parentPlid);
1726            }
1727    
1728            /**
1729            * Updates the parent layout ID and priority of the layout.
1730            *
1731            * @param plid the primary key of the layout
1732            * @param parentPlid the primary key of the parent layout
1733            * @param priority the layout's new priority
1734            * @return the layout matching the primary key
1735            * @throws PortalException if a layout with the primary key could not be
1736            found or if a valid parent layout ID could not be found
1737            */
1738            public static com.liferay.portal.model.Layout updateParentLayoutIdAndPriority(
1739                    long plid, long parentPlid, int priority)
1740                    throws com.liferay.portal.kernel.exception.PortalException {
1741                    return getService()
1742                                       .updateParentLayoutIdAndPriority(plid, parentPlid, priority);
1743            }
1744    
1745            /**
1746            * Updates the priorities of the layouts.
1747            *
1748            * @param groupId the primary key of the group
1749            * @param privateLayout whether the layout is private to the group
1750            * @throws PortalException if a matching layout could not be found
1751            */
1752            public static void updatePriorities(long groupId, boolean privateLayout)
1753                    throws com.liferay.portal.kernel.exception.PortalException {
1754                    getService().updatePriorities(groupId, privateLayout);
1755            }
1756    
1757            /**
1758            * Updates the priority of the layout matching the group, layout ID, and
1759            * privacy, setting the layout's priority based on the priorities of the
1760            * next and previous layouts.
1761            *
1762            * @param groupId the primary key of the group
1763            * @param privateLayout whether the layout is private to the group
1764            * @param layoutId the primary key of the layout
1765            * @param nextLayoutId the primary key of the next layout
1766            * @param previousLayoutId the primary key of the previous layout
1767            * @return the updated layout
1768            * @throws PortalException if a matching layout could not be found
1769            */
1770            public static com.liferay.portal.model.Layout updatePriority(long groupId,
1771                    boolean privateLayout, long layoutId, long nextLayoutId,
1772                    long previousLayoutId)
1773                    throws com.liferay.portal.kernel.exception.PortalException {
1774                    return getService()
1775                                       .updatePriority(groupId, privateLayout, layoutId,
1776                            nextLayoutId, previousLayoutId);
1777            }
1778    
1779            /**
1780            * Updates the priority of the layout matching the group, layout ID, and
1781            * privacy.
1782            *
1783            * @param groupId the primary key of the group
1784            * @param privateLayout whether the layout is private to the group
1785            * @param layoutId the primary key of the layout
1786            * @param priority the layout's new priority
1787            * @return the updated layout
1788            * @throws PortalException if a matching layout could not be found
1789            */
1790            public static com.liferay.portal.model.Layout updatePriority(long groupId,
1791                    boolean privateLayout, long layoutId, int priority)
1792                    throws com.liferay.portal.kernel.exception.PortalException {
1793                    return getService()
1794                                       .updatePriority(groupId, privateLayout, layoutId, priority);
1795            }
1796    
1797            /**
1798            * Updates the priority of the layout.
1799            *
1800            * @param layout the layout to be updated
1801            * @param priority the layout's new priority
1802            * @return the updated layout
1803            * @throws PortalException if a portal exception occurred
1804            */
1805            public static com.liferay.portal.model.Layout updatePriority(
1806                    com.liferay.portal.model.Layout layout, int priority)
1807                    throws com.liferay.portal.kernel.exception.PortalException {
1808                    return getService().updatePriority(layout, priority);
1809            }
1810    
1811            /**
1812            * Updates the priority of the layout matching the primary key.
1813            *
1814            * @param plid the primary key of the layout
1815            * @param priority the layout's new priority
1816            * @return the updated layout
1817            * @throws PortalException if a layout with the primary key could not be
1818            found
1819            */
1820            public static com.liferay.portal.model.Layout updatePriority(long plid,
1821                    int priority)
1822                    throws com.liferay.portal.kernel.exception.PortalException {
1823                    return getService().updatePriority(plid, priority);
1824            }
1825    
1826            /**
1827            * Updates the names of the portlets within scope of the group, the scope of
1828            * the layout's UUID, and the privacy.
1829            *
1830            * @param groupId the primary key of the group
1831            * @param privateLayout whether the layout is private to the group
1832            * @param layoutId the primary key of the layout whose UUID to match
1833            * @param name the new name for the portlets
1834            * @param languageId the primary key of the language
1835            * @throws PortalException if a matching layout could not be found
1836            * @see com.liferay.portlet.portletconfiguration.action.EditScopeAction
1837            * @deprecated As of 6.2.0, with no direct replacement
1838            */
1839            @Deprecated
1840            public static void updateScopedPortletNames(long groupId,
1841                    boolean privateLayout, long layoutId, java.lang.String name,
1842                    java.lang.String languageId)
1843                    throws com.liferay.portal.kernel.exception.PortalException {
1844                    getService()
1845                            .updateScopedPortletNames(groupId, privateLayout, layoutId, name,
1846                            languageId);
1847            }
1848    
1849            /**
1850            * @deprecated As of 6.2.0, with no direct replacement
1851            */
1852            @Deprecated
1853            public static void updateScopedPortletNames(long groupId,
1854                    boolean privateLayout, long layoutId,
1855                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
1856                    java.util.List<java.util.Locale> nameMapModifiedLocales)
1857                    throws com.liferay.portal.kernel.exception.PortalException {
1858                    getService()
1859                            .updateScopedPortletNames(groupId, privateLayout, layoutId,
1860                            nameMap, nameMapModifiedLocales);
1861            }
1862    
1863            public static com.liferay.portal.kernel.lar.MissingReferences validateImportLayoutsFile(
1864                    long userId, long groupId, boolean privateLayout,
1865                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
1866                    java.io.File file)
1867                    throws com.liferay.portal.kernel.exception.PortalException {
1868                    return getService()
1869                                       .validateImportLayoutsFile(userId, groupId, privateLayout,
1870                            parameterMap, file);
1871            }
1872    
1873            public static com.liferay.portal.kernel.lar.MissingReferences validateImportLayoutsFile(
1874                    long userId, long groupId, boolean privateLayout,
1875                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
1876                    java.io.InputStream inputStream)
1877                    throws com.liferay.portal.kernel.exception.PortalException {
1878                    return getService()
1879                                       .validateImportLayoutsFile(userId, groupId, privateLayout,
1880                            parameterMap, inputStream);
1881            }
1882    
1883            public static com.liferay.portal.kernel.lar.MissingReferences validateImportPortletInfo(
1884                    long userId, long plid, long groupId, java.lang.String portletId,
1885                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
1886                    java.io.File file)
1887                    throws com.liferay.portal.kernel.exception.PortalException {
1888                    return getService()
1889                                       .validateImportPortletInfo(userId, plid, groupId, portletId,
1890                            parameterMap, file);
1891            }
1892    
1893            public static com.liferay.portal.kernel.lar.MissingReferences validateImportPortletInfo(
1894                    long userId, long plid, long groupId, java.lang.String portletId,
1895                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
1896                    java.io.InputStream inputStream)
1897                    throws com.liferay.portal.kernel.exception.PortalException {
1898                    return getService()
1899                                       .validateImportPortletInfo(userId, plid, groupId, portletId,
1900                            parameterMap, inputStream);
1901            }
1902    
1903            public static LayoutLocalService getService() {
1904                    if (_service == null) {
1905                            _service = (LayoutLocalService)PortalBeanLocatorUtil.locate(LayoutLocalService.class.getName());
1906    
1907                            ReferenceRegistry.registerReference(LayoutLocalServiceUtil.class,
1908                                    "_service");
1909                    }
1910    
1911                    return _service;
1912            }
1913    
1914            /**
1915             * @deprecated As of 6.2.0
1916             */
1917            @Deprecated
1918            public void setService(LayoutLocalService service) {
1919            }
1920    
1921            private static LayoutLocalService _service;
1922    }