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