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