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 remote service utility for Layout. This utility wraps
024     * {@link com.liferay.portal.service.impl.LayoutServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on a remote server. Methods of this service are expected to have security
027     * checks based on the propagated JAAS credentials because this service can be
028     * accessed remotely.
029     *
030     * @author Brian Wing Shun Chan
031     * @see LayoutService
032     * @see com.liferay.portal.service.base.LayoutServiceBaseImpl
033     * @see com.liferay.portal.service.impl.LayoutServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class LayoutServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.LayoutServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * Adds a layout with additional parameters.
046            *
047            * <p>
048            * This method handles the creation of the layout including its resources,
049            * metadata, and internal data structures. It is not necessary to make
050            * subsequent calls to any methods to setup default groups, resources, ...
051            * etc.
052            * </p>
053            *
054            * @param groupId the primary key of the group
055            * @param privateLayout whether the layout is private to the group
056            * @param parentLayoutId the primary key of the parent layout
057            (optionally {@link
058            com.liferay.portal.model.LayoutConstants#DEFAULT_PARENT_LAYOUT_ID})
059            * @param localeNamesMap the layout's locales and localized names
060            * @param localeTitlesMap the layout's locales and localized titles
061            * @param descriptionMap the layout's locales and localized
062            descriptions
063            * @param keywordsMap the layout's locales and localized keywords
064            * @param robotsMap the layout's locales and localized robots
065            * @param type the layout's type (optionally {@link
066            com.liferay.portal.model.LayoutConstants#TYPE_PORTLET}). The
067            possible types can be found in {@link
068            com.liferay.portal.model.LayoutConstants}.
069            * @param hidden whether the layout is hidden
070            * @param friendlyURL the layout's locales and localized friendly URLs.
071            To see how the URL is normalized when accessed, see {@link
072            com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize(
073            String)}.
074            * @param serviceContext the service context to be applied. Must set
075            the UUID for the layout. Can set the creation date,
076            modification date, and expando bridge attributes for the
077            layout. For layouts that belong to a layout set prototype, an
078            attribute named <code>layoutUpdateable</code> can be used to
079            specify whether site administrators can modify this page
080            within their site.
081            * @return the layout
082            * @throws PortalException if a group with the primary key could not be
083            found, if the group did not have permission to manage the
084            layouts involved, if layout values were invalid, or if a
085            portal exception occurred
086            * @deprecated As of 6.2.0, replaced by {@link #addLayout(long, boolean,
087            long, Map, Map, Map, Map, Map, String, String, boolean, Map,
088            ServiceContext)}
089            */
090            @Deprecated
091            public static com.liferay.portal.model.Layout addLayout(long groupId,
092                    boolean privateLayout, long parentLayoutId,
093                    java.util.Map<java.util.Locale, java.lang.String> localeNamesMap,
094                    java.util.Map<java.util.Locale, java.lang.String> localeTitlesMap,
095                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
096                    java.util.Map<java.util.Locale, java.lang.String> keywordsMap,
097                    java.util.Map<java.util.Locale, java.lang.String> robotsMap,
098                    java.lang.String type, boolean hidden, java.lang.String friendlyURL,
099                    com.liferay.portal.service.ServiceContext serviceContext)
100                    throws com.liferay.portal.kernel.exception.PortalException {
101                    return getService()
102                                       .addLayout(groupId, privateLayout, parentLayoutId,
103                            localeNamesMap, localeTitlesMap, descriptionMap, keywordsMap,
104                            robotsMap, type, hidden, friendlyURL, serviceContext);
105            }
106    
107            /**
108            * Adds a layout with additional parameters.
109            *
110            * <p>
111            * This method handles the creation of the layout including its resources,
112            * metadata, and internal data structures. It is not necessary to make
113            * subsequent calls to any methods to setup default groups, resources, ...
114            * etc.
115            * </p>
116            *
117            * @param groupId the primary key of the group
118            * @param privateLayout whether the layout is private to the group
119            * @param parentLayoutId the primary key of the parent layout (optionally
120            {@link
121            com.liferay.portal.model.LayoutConstants#DEFAULT_PARENT_LAYOUT_ID})
122            * @param localeNamesMap the layout's locales and localized names
123            * @param localeTitlesMap the layout's locales and localized titles
124            * @param descriptionMap the layout's locales and localized descriptions
125            * @param keywordsMap the layout's locales and localized keywords
126            * @param robotsMap the layout's locales and localized robots
127            * @param type the layout's type (optionally {@link
128            com.liferay.portal.model.LayoutConstants#TYPE_PORTLET}). The
129            possible types can be found in {@link
130            com.liferay.portal.model.LayoutConstants}.
131            * @param typeSettings the settings to load the unicode properties object.
132            See {@link com.liferay.portal.kernel.util.UnicodeProperties
133            #fastLoad(String)}.
134            * @param hidden whether the layout is hidden
135            * @param friendlyURLMap the layout's locales and localized friendly URLs.
136            To see how the URL is normalized when accessed, see {@link
137            com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize(
138            String)}.
139            * @param serviceContext the service context to be applied. Must set the
140            UUID for the layout. Can set the creation date, modification
141            date, and expando bridge attributes for the layout. For layouts
142            that belong to a layout set prototype, an attribute named
143            <code>layoutUpdateable</code> can be used to specify whether site
144            administrators can modify this page within their site.
145            * @return the layout
146            * @throws PortalException if a group with the primary key could not be
147            found, if the group did not have permission to manage the layouts
148            involved, if layout values were invalid, or if a portal exception
149            occurred
150            */
151            public static com.liferay.portal.model.Layout addLayout(long groupId,
152                    boolean privateLayout, long parentLayoutId,
153                    java.util.Map<java.util.Locale, java.lang.String> localeNamesMap,
154                    java.util.Map<java.util.Locale, java.lang.String> localeTitlesMap,
155                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
156                    java.util.Map<java.util.Locale, java.lang.String> keywordsMap,
157                    java.util.Map<java.util.Locale, java.lang.String> robotsMap,
158                    java.lang.String type, java.lang.String typeSettings, boolean hidden,
159                    java.util.Map<java.util.Locale, java.lang.String> friendlyURLMap,
160                    com.liferay.portal.service.ServiceContext serviceContext)
161                    throws com.liferay.portal.kernel.exception.PortalException {
162                    return getService()
163                                       .addLayout(groupId, privateLayout, parentLayoutId,
164                            localeNamesMap, localeTitlesMap, descriptionMap, keywordsMap,
165                            robotsMap, type, typeSettings, hidden, friendlyURLMap,
166                            serviceContext);
167            }
168    
169            /**
170            * Adds a layout with single entry maps for name, title, and description to
171            * the default locale.
172            *
173            * <p>
174            * This method handles the creation of the layout including its resources,
175            * metadata, and internal data structures. It is not necessary to make
176            * subsequent calls to any methods to setup default groups, resources, ...
177            * etc.
178            * </p>
179            *
180            * @param groupId the primary key of the group
181            * @param privateLayout whether the layout is private to the group
182            * @param parentLayoutId the primary key of the parent layout (optionally
183            {@link
184            com.liferay.portal.model.LayoutConstants#DEFAULT_PARENT_LAYOUT_ID})
185            * @param name Map the layout's locales and localized names
186            * @param title Map the layout's locales and localized titles
187            * @param description Map the layout's locales and localized descriptions
188            * @param type the layout's type (optionally {@link
189            com.liferay.portal.model.LayoutConstants#TYPE_PORTLET}). The
190            possible types can be found in {@link
191            com.liferay.portal.model.LayoutConstants}.
192            * @param hidden whether the layout is hidden
193            * @param friendlyURL the layout's locales and localized friendly URLs. To
194            see how the URL is normalized when accessed, see {@link
195            com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize(
196            String)}.
197            * @param serviceContext the service context to be applied. Must set the
198            UUID for the layout. Can specify the creation date, modification
199            date, and expando bridge attributes for the layout. For layouts
200            that belong to a layout set prototype, an attribute named
201            <code>layoutUpdateable</code> can be used to specify whether site
202            administrators can modify this page within their site.
203            * @return the layout
204            * @throws PortalException if a group with the primary key could not be
205            found, if the group did not have permission to manage the layouts
206            involved, if layout values were invalid, or if a portal exception
207            occurred
208            */
209            public static com.liferay.portal.model.Layout addLayout(long groupId,
210                    boolean privateLayout, long parentLayoutId, java.lang.String name,
211                    java.lang.String title, java.lang.String description,
212                    java.lang.String type, boolean hidden, java.lang.String friendlyURL,
213                    com.liferay.portal.service.ServiceContext serviceContext)
214                    throws com.liferay.portal.kernel.exception.PortalException {
215                    return getService()
216                                       .addLayout(groupId, privateLayout, parentLayoutId, name,
217                            title, description, type, hidden, friendlyURL, serviceContext);
218            }
219    
220            public static com.liferay.portal.kernel.repository.model.FileEntry addTempFileEntry(
221                    long groupId, java.lang.String folderName, java.lang.String fileName,
222                    java.io.InputStream inputStream, java.lang.String mimeType)
223                    throws com.liferay.portal.kernel.exception.PortalException {
224                    return getService()
225                                       .addTempFileEntry(groupId, folderName, fileName,
226                            inputStream, mimeType);
227            }
228    
229            /**
230            * Deletes the layout with the primary key, also deleting the layout's child
231            * layouts, and associated resources.
232            *
233            * @param groupId the primary key of the group
234            * @param privateLayout whether the layout is private to the group
235            * @param layoutId the primary key of the layout
236            * @param serviceContext the service context to be applied
237            * @throws PortalException if the user did not have permission to delete the
238            layout, if a matching layout could not be found , or if some
239            other portal exception occurred
240            */
241            public static void deleteLayout(long groupId, boolean privateLayout,
242                    long layoutId, com.liferay.portal.service.ServiceContext serviceContext)
243                    throws com.liferay.portal.kernel.exception.PortalException {
244                    getService()
245                            .deleteLayout(groupId, privateLayout, layoutId, serviceContext);
246            }
247    
248            /**
249            * Deletes the layout with the plid, also deleting the layout's child
250            * layouts, and associated resources.
251            *
252            * @param plid the primary key of the layout
253            * @param serviceContext the service context to be applied
254            * @throws PortalException if the user did not have permission to delete the
255            layout, if a layout with the primary key could not be found , or
256            if some other portal exception occurred
257            */
258            public static void deleteLayout(long plid,
259                    com.liferay.portal.service.ServiceContext serviceContext)
260                    throws com.liferay.portal.kernel.exception.PortalException {
261                    getService().deleteLayout(plid, serviceContext);
262            }
263    
264            public static void deleteTempFileEntry(long groupId,
265                    java.lang.String folderName, java.lang.String fileName)
266                    throws com.liferay.portal.kernel.exception.PortalException {
267                    getService().deleteTempFileEntry(groupId, folderName, fileName);
268            }
269    
270            /**
271            * Exports the layouts that match the primary keys and the criteria as a
272            * byte array.
273            *
274            * @param groupId the primary key of the group
275            * @param privateLayout whether the layout is private to the group
276            * @param layoutIds the primary keys of the layouts to be exported
277            * @param parameterMap the mapping of parameters indicating which
278            information to export. For information on the keys used in the
279            map see {@link
280            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}.
281            * @param startDate the export's start date
282            * @param endDate the export's end date
283            * @return the layouts as a byte array
284            * @throws PortalException if a group or any layout with the primary key
285            could not be found, if the group did not have permission to
286            manage the layouts, or if some other portal exception occurred
287            */
288            public static byte[] exportLayouts(long groupId, boolean privateLayout,
289                    long[] layoutIds,
290                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
291                    java.util.Date startDate, java.util.Date endDate)
292                    throws com.liferay.portal.kernel.exception.PortalException {
293                    return getService()
294                                       .exportLayouts(groupId, privateLayout, layoutIds,
295                            parameterMap, startDate, endDate);
296            }
297    
298            /**
299            * Exports all layouts that match the criteria as a byte array.
300            *
301            * @param groupId the primary key of the group
302            * @param privateLayout whether the layout is private to the group
303            * @param parameterMap the mapping of parameters indicating which
304            information to export. For information on the keys used in the
305            map see {@link
306            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}.
307            * @param startDate the export's start date
308            * @param endDate the export's end date
309            * @return the layout as a byte array
310            * @throws PortalException if a group with the primary key could not be
311            found, if the group did not have permission to manage the
312            layouts, or if some other portal exception occurred
313            */
314            public static byte[] exportLayouts(long groupId, boolean privateLayout,
315                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
316                    java.util.Date startDate, java.util.Date endDate)
317                    throws com.liferay.portal.kernel.exception.PortalException {
318                    return getService()
319                                       .exportLayouts(groupId, privateLayout, parameterMap,
320                            startDate, endDate);
321            }
322    
323            /**
324            * Exports all layouts that match the primary keys and criteria as a file.
325            *
326            * @param groupId the primary key of the group
327            * @param privateLayout whether the layout is private to the group
328            * @param layoutIds the primary keys of the layouts to be exported
329            (optionally <code>null</code>)
330            * @param parameterMap the mapping of parameters indicating which
331            information to export. For information on the keys used in the
332            map see {@link
333            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}.
334            * @param startDate the export's start date
335            * @param endDate the export's end date
336            * @return the layouts as a File
337            * @throws PortalException if a group or any layout with the primary key
338            could not be found, it the group did not have permission to
339            manage the layouts, or if some other portal exception occurred
340            */
341            public static java.io.File exportLayoutsAsFile(long groupId,
342                    boolean privateLayout, long[] layoutIds,
343                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
344                    java.util.Date startDate, java.util.Date endDate)
345                    throws com.liferay.portal.kernel.exception.PortalException {
346                    return getService()
347                                       .exportLayoutsAsFile(groupId, privateLayout, layoutIds,
348                            parameterMap, startDate, endDate);
349            }
350    
351            public static long exportLayoutsAsFileInBackground(
352                    com.liferay.portal.model.ExportImportConfiguration exportImportConfiguration)
353                    throws com.liferay.portal.kernel.exception.PortalException {
354                    return getService()
355                                       .exportLayoutsAsFileInBackground(exportImportConfiguration);
356            }
357    
358            public static long exportLayoutsAsFileInBackground(
359                    long exportImportConfigurationId)
360                    throws com.liferay.portal.kernel.exception.PortalException {
361                    return getService()
362                                       .exportLayoutsAsFileInBackground(exportImportConfigurationId);
363            }
364    
365            public static long exportLayoutsAsFileInBackground(
366                    java.lang.String taskName, long groupId, boolean privateLayout,
367                    long[] layoutIds,
368                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
369                    java.util.Date startDate, java.util.Date endDate)
370                    throws com.liferay.portal.kernel.exception.PortalException {
371                    return getService()
372                                       .exportLayoutsAsFileInBackground(taskName, groupId,
373                            privateLayout, layoutIds, parameterMap, startDate, endDate);
374            }
375    
376            /**
377            * @deprecated As of 7.0.0, replaced by {@link
378            #exportLayoutsAsFileInBackground(String, long, boolean,
379            long[], Map, Date, Date)}
380            */
381            @Deprecated
382            public static long exportLayoutsAsFileInBackground(
383                    java.lang.String taskName, long groupId, boolean privateLayout,
384                    long[] layoutIds,
385                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
386                    java.util.Date startDate, java.util.Date endDate,
387                    java.lang.String fileName)
388                    throws com.liferay.portal.kernel.exception.PortalException {
389                    return getService()
390                                       .exportLayoutsAsFileInBackground(taskName, groupId,
391                            privateLayout, layoutIds, parameterMap, startDate, endDate, fileName);
392            }
393    
394            public static byte[] exportPortletInfo(long companyId,
395                    java.lang.String portletId,
396                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
397                    java.util.Date startDate, java.util.Date endDate)
398                    throws com.liferay.portal.kernel.exception.PortalException {
399                    return getService()
400                                       .exportPortletInfo(companyId, portletId, parameterMap,
401                            startDate, endDate);
402            }
403    
404            /**
405            * Exports the portlet information (categories, permissions, ... etc.) as a
406            * byte array.
407            *
408            * @param plid the primary key of the layout
409            * @param groupId the primary key of the group
410            * @param portletId the primary key of the portlet
411            * @param parameterMap the mapping of parameters indicating which
412            information to export. For information on the keys used in the
413            map see {@link
414            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}.
415            * @param startDate the export's start date
416            * @param endDate the export's end date
417            * @return the portlet information as a byte array
418            * @throws PortalException if a layout, group, or portlet with the primary
419            key could not be found, if the group did not have permission to
420            manage the layouts involved, or if some other portal exception
421            occurred
422            */
423            public static byte[] exportPortletInfo(long plid, long groupId,
424                    java.lang.String portletId,
425                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
426                    java.util.Date startDate, java.util.Date endDate)
427                    throws com.liferay.portal.kernel.exception.PortalException {
428                    return getService()
429                                       .exportPortletInfo(plid, groupId, portletId, parameterMap,
430                            startDate, endDate);
431            }
432    
433            /**
434            * Exports the portlet information (categories, permissions, ... etc.) as a
435            * file.
436            *
437            * @param plid the primary key of the layout
438            * @param groupId the primary key of the group
439            * @param portletId the primary key of the portlet
440            * @param parameterMap the mapping of parameters indicating which
441            information to export. For information on the keys used in the
442            map see {@link
443            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}.
444            * @param startDate the export's start date
445            * @param endDate the export's end date
446            * @return the portlet information as a file
447            * @throws PortalException if a layout, group, or portlet with the primary
448            key could not be found, it the group did not have permission to
449            manage the layouts involved, or if some other portal exception
450            occurred
451            */
452            public static java.io.File exportPortletInfoAsFile(long plid, long groupId,
453                    java.lang.String portletId,
454                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
455                    java.util.Date startDate, java.util.Date endDate)
456                    throws com.liferay.portal.kernel.exception.PortalException {
457                    return getService()
458                                       .exportPortletInfoAsFile(plid, groupId, portletId,
459                            parameterMap, startDate, endDate);
460            }
461    
462            public static java.io.File exportPortletInfoAsFile(
463                    java.lang.String portletId,
464                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
465                    java.util.Date startDate, java.util.Date endDate)
466                    throws com.liferay.portal.kernel.exception.PortalException {
467                    return getService()
468                                       .exportPortletInfoAsFile(portletId, parameterMap, startDate,
469                            endDate);
470            }
471    
472            public static long exportPortletInfoAsFileInBackground(
473                    java.lang.String taskName, long plid, long groupId,
474                    java.lang.String portletId,
475                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
476                    java.util.Date startDate, java.util.Date endDate,
477                    java.lang.String fileName)
478                    throws com.liferay.portal.kernel.exception.PortalException {
479                    return getService()
480                                       .exportPortletInfoAsFileInBackground(taskName, plid,
481                            groupId, portletId, parameterMap, startDate, endDate, fileName);
482            }
483    
484            public static long exportPortletInfoAsFileInBackground(
485                    java.lang.String taskName, java.lang.String portletId,
486                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
487                    java.util.Date startDate, java.util.Date endDate,
488                    java.lang.String fileName)
489                    throws com.liferay.portal.kernel.exception.PortalException {
490                    return getService()
491                                       .exportPortletInfoAsFileInBackground(taskName, portletId,
492                            parameterMap, startDate, endDate, fileName);
493            }
494    
495            /**
496            * Returns all the ancestor layouts of the layout.
497            *
498            * @param plid the primary key of the layout
499            * @return the ancestor layouts of the layout
500            * @throws PortalException if a matching layout could not be found or if a
501            portal exception occurred
502            */
503            public static java.util.List<com.liferay.portal.model.Layout> getAncestorLayouts(
504                    long plid) throws com.liferay.portal.kernel.exception.PortalException {
505                    return getService().getAncestorLayouts(plid);
506            }
507    
508            /**
509            * Returns the Spring bean ID for this bean.
510            *
511            * @return the Spring bean ID for this bean
512            */
513            public static java.lang.String getBeanIdentifier() {
514                    return getService().getBeanIdentifier();
515            }
516    
517            public static long getDefaultPlid(long groupId, long scopeGroupId,
518                    java.lang.String portletId)
519                    throws com.liferay.portal.kernel.exception.PortalException {
520                    return getService().getDefaultPlid(groupId, scopeGroupId, portletId);
521            }
522    
523            /**
524            * Returns the primary key of the default layout for the group.
525            *
526            * @param groupId the primary key of the group
527            * @param scopeGroupId the primary key of the scope group. See {@link
528            com.liferay.portal.service.ServiceContext#getScopeGroupId()}.
529            * @param privateLayout whether the layout is private to the group
530            * @param portletId the primary key of the portlet
531            * @return Returns the primary key of the default layout group; {@link
532            com.liferay.portal.model.LayoutConstants#DEFAULT_PLID} otherwise
533            * @throws PortalException if a group, layout, or portlet with the primary
534            key could not be found
535            */
536            public static long getDefaultPlid(long groupId, long scopeGroupId,
537                    boolean privateLayout, java.lang.String portletId)
538                    throws com.liferay.portal.kernel.exception.PortalException {
539                    return getService()
540                                       .getDefaultPlid(groupId, scopeGroupId, privateLayout,
541                            portletId);
542            }
543    
544            /**
545            * Returns the layout matching the UUID, group, and privacy.
546            *
547            * @param uuid the layout's UUID
548            * @param groupId the primary key of the group
549            * @param privateLayout whether the layout is private to the group
550            * @return the matching layout
551            * @throws PortalException if a matching layout could not be found, if the
552            user did not have permission to view the layout, or if some other
553            portal exception occurred
554            */
555            public static com.liferay.portal.model.Layout getLayoutByUuidAndGroupId(
556                    java.lang.String uuid, long groupId, boolean privateLayout)
557                    throws com.liferay.portal.kernel.exception.PortalException {
558                    return getService()
559                                       .getLayoutByUuidAndGroupId(uuid, groupId, privateLayout);
560            }
561    
562            /**
563            * Returns the name of the layout.
564            *
565            * @param groupId the primary key of the group
566            * @param privateLayout whether the layout is private to the group
567            * @param layoutId the primary key of the layout
568            * @param languageId the primary key of the language. For more information
569            See {@link java.util.Locale}.
570            * @return the layout's name
571            * @throws PortalException if a matching layout could not be found
572            */
573            public static java.lang.String getLayoutName(long groupId,
574                    boolean privateLayout, long layoutId, java.lang.String languageId)
575                    throws com.liferay.portal.kernel.exception.PortalException {
576                    return getService()
577                                       .getLayoutName(groupId, privateLayout, layoutId, languageId);
578            }
579    
580            /**
581            * Returns the layout references for all the layouts that belong to the
582            * company and belong to the portlet that matches the preferences.
583            *
584            * @param companyId the primary key of the company
585            * @param portletId the primary key of the portlet
586            * @param preferencesKey the portlet's preference key
587            * @param preferencesValue the portlet's preference value
588            * @return the layout references of the matching layouts
589            */
590            public static com.liferay.portal.model.LayoutReference[] getLayoutReferences(
591                    long companyId, java.lang.String portletId,
592                    java.lang.String preferencesKey, java.lang.String preferencesValue) {
593                    return getService()
594                                       .getLayoutReferences(companyId, portletId, preferencesKey,
595                            preferencesValue);
596            }
597    
598            public static java.util.List<com.liferay.portal.model.Layout> getLayouts(
599                    long groupId, boolean privateLayout) {
600                    return getService().getLayouts(groupId, privateLayout);
601            }
602    
603            public static java.util.List<com.liferay.portal.model.Layout> getLayouts(
604                    long groupId, boolean privateLayout, long parentLayoutId) {
605                    return getService().getLayouts(groupId, privateLayout, parentLayoutId);
606            }
607    
608            public static java.util.List<com.liferay.portal.model.Layout> getLayouts(
609                    long groupId, boolean privateLayout, long parentLayoutId,
610                    boolean incomplete, int start, int end) {
611                    return getService()
612                                       .getLayouts(groupId, privateLayout, parentLayoutId,
613                            incomplete, start, end);
614            }
615    
616            public static int getLayoutsCount(long groupId, boolean privateLayout,
617                    long parentLayoutId) {
618                    return getService()
619                                       .getLayoutsCount(groupId, privateLayout, parentLayoutId);
620            }
621    
622            public static java.lang.String[] getTempFileNames(long groupId,
623                    java.lang.String folderName)
624                    throws com.liferay.portal.kernel.exception.PortalException {
625                    return getService().getTempFileNames(groupId, folderName);
626            }
627    
628            /**
629            * Imports the layouts from the byte array.
630            *
631            * @param groupId the primary key of the group
632            * @param privateLayout whether the layout is private to the group
633            * @param parameterMap the mapping of parameters indicating which
634            information will be imported. For information on the keys used in
635            the map see {@link
636            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}.
637            * @param bytes the byte array with the data
638            * @throws PortalException if a group with the primary key could not be
639            found, if the group did not have permission to manage the
640            layouts, or if some other portal exception occurred
641            * @see com.liferay.portal.lar.LayoutImporter
642            */
643            public static void importLayouts(long groupId, boolean privateLayout,
644                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
645                    byte[] bytes)
646                    throws com.liferay.portal.kernel.exception.PortalException {
647                    getService().importLayouts(groupId, privateLayout, parameterMap, bytes);
648            }
649    
650            /**
651            * Imports the layouts from the file.
652            *
653            * @param groupId the primary key of the group
654            * @param privateLayout whether the layout is private to the group
655            * @param parameterMap the mapping of parameters indicating which
656            information will be imported. For information on the keys used in
657            the map see {@link
658            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}.
659            * @param file the LAR file with the data
660            * @throws PortalException if a group with the primary key could not be
661            found, if the group did not have permission to manage the layouts
662            and publish, or if some other portal exception occurred
663            * @see com.liferay.portal.lar.LayoutImporter
664            */
665            public static void importLayouts(long groupId, boolean privateLayout,
666                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
667                    java.io.File file)
668                    throws com.liferay.portal.kernel.exception.PortalException {
669                    getService().importLayouts(groupId, privateLayout, parameterMap, file);
670            }
671    
672            /**
673            * Imports the layouts from the input stream.
674            *
675            * @param groupId the primary key of the group
676            * @param privateLayout whether the layout is private to the group
677            * @param parameterMap the mapping of parameters indicating which
678            information will be imported. For information on the keys used in
679            the map see {@link
680            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}.
681            * @param is the input stream
682            * @throws PortalException if a group with the primary key could not be
683            found, if the group did not have permission to manage the
684            layouts, or if some other portal exception occurred
685            * @see com.liferay.portal.lar.LayoutImporter
686            */
687            public static void importLayouts(long groupId, boolean privateLayout,
688                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
689                    java.io.InputStream is)
690                    throws com.liferay.portal.kernel.exception.PortalException {
691                    getService().importLayouts(groupId, privateLayout, parameterMap, is);
692            }
693    
694            public static long importLayoutsInBackground(java.lang.String taskName,
695                    long groupId, boolean privateLayout,
696                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
697                    java.io.File file)
698                    throws com.liferay.portal.kernel.exception.PortalException {
699                    return getService()
700                                       .importLayoutsInBackground(taskName, groupId, privateLayout,
701                            parameterMap, file);
702            }
703    
704            public static long importLayoutsInBackground(java.lang.String taskName,
705                    long groupId, boolean privateLayout,
706                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
707                    java.io.InputStream inputStream)
708                    throws com.liferay.portal.kernel.exception.PortalException {
709                    return getService()
710                                       .importLayoutsInBackground(taskName, groupId, privateLayout,
711                            parameterMap, inputStream);
712            }
713    
714            /**
715            * Imports the portlet information (categories, permissions, ... etc.) from
716            * the file.
717            *
718            * @param plid the primary key of the layout
719            * @param groupId the primary key of the group
720            * @param portletId the primary key of the portlet
721            * @param parameterMap the mapping of parameters indicating which
722            information will be imported. For information on the keys used in
723            the map see {@link
724            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}.
725            * @param file the LAR file with the data
726            * @throws PortalException if a group, layout, or portlet with the primary
727            key could not be found, or if the group did not have permission
728            to manage the layouts
729            */
730            public static void importPortletInfo(long plid, long groupId,
731                    java.lang.String portletId,
732                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
733                    java.io.File file)
734                    throws com.liferay.portal.kernel.exception.PortalException {
735                    getService()
736                            .importPortletInfo(plid, groupId, portletId, parameterMap, file);
737            }
738    
739            /**
740            * Imports the portlet information (categories, permissions, ... etc.) from
741            * the input stream.
742            *
743            * @param plid the primary key of the layout
744            * @param groupId the primary key of the group
745            * @param portletId the primary key of the portlet
746            * @param parameterMap the mapping of parameters indicating which
747            information will be imported. For information on the keys used in
748            the map see {@link
749            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}.
750            * @param is the input stream
751            * @throws PortalException if a group, portlet, or layout with the primary
752            key could not be found or if the group did not have permission to
753            manage the layouts
754            */
755            public static void importPortletInfo(long plid, long groupId,
756                    java.lang.String portletId,
757                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
758                    java.io.InputStream is)
759                    throws com.liferay.portal.kernel.exception.PortalException {
760                    getService()
761                            .importPortletInfo(plid, groupId, portletId, parameterMap, is);
762            }
763    
764            public static void importPortletInfo(java.lang.String portletId,
765                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
766                    java.io.File file)
767                    throws com.liferay.portal.kernel.exception.PortalException {
768                    getService().importPortletInfo(portletId, parameterMap, file);
769            }
770    
771            public static void importPortletInfo(java.lang.String portletId,
772                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
773                    java.io.InputStream is)
774                    throws com.liferay.portal.kernel.exception.PortalException {
775                    getService().importPortletInfo(portletId, parameterMap, is);
776            }
777    
778            public static long importPortletInfoInBackground(
779                    java.lang.String taskName, long plid, long groupId,
780                    java.lang.String portletId,
781                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
782                    java.io.File file)
783                    throws com.liferay.portal.kernel.exception.PortalException {
784                    return getService()
785                                       .importPortletInfoInBackground(taskName, plid, groupId,
786                            portletId, parameterMap, file);
787            }
788    
789            public static long importPortletInfoInBackground(
790                    java.lang.String taskName, long plid, long groupId,
791                    java.lang.String portletId,
792                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
793                    java.io.InputStream is)
794                    throws com.liferay.portal.kernel.exception.PortalException {
795                    return getService()
796                                       .importPortletInfoInBackground(taskName, plid, groupId,
797                            portletId, parameterMap, is);
798            }
799    
800            public static void importPortletInfoInBackground(
801                    java.lang.String taskName, java.lang.String portletId,
802                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
803                    java.io.File file)
804                    throws com.liferay.portal.kernel.exception.PortalException {
805                    getService()
806                            .importPortletInfoInBackground(taskName, portletId, parameterMap,
807                            file);
808            }
809    
810            public static void importPortletInfoInBackground(
811                    java.lang.String taskName, java.lang.String portletId,
812                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
813                    java.io.InputStream is)
814                    throws com.liferay.portal.kernel.exception.PortalException {
815                    getService()
816                            .importPortletInfoInBackground(taskName, portletId, parameterMap, is);
817            }
818    
819            /**
820            * Schedules a range of layouts to be published.
821            *
822            * @param sourceGroupId the primary key of the source group
823            * @param targetGroupId the primary key of the target group
824            * @param privateLayout whether the layout is private to the group
825            * @param layoutIdMap the layouts considered for publishing, specified
826            by the layout IDs and booleans indicating whether they have
827            children
828            * @param parameterMap the mapping of parameters indicating which
829            information will be used. See {@link
830            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}
831            * @param scope the scope of the pages. It can be
832            <code>all-pages</code> or <code>selected-pages</code>.
833            * @param startDate the start date
834            * @param endDate the end date
835            * @param groupName the group name (optionally {@link
836            com.liferay.portal.kernel.messaging.DestinationNames#LAYOUTS_LOCAL_PUBLISHER}).
837            See {@link
838            com.liferay.portal.kernel.messaging.DestinationNames}.
839            * @param cronText the cron text. See {@link
840            com.liferay.portal.kernel.cal.RecurrenceSerializer
841            #toCronText}
842            * @param schedulerStartDate the scheduler start date
843            * @param schedulerEndDate the scheduler end date
844            * @param description the scheduler description
845            * @throws PortalException if the group did not have permission to
846            manage and publish
847            * @deprecated As of 7.0.0, replaced by {@link #schedulePublishToLive(long,
848            long, boolean, long[], Map, String, Date, Date, String,
849            String, Date, Date, String)}
850            */
851            @Deprecated
852            public static void schedulePublishToLive(long sourceGroupId,
853                    long targetGroupId, boolean privateLayout,
854                    java.util.Map<java.lang.Long, java.lang.Boolean> layoutIdMap,
855                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
856                    java.lang.String scope, java.util.Date startDate,
857                    java.util.Date endDate, java.lang.String groupName,
858                    java.lang.String cronText, java.util.Date schedulerStartDate,
859                    java.util.Date schedulerEndDate, java.lang.String description)
860                    throws com.liferay.portal.kernel.exception.PortalException {
861                    getService()
862                            .schedulePublishToLive(sourceGroupId, targetGroupId, privateLayout,
863                            layoutIdMap, parameterMap, scope, startDate, endDate, groupName,
864                            cronText, schedulerStartDate, schedulerEndDate, description);
865            }
866    
867            /**
868            * Schedules a range of layouts to be published.
869            *
870            * @param sourceGroupId the primary key of the source group
871            * @param targetGroupId the primary key of the target group
872            * @param privateLayout whether the layout is private to the group
873            * @param layoutIds the layouts considered for publishing, specified by the
874            layout IDs
875            * @param parameterMap the mapping of parameters indicating which
876            information will be used. See {@link
877            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}
878            * @param scope the scope of the pages. It can be <code>all-pages</code> or
879            <code>selected-pages</code>.
880            * @param startDate the start date
881            * @param endDate the end date
882            * @param groupName the group name (optionally {@link
883            com.liferay.portal.kernel.messaging.DestinationNames#LAYOUTS_LOCAL_PUBLISHER}).
884            See {@link com.liferay.portal.kernel.messaging.DestinationNames}.
885            * @param cronText the cron text. See {@link
886            com.liferay.portal.kernel.cal.RecurrenceSerializer #toCronText}
887            * @param schedulerStartDate the scheduler start date
888            * @param schedulerEndDate the scheduler end date
889            * @param description the scheduler description
890            * @throws PortalException if the group did not have permission to manage
891            and publish
892            */
893            public static void schedulePublishToLive(long sourceGroupId,
894                    long targetGroupId, boolean privateLayout, long[] layoutIds,
895                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
896                    java.lang.String scope, java.util.Date startDate,
897                    java.util.Date endDate, java.lang.String groupName,
898                    java.lang.String cronText, java.util.Date schedulerStartDate,
899                    java.util.Date schedulerEndDate, java.lang.String description)
900                    throws com.liferay.portal.kernel.exception.PortalException {
901                    getService()
902                            .schedulePublishToLive(sourceGroupId, targetGroupId, privateLayout,
903                            layoutIds, parameterMap, scope, startDate, endDate, groupName,
904                            cronText, schedulerStartDate, schedulerEndDate, description);
905            }
906    
907            /**
908            * Schedules a range of layouts to be stored.
909            *
910            * @param sourceGroupId the primary key of the source group
911            * @param privateLayout whether the layout is private to the group
912            * @param layoutIdMap the layouts considered for publishing, specified by
913            the layout IDs and booleans indicating whether they have children
914            * @param parameterMap the mapping of parameters indicating which
915            information will be used. See {@link
916            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}
917            * @param remoteAddress the remote address
918            * @param remotePort the remote port
919            * @param remotePathContext the remote path context
920            * @param secureConnection whether the connection is secure
921            * @param remoteGroupId the primary key of the remote group
922            * @param remotePrivateLayout whether remote group's layout is private
923            * @param startDate the start date
924            * @param endDate the end date
925            * @param groupName the group name. Optionally {@link
926            com.liferay.portal.kernel.messaging.DestinationNames#LAYOUTS_LOCAL_PUBLISHER}).
927            See {@link com.liferay.portal.kernel.messaging.DestinationNames}.
928            * @param cronText the cron text. See {@link
929            com.liferay.portal.kernel.cal.RecurrenceSerializer #toCronText}
930            * @param schedulerStartDate the scheduler start date
931            * @param schedulerEndDate the scheduler end date
932            * @param description the scheduler description
933            * @throws PortalException if a group with the source group primary key was
934            not found or if the group did not have permission to publish
935            */
936            public static void schedulePublishToRemote(long sourceGroupId,
937                    boolean privateLayout,
938                    java.util.Map<java.lang.Long, java.lang.Boolean> layoutIdMap,
939                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
940                    java.lang.String remoteAddress, int remotePort,
941                    java.lang.String remotePathContext, boolean secureConnection,
942                    long remoteGroupId, boolean remotePrivateLayout,
943                    java.util.Date startDate, java.util.Date endDate,
944                    java.lang.String groupName, java.lang.String cronText,
945                    java.util.Date schedulerStartDate, java.util.Date schedulerEndDate,
946                    java.lang.String description)
947                    throws com.liferay.portal.kernel.exception.PortalException {
948                    getService()
949                            .schedulePublishToRemote(sourceGroupId, privateLayout, layoutIdMap,
950                            parameterMap, remoteAddress, remotePort, remotePathContext,
951                            secureConnection, remoteGroupId, remotePrivateLayout, startDate,
952                            endDate, groupName, cronText, schedulerStartDate, schedulerEndDate,
953                            description);
954            }
955    
956            /**
957            * Sets the Spring bean ID for this bean.
958            *
959            * @param beanIdentifier the Spring bean ID for this bean
960            */
961            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
962                    getService().setBeanIdentifier(beanIdentifier);
963            }
964    
965            /**
966            * Sets the layouts for the group, replacing and prioritizing all layouts of
967            * the parent layout.
968            *
969            * @param groupId the primary key of the group
970            * @param privateLayout whether the layout is private to the group
971            * @param parentLayoutId the primary key of the parent layout
972            * @param layoutIds the primary keys of the layouts
973            * @param serviceContext the service context to be applied
974            * @throws PortalException if a group or layout with the primary key could
975            not be found, if the group did not have permission to manage the
976            layouts, if no layouts were specified, if the first layout was
977            not page-able, if the first layout was hidden, or if some other
978            portal exception occurred
979            */
980            public static void setLayouts(long groupId, boolean privateLayout,
981                    long parentLayoutId, long[] layoutIds,
982                    com.liferay.portal.service.ServiceContext serviceContext)
983                    throws com.liferay.portal.kernel.exception.PortalException {
984                    getService()
985                            .setLayouts(groupId, privateLayout, parentLayoutId, layoutIds,
986                            serviceContext);
987            }
988    
989            /**
990            * Deletes the job from the scheduler's queue.
991            *
992            * @param groupId the primary key of the group
993            * @param jobName the job name
994            * @param groupName the group name (optionally {@link
995            com.liferay.portal.kernel.messaging.DestinationNames#LAYOUTS_LOCAL_PUBLISHER}).
996            See {@link com.liferay.portal.kernel.messaging.DestinationNames}.
997            * @throws PortalException if the group did not permission to manage staging
998            and publish
999            */
1000            public static void unschedulePublishToLive(long groupId,
1001                    java.lang.String jobName, java.lang.String groupName)
1002                    throws com.liferay.portal.kernel.exception.PortalException {
1003                    getService().unschedulePublishToLive(groupId, jobName, groupName);
1004            }
1005    
1006            /**
1007            * Deletes the job from the scheduler's persistent queue.
1008            *
1009            * @param groupId the primary key of the group
1010            * @param jobName the job name
1011            * @param groupName the group name (optionally {@link
1012            com.liferay.portal.kernel.messaging.DestinationNames#LAYOUTS_LOCAL_PUBLISHER}).
1013            See {@link com.liferay.portal.kernel.messaging.DestinationNames}.
1014            * @throws PortalException if a group with the primary key could not be
1015            found or if the group did not have permission to publish
1016            */
1017            public static void unschedulePublishToRemote(long groupId,
1018                    java.lang.String jobName, java.lang.String groupName)
1019                    throws com.liferay.portal.kernel.exception.PortalException {
1020                    getService().unschedulePublishToRemote(groupId, jobName, groupName);
1021            }
1022    
1023            public static com.liferay.portal.model.Layout updateIconImage(long plid,
1024                    byte[] bytes)
1025                    throws com.liferay.portal.kernel.exception.PortalException {
1026                    return getService().updateIconImage(plid, bytes);
1027            }
1028    
1029            /**
1030            * Updates the layout with additional parameters.
1031            *
1032            * @param groupId the primary key of the group
1033            * @param privateLayout whether the layout is private to the group
1034            * @param layoutId the primary key of the layout
1035            * @param parentLayoutId the primary key of the layout's new parent
1036            layout
1037            * @param localeNamesMap the layout's locales and localized names
1038            * @param localeTitlesMap the layout's locales and localized titles
1039            * @param descriptionMap the locales and localized descriptions to
1040            merge (optionally <code>null</code>)
1041            * @param keywordsMap the locales and localized keywords to merge
1042            (optionally <code>null</code>)
1043            * @param robotsMap the locales and localized robots to merge
1044            (optionally <code>null</code>)
1045            * @param type the layout's new type (optionally {@link
1046            com.liferay.portal.model.LayoutConstants#TYPE_PORTLET})
1047            * @param hidden whether the layout is hidden
1048            * @param friendlyURL the layout's locales and new friendly URLs. To
1049            see how the URL is normalized when accessed, see {@link
1050            com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize(
1051            String)}.
1052            * @param iconImage whether the icon image will be updated
1053            * @param iconBytes the byte array of the layout's new icon image
1054            * @param serviceContext the service context to be applied. Can set the
1055            modification date and expando bridge attributes for the
1056            layout.
1057            * @return the updated layout
1058            * @throws PortalException if a group or layout with the primary key
1059            could not be found, if the user did not have permission to
1060            update the layout, if a unique friendly URL could not be
1061            generated, if a valid parent layout ID to use could not be
1062            found, or if the layout parameters were invalid
1063            * @deprecated As of 6.2.0, replaced by {@link #updateLayout(long, boolean,
1064            long, long, Map, Map, Map, Map, Map, String, boolean, Map,
1065            Boolean, byte[], ServiceContext)}
1066            */
1067            @Deprecated
1068            public static com.liferay.portal.model.Layout updateLayout(long groupId,
1069                    boolean privateLayout, long layoutId, long parentLayoutId,
1070                    java.util.Map<java.util.Locale, java.lang.String> localeNamesMap,
1071                    java.util.Map<java.util.Locale, java.lang.String> localeTitlesMap,
1072                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
1073                    java.util.Map<java.util.Locale, java.lang.String> keywordsMap,
1074                    java.util.Map<java.util.Locale, java.lang.String> robotsMap,
1075                    java.lang.String type, boolean hidden, java.lang.String friendlyURL,
1076                    java.lang.Boolean iconImage, byte[] iconBytes,
1077                    com.liferay.portal.service.ServiceContext serviceContext)
1078                    throws com.liferay.portal.kernel.exception.PortalException {
1079                    return getService()
1080                                       .updateLayout(groupId, privateLayout, layoutId,
1081                            parentLayoutId, localeNamesMap, localeTitlesMap, descriptionMap,
1082                            keywordsMap, robotsMap, type, hidden, friendlyURL, iconImage,
1083                            iconBytes, serviceContext);
1084            }
1085    
1086            /**
1087            * Updates the layout with additional parameters.
1088            *
1089            * @param groupId the primary key of the group
1090            * @param privateLayout whether the layout is private to the group
1091            * @param layoutId the primary key of the layout
1092            * @param parentLayoutId the primary key of the layout's new parent layout
1093            * @param localeNamesMap the layout's locales and localized names
1094            * @param localeTitlesMap the layout's locales and localized titles
1095            * @param descriptionMap the locales and localized descriptions to merge
1096            (optionally <code>null</code>)
1097            * @param keywordsMap the locales and localized keywords to merge
1098            (optionally <code>null</code>)
1099            * @param robotsMap the locales and localized robots to merge (optionally
1100            <code>null</code>)
1101            * @param type the layout's new type (optionally {@link
1102            com.liferay.portal.model.LayoutConstants#TYPE_PORTLET})
1103            * @param hidden whether the layout is hidden
1104            * @param friendlyURLMap the layout's locales and localized friendly URLs.
1105            To see how the URL is normalized when accessed see {@link
1106            com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize(
1107            String)}.
1108            * @param iconImage whether the icon image will be updated
1109            * @param iconBytes the byte array of the layout's new icon image
1110            * @param serviceContext the service context to be applied. Can set the
1111            modification date and expando bridge attributes for the layout.
1112            * @return the updated layout
1113            * @throws PortalException if a group or layout with the primary key could
1114            not be found, if the user did not have permission to update the
1115            layout, if a unique friendly URL could not be generated, if a
1116            valid parent layout ID to use could not be found, or if the
1117            layout parameters were invalid
1118            */
1119            public static com.liferay.portal.model.Layout updateLayout(long groupId,
1120                    boolean privateLayout, long layoutId, long parentLayoutId,
1121                    java.util.Map<java.util.Locale, java.lang.String> localeNamesMap,
1122                    java.util.Map<java.util.Locale, java.lang.String> localeTitlesMap,
1123                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
1124                    java.util.Map<java.util.Locale, java.lang.String> keywordsMap,
1125                    java.util.Map<java.util.Locale, java.lang.String> robotsMap,
1126                    java.lang.String type, boolean hidden,
1127                    java.util.Map<java.util.Locale, java.lang.String> friendlyURLMap,
1128                    boolean iconImage, byte[] iconBytes,
1129                    com.liferay.portal.service.ServiceContext serviceContext)
1130                    throws com.liferay.portal.kernel.exception.PortalException {
1131                    return getService()
1132                                       .updateLayout(groupId, privateLayout, layoutId,
1133                            parentLayoutId, localeNamesMap, localeTitlesMap, descriptionMap,
1134                            keywordsMap, robotsMap, type, hidden, friendlyURLMap, iconImage,
1135                            iconBytes, serviceContext);
1136            }
1137    
1138            /**
1139            * Updates the layout replacing its type settings.
1140            *
1141            * @param groupId the primary key of the group
1142            * @param privateLayout whether the layout is private to the group
1143            * @param layoutId the primary key of the layout
1144            * @param typeSettings the settings to load the unicode properties object.
1145            See {@link com.liferay.portal.kernel.util.UnicodeProperties
1146            #fastLoad(String)}.
1147            * @return the updated layout
1148            * @throws PortalException if a matching layout could not be found or if the
1149            user did not have permission to update the layout
1150            */
1151            public static com.liferay.portal.model.Layout updateLayout(long groupId,
1152                    boolean privateLayout, long layoutId, java.lang.String typeSettings)
1153                    throws com.liferay.portal.kernel.exception.PortalException {
1154                    return getService()
1155                                       .updateLayout(groupId, privateLayout, layoutId, typeSettings);
1156            }
1157    
1158            /**
1159            * Updates the look and feel of the layout.
1160            *
1161            * @param groupId the primary key of the group
1162            * @param privateLayout whether the layout is private to the group
1163            * @param layoutId the primary key of the layout
1164            * @param themeId the primary key of the layout's new theme
1165            * @param colorSchemeId the primary key of the layout's new color scheme
1166            * @param css the layout's new CSS
1167            * @param wapTheme whether the theme is for WAP browsers
1168            * @return the updated layout
1169            * @throws PortalException if a matching layout could not be found, or if
1170            the user did not have permission to update the layout and
1171            permission to apply the theme
1172            */
1173            public static com.liferay.portal.model.Layout updateLookAndFeel(
1174                    long groupId, boolean privateLayout, long layoutId,
1175                    java.lang.String themeId, java.lang.String colorSchemeId,
1176                    java.lang.String css, boolean wapTheme)
1177                    throws com.liferay.portal.kernel.exception.PortalException {
1178                    return getService()
1179                                       .updateLookAndFeel(groupId, privateLayout, layoutId,
1180                            themeId, colorSchemeId, css, wapTheme);
1181            }
1182    
1183            /**
1184            * Updates the name of the layout matching the group, layout ID, and
1185            * privacy.
1186            *
1187            * @param groupId the primary key of the group
1188            * @param privateLayout whether the layout is private to the group
1189            * @param layoutId the primary key of the layout
1190            * @param name the layout's new name
1191            * @param languageId the primary key of the language. For more information
1192            see {@link java.util.Locale}.
1193            * @return the updated layout
1194            * @throws PortalException if a matching layout could not be found, if the
1195            user did not have permission to update the layout, or if the new
1196            name was <code>null</code>
1197            */
1198            public static com.liferay.portal.model.Layout updateName(long groupId,
1199                    boolean privateLayout, long layoutId, java.lang.String name,
1200                    java.lang.String languageId)
1201                    throws com.liferay.portal.kernel.exception.PortalException {
1202                    return getService()
1203                                       .updateName(groupId, privateLayout, layoutId, name,
1204                            languageId);
1205            }
1206    
1207            /**
1208            * Updates the name of the layout matching the primary key.
1209            *
1210            * @param plid the primary key of the layout
1211            * @param name the name to be assigned
1212            * @param languageId the primary key of the language. For more information
1213            see {@link java.util.Locale}.
1214            * @return the updated layout
1215            * @throws PortalException if a layout with the primary key could not be
1216            found, or if the user did not have permission to update the
1217            layout, or if the name was <code>null</code>
1218            */
1219            public static com.liferay.portal.model.Layout updateName(long plid,
1220                    java.lang.String name, java.lang.String languageId)
1221                    throws com.liferay.portal.kernel.exception.PortalException {
1222                    return getService().updateName(plid, name, languageId);
1223            }
1224    
1225            /**
1226            * Updates the parent layout ID of the layout matching the group, layout ID,
1227            * and privacy.
1228            *
1229            * @param groupId the primary key of the group
1230            * @param privateLayout whether the layout is private to the group
1231            * @param layoutId the primary key of the layout
1232            * @param parentLayoutId the primary key to be assigned to the parent
1233            layout
1234            * @return the matching layout
1235            * @throws PortalException if a valid parent layout ID to use could not be
1236            found, if a matching layout could not be found, or if the user
1237            did not have permission to update the layout
1238            */
1239            public static com.liferay.portal.model.Layout updateParentLayoutId(
1240                    long groupId, boolean privateLayout, long layoutId, long parentLayoutId)
1241                    throws com.liferay.portal.kernel.exception.PortalException {
1242                    return getService()
1243                                       .updateParentLayoutId(groupId, privateLayout, layoutId,
1244                            parentLayoutId);
1245            }
1246    
1247            /**
1248            * Updates the parent layout ID of the layout matching the primary key. If a
1249            * layout matching the parent primary key is found, the layout ID of that
1250            * layout is assigned, otherwise {@link
1251            * com.liferay.portal.model.LayoutConstants#DEFAULT_PARENT_LAYOUT_ID} is
1252            * assigned.
1253            *
1254            * @param plid the primary key of the layout
1255            * @param parentPlid the primary key of the parent layout
1256            * @return the layout matching the primary key
1257            * @throws PortalException if a layout with the primary key could not be
1258            found, if the user did not have permission to update the layout,
1259            or if a valid parent layout ID to use could not be found
1260            */
1261            public static com.liferay.portal.model.Layout updateParentLayoutId(
1262                    long plid, long parentPlid)
1263                    throws com.liferay.portal.kernel.exception.PortalException {
1264                    return getService().updateParentLayoutId(plid, parentPlid);
1265            }
1266    
1267            /**
1268            * Updates the parent layout ID and priority of the layout.
1269            *
1270            * @param plid the primary key of the layout
1271            * @param parentPlid the primary key of the parent layout
1272            * @param priority the layout's new priority
1273            * @return the layout matching the primary key
1274            * @throws PortalException if a portal exception occurred
1275            */
1276            public static com.liferay.portal.model.Layout updateParentLayoutIdAndPriority(
1277                    long plid, long parentPlid, int priority)
1278                    throws com.liferay.portal.kernel.exception.PortalException {
1279                    return getService()
1280                                       .updateParentLayoutIdAndPriority(plid, parentPlid, priority);
1281            }
1282    
1283            /**
1284            * Updates the priority of the layout matching the group, layout ID, and
1285            * privacy, setting the layout's priority based on the priorities of the
1286            * next and previous layouts.
1287            *
1288            * @param groupId the primary key of the group
1289            * @param privateLayout whether the layout is private to the group
1290            * @param layoutId the primary key of the layout
1291            * @param nextLayoutId the primary key of the next layout
1292            * @param previousLayoutId the primary key of the previous layout
1293            * @return the updated layout
1294            * @throws PortalException if a matching layout could not be found or if the
1295            user did not have permission to update the layout
1296            */
1297            public static com.liferay.portal.model.Layout updatePriority(long groupId,
1298                    boolean privateLayout, long layoutId, long nextLayoutId,
1299                    long previousLayoutId)
1300                    throws com.liferay.portal.kernel.exception.PortalException {
1301                    return getService()
1302                                       .updatePriority(groupId, privateLayout, layoutId,
1303                            nextLayoutId, previousLayoutId);
1304            }
1305    
1306            /**
1307            * Updates the priority of the layout matching the group, layout ID, and
1308            * privacy.
1309            *
1310            * @param groupId the primary key of the group
1311            * @param privateLayout whether the layout is private to the group
1312            * @param layoutId the primary key of the layout
1313            * @param priority the layout's new priority
1314            * @return the updated layout
1315            * @throws PortalException if a matching layout could not be found or if the
1316            user did not have permission to update the layout
1317            */
1318            public static com.liferay.portal.model.Layout updatePriority(long groupId,
1319                    boolean privateLayout, long layoutId, int priority)
1320                    throws com.liferay.portal.kernel.exception.PortalException {
1321                    return getService()
1322                                       .updatePriority(groupId, privateLayout, layoutId, priority);
1323            }
1324    
1325            /**
1326            * Updates the priority of the layout matching the primary key.
1327            *
1328            * @param plid the primary key of the layout
1329            * @param priority the layout's new priority
1330            * @return the updated layout
1331            * @throws PortalException if a layout with the primary key could not be
1332            found
1333            */
1334            public static com.liferay.portal.model.Layout updatePriority(long plid,
1335                    int priority)
1336                    throws com.liferay.portal.kernel.exception.PortalException {
1337                    return getService().updatePriority(plid, priority);
1338            }
1339    
1340            public static com.liferay.portal.kernel.lar.MissingReferences validateImportLayoutsFile(
1341                    long groupId, boolean privateLayout,
1342                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
1343                    java.io.File file)
1344                    throws com.liferay.portal.kernel.exception.PortalException {
1345                    return getService()
1346                                       .validateImportLayoutsFile(groupId, privateLayout,
1347                            parameterMap, file);
1348            }
1349    
1350            public static com.liferay.portal.kernel.lar.MissingReferences validateImportLayoutsFile(
1351                    long groupId, boolean privateLayout,
1352                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
1353                    java.io.InputStream inputStream)
1354                    throws com.liferay.portal.kernel.exception.PortalException {
1355                    return getService()
1356                                       .validateImportLayoutsFile(groupId, privateLayout,
1357                            parameterMap, inputStream);
1358            }
1359    
1360            public static com.liferay.portal.kernel.lar.MissingReferences validateImportPortletInfo(
1361                    long plid, long groupId, java.lang.String portletId,
1362                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
1363                    java.io.File file)
1364                    throws com.liferay.portal.kernel.exception.PortalException {
1365                    return getService()
1366                                       .validateImportPortletInfo(plid, groupId, portletId,
1367                            parameterMap, file);
1368            }
1369    
1370            public static com.liferay.portal.kernel.lar.MissingReferences validateImportPortletInfo(
1371                    long plid, long groupId, java.lang.String portletId,
1372                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
1373                    java.io.InputStream inputStream)
1374                    throws com.liferay.portal.kernel.exception.PortalException {
1375                    return getService()
1376                                       .validateImportPortletInfo(plid, groupId, portletId,
1377                            parameterMap, inputStream);
1378            }
1379    
1380            public static LayoutService getService() {
1381                    if (_service == null) {
1382                            _service = (LayoutService)PortalBeanLocatorUtil.locate(LayoutService.class.getName());
1383    
1384                            ReferenceRegistry.registerReference(LayoutServiceUtil.class,
1385                                    "_service");
1386                    }
1387    
1388                    return _service;
1389            }
1390    
1391            /**
1392             * @deprecated As of 6.2.0
1393             */
1394            @Deprecated
1395            public void setService(LayoutService service) {
1396            }
1397    
1398            private static LayoutService _service;
1399    }