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 java.lang.String[] getTempFileEntryNames(long groupId,
638                    java.lang.String tempFolderName)
639                    throws com.liferay.portal.kernel.exception.PortalException,
640                            com.liferay.portal.kernel.exception.SystemException {
641                    return getService().getTempFileEntryNames(groupId, tempFolderName);
642            }
643    
644            /**
645            * Imports the layouts from the byte array.
646            *
647            * @param groupId the primary key of the group
648            * @param privateLayout whether the layout is private to the group
649            * @param parameterMap the mapping of parameters indicating which
650            information will be imported. For information on the keys used in
651            the map see {@link
652            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}.
653            * @param bytes the byte array with the data
654            * @throws PortalException if a group with the primary key could not be
655            found, if the group did not have permission to manage the
656            layouts, or if some other portal exception occurred
657            * @throws SystemException if a system exception occurred
658            * @see com.liferay.portal.lar.LayoutImporter
659            */
660            public static void importLayouts(long groupId, boolean privateLayout,
661                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
662                    byte[] bytes)
663                    throws com.liferay.portal.kernel.exception.PortalException,
664                            com.liferay.portal.kernel.exception.SystemException {
665                    getService().importLayouts(groupId, privateLayout, parameterMap, bytes);
666            }
667    
668            /**
669            * Imports the layouts from the file.
670            *
671            * @param groupId the primary key of the group
672            * @param privateLayout whether the layout is private to the group
673            * @param parameterMap the mapping of parameters indicating which
674            information will be imported. For information on the keys used in
675            the map see {@link
676            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}.
677            * @param file the LAR file with the data
678            * @throws PortalException if a group with the primary key could not be
679            found, if the group did not have permission to manage the layouts
680            and publish, or if some other portal exception occurred
681            * @throws SystemException if a system exception occurred
682            * @see com.liferay.portal.lar.LayoutImporter
683            */
684            public static void importLayouts(long groupId, boolean privateLayout,
685                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
686                    java.io.File file)
687                    throws com.liferay.portal.kernel.exception.PortalException,
688                            com.liferay.portal.kernel.exception.SystemException {
689                    getService().importLayouts(groupId, privateLayout, parameterMap, file);
690            }
691    
692            /**
693            * Imports the layouts from the input stream.
694            *
695            * @param groupId the primary key of the group
696            * @param privateLayout whether the layout is private to the group
697            * @param parameterMap the mapping of parameters indicating which
698            information will be imported. For information on the keys used in
699            the map see {@link
700            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}.
701            * @param is the input stream
702            * @throws PortalException if a group with the primary key could not be
703            found, if the group did not have permission to manage the
704            layouts, or if some other portal exception occurred
705            * @throws SystemException if a system exception occurred
706            * @see com.liferay.portal.lar.LayoutImporter
707            */
708            public static void importLayouts(long groupId, boolean privateLayout,
709                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
710                    java.io.InputStream is)
711                    throws com.liferay.portal.kernel.exception.PortalException,
712                            com.liferay.portal.kernel.exception.SystemException {
713                    getService().importLayouts(groupId, privateLayout, parameterMap, is);
714            }
715    
716            public static long importLayoutsInBackground(java.lang.String taskName,
717                    long groupId, boolean privateLayout,
718                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
719                    java.io.File file)
720                    throws com.liferay.portal.kernel.exception.PortalException,
721                            com.liferay.portal.kernel.exception.SystemException {
722                    return getService()
723                                       .importLayoutsInBackground(taskName, groupId, privateLayout,
724                            parameterMap, file);
725            }
726    
727            public static long importLayoutsInBackground(java.lang.String taskName,
728                    long groupId, boolean privateLayout,
729                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
730                    java.io.InputStream inputStream)
731                    throws com.liferay.portal.kernel.exception.PortalException,
732                            com.liferay.portal.kernel.exception.SystemException {
733                    return getService()
734                                       .importLayoutsInBackground(taskName, groupId, privateLayout,
735                            parameterMap, inputStream);
736            }
737    
738            /**
739            * Imports the portlet information (categories, permissions, ... etc.) from
740            * the file.
741            *
742            * @param plid the primary key of the layout
743            * @param groupId the primary key of the group
744            * @param portletId the primary key of the portlet
745            * @param parameterMap the mapping of parameters indicating which
746            information will be imported. For information on the keys used in
747            the map see {@link
748            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}.
749            * @param file the LAR file with the data
750            * @throws PortalException if a group, layout, or portlet with the primary
751            key could not be found, or if the group did not have permission
752            to manage the layouts
753            * @throws SystemException if a system exception occurred
754            */
755            public static void importPortletInfo(long plid, long groupId,
756                    java.lang.String portletId,
757                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
758                    java.io.File file)
759                    throws com.liferay.portal.kernel.exception.PortalException,
760                            com.liferay.portal.kernel.exception.SystemException {
761                    getService()
762                            .importPortletInfo(plid, groupId, portletId, parameterMap, file);
763            }
764    
765            /**
766            * Imports the portlet information (categories, permissions, ... etc.) from
767            * the input stream.
768            *
769            * @param plid the primary key of the layout
770            * @param groupId the primary key of the group
771            * @param portletId the primary key of the portlet
772            * @param parameterMap the mapping of parameters indicating which
773            information will be imported. For information on the keys used in
774            the map see {@link
775            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}.
776            * @param is the input stream
777            * @throws PortalException if a group, portlet, or layout with the primary
778            key could not be found or if the group did not have permission to
779            manage the layouts
780            * @throws SystemException if a system exception occurred
781            */
782            public static void importPortletInfo(long plid, long groupId,
783                    java.lang.String portletId,
784                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
785                    java.io.InputStream is)
786                    throws com.liferay.portal.kernel.exception.PortalException,
787                            com.liferay.portal.kernel.exception.SystemException {
788                    getService()
789                            .importPortletInfo(plid, groupId, portletId, parameterMap, is);
790            }
791    
792            public static void importPortletInfo(java.lang.String portletId,
793                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
794                    java.io.File file)
795                    throws com.liferay.portal.kernel.exception.PortalException,
796                            com.liferay.portal.kernel.exception.SystemException {
797                    getService().importPortletInfo(portletId, parameterMap, file);
798            }
799    
800            public static void importPortletInfo(java.lang.String portletId,
801                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
802                    java.io.InputStream is)
803                    throws com.liferay.portal.kernel.exception.PortalException,
804                            com.liferay.portal.kernel.exception.SystemException {
805                    getService().importPortletInfo(portletId, parameterMap, is);
806            }
807    
808            public static long importPortletInfoInBackground(
809                    java.lang.String taskName, long plid, long groupId,
810                    java.lang.String portletId,
811                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
812                    java.io.File file)
813                    throws com.liferay.portal.kernel.exception.PortalException,
814                            com.liferay.portal.kernel.exception.SystemException {
815                    return getService()
816                                       .importPortletInfoInBackground(taskName, plid, groupId,
817                            portletId, parameterMap, file);
818            }
819    
820            public static long importPortletInfoInBackground(
821                    java.lang.String taskName, long plid, long groupId,
822                    java.lang.String portletId,
823                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
824                    java.io.InputStream is)
825                    throws com.liferay.portal.kernel.exception.PortalException,
826                            com.liferay.portal.kernel.exception.SystemException {
827                    return getService()
828                                       .importPortletInfoInBackground(taskName, plid, groupId,
829                            portletId, parameterMap, is);
830            }
831    
832            public static void importPortletInfoInBackground(
833                    java.lang.String taskName, java.lang.String portletId,
834                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
835                    java.io.File file)
836                    throws com.liferay.portal.kernel.exception.PortalException,
837                            com.liferay.portal.kernel.exception.SystemException {
838                    getService()
839                            .importPortletInfoInBackground(taskName, portletId, parameterMap,
840                            file);
841            }
842    
843            public static void importPortletInfoInBackground(
844                    java.lang.String taskName, java.lang.String portletId,
845                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
846                    java.io.InputStream is)
847                    throws com.liferay.portal.kernel.exception.PortalException,
848                            com.liferay.portal.kernel.exception.SystemException {
849                    getService()
850                            .importPortletInfoInBackground(taskName, portletId, parameterMap, is);
851            }
852    
853            /**
854            * Schedules a range of layouts to be published.
855            *
856            * @param sourceGroupId the primary key of the source group
857            * @param targetGroupId the primary key of the target group
858            * @param privateLayout whether the layout is private to the group
859            * @param layoutIdMap the layouts considered for publishing, specified by
860            the layout IDs and booleans indicating whether they have children
861            * @param parameterMap the mapping of parameters indicating which
862            information will be used. See {@link
863            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}
864            * @param scope the scope of the pages. It can be <code>all-pages</code> or
865            <code>selected-pages</code>.
866            * @param startDate the start date
867            * @param endDate the end date
868            * @param groupName the group name (optionally {@link
869            com.liferay.portal.kernel.messaging.DestinationNames#LAYOUTS_LOCAL_PUBLISHER}).
870            See {@link com.liferay.portal.kernel.messaging.DestinationNames}.
871            * @param cronText the cron text. See {@link
872            com.liferay.portal.kernel.cal.RecurrenceSerializer #toCronText}
873            * @param schedulerStartDate the scheduler start date
874            * @param schedulerEndDate the scheduler end date
875            * @param description the scheduler description
876            * @throws PortalException if the group did not have permission to manage
877            and publish
878            * @throws SystemException if a system exception occurred
879            */
880            public static void schedulePublishToLive(long sourceGroupId,
881                    long targetGroupId, boolean privateLayout,
882                    java.util.Map<java.lang.Long, java.lang.Boolean> layoutIdMap,
883                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
884                    java.lang.String scope, java.util.Date startDate,
885                    java.util.Date endDate, java.lang.String groupName,
886                    java.lang.String cronText, java.util.Date schedulerStartDate,
887                    java.util.Date schedulerEndDate, java.lang.String description)
888                    throws com.liferay.portal.kernel.exception.PortalException,
889                            com.liferay.portal.kernel.exception.SystemException {
890                    getService()
891                            .schedulePublishToLive(sourceGroupId, targetGroupId, privateLayout,
892                            layoutIdMap, parameterMap, scope, startDate, endDate, groupName,
893                            cronText, schedulerStartDate, schedulerEndDate, description);
894            }
895    
896            /**
897            * Schedules a range of layouts to be stored.
898            *
899            * @param sourceGroupId the primary key of the source group
900            * @param privateLayout whether the layout is private to the group
901            * @param layoutIdMap the layouts considered for publishing, specified by
902            the layout IDs and booleans indicating whether they have children
903            * @param parameterMap the mapping of parameters indicating which
904            information will be used. See {@link
905            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}
906            * @param remoteAddress the remote address
907            * @param remotePort the remote port
908            * @param remotePathContext the remote path context
909            * @param secureConnection whether the connection is secure
910            * @param remoteGroupId the primary key of the remote group
911            * @param remotePrivateLayout whether remote group's layout is private
912            * @param startDate the start date
913            * @param endDate the end date
914            * @param groupName the group name. Optionally {@link
915            com.liferay.portal.kernel.messaging.DestinationNames#LAYOUTS_LOCAL_PUBLISHER}).
916            See {@link com.liferay.portal.kernel.messaging.DestinationNames}.
917            * @param cronText the cron text. See {@link
918            com.liferay.portal.kernel.cal.RecurrenceSerializer #toCronText}
919            * @param schedulerStartDate the scheduler start date
920            * @param schedulerEndDate the scheduler end date
921            * @param description the scheduler description
922            * @throws PortalException if a group with the source group primary key was
923            not found or if the group did not have permission to publish
924            * @throws SystemException if a system exception occurred
925            */
926            public static void schedulePublishToRemote(long sourceGroupId,
927                    boolean privateLayout,
928                    java.util.Map<java.lang.Long, java.lang.Boolean> layoutIdMap,
929                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
930                    java.lang.String remoteAddress, int remotePort,
931                    java.lang.String remotePathContext, boolean secureConnection,
932                    long remoteGroupId, boolean remotePrivateLayout,
933                    java.util.Date startDate, java.util.Date endDate,
934                    java.lang.String groupName, java.lang.String cronText,
935                    java.util.Date schedulerStartDate, java.util.Date schedulerEndDate,
936                    java.lang.String description)
937                    throws com.liferay.portal.kernel.exception.PortalException,
938                            com.liferay.portal.kernel.exception.SystemException {
939                    getService()
940                            .schedulePublishToRemote(sourceGroupId, privateLayout, layoutIdMap,
941                            parameterMap, remoteAddress, remotePort, remotePathContext,
942                            secureConnection, remoteGroupId, remotePrivateLayout, startDate,
943                            endDate, groupName, cronText, schedulerStartDate, schedulerEndDate,
944                            description);
945            }
946    
947            /**
948            * Sets the layouts for the group, replacing and prioritizing all layouts of
949            * the parent layout.
950            *
951            * @param groupId the primary key of the group
952            * @param privateLayout whether the layout is private to the group
953            * @param parentLayoutId the primary key of the parent layout
954            * @param layoutIds the primary keys of the layouts
955            * @param serviceContext the service context to be applied
956            * @throws PortalException if a group or layout with the primary key could
957            not be found, if the group did not have permission to manage the
958            layouts, if no layouts were specified, if the first layout was
959            not page-able, if the first layout was hidden, or if some other
960            portal exception occurred
961            * @throws SystemException if a system exception occurred
962            */
963            public static void setLayouts(long groupId, boolean privateLayout,
964                    long parentLayoutId, long[] layoutIds,
965                    com.liferay.portal.service.ServiceContext serviceContext)
966                    throws com.liferay.portal.kernel.exception.PortalException,
967                            com.liferay.portal.kernel.exception.SystemException {
968                    getService()
969                            .setLayouts(groupId, privateLayout, parentLayoutId, layoutIds,
970                            serviceContext);
971            }
972    
973            /**
974            * Deletes the job from the scheduler's queue.
975            *
976            * @param groupId the primary key of the group
977            * @param jobName the job name
978            * @param groupName the group name (optionally {@link
979            com.liferay.portal.kernel.messaging.DestinationNames#LAYOUTS_LOCAL_PUBLISHER}).
980            See {@link com.liferay.portal.kernel.messaging.DestinationNames}.
981            * @throws PortalException if the group did not permission to manage staging
982            and publish
983            * @throws SystemException if a system exception occurred
984            */
985            public static void unschedulePublishToLive(long groupId,
986                    java.lang.String jobName, java.lang.String groupName)
987                    throws com.liferay.portal.kernel.exception.PortalException,
988                            com.liferay.portal.kernel.exception.SystemException {
989                    getService().unschedulePublishToLive(groupId, jobName, groupName);
990            }
991    
992            /**
993            * Deletes the job from the scheduler's persistent queue.
994            *
995            * @param groupId the primary key of the group
996            * @param jobName the job name
997            * @param groupName the group name (optionally {@link
998            com.liferay.portal.kernel.messaging.DestinationNames#LAYOUTS_LOCAL_PUBLISHER}).
999            See {@link com.liferay.portal.kernel.messaging.DestinationNames}.
1000            * @throws PortalException if a group with the primary key could not be
1001            found or if the group did not have permission to publish
1002            * @throws SystemException if a system exception occurred
1003            */
1004            public static void unschedulePublishToRemote(long groupId,
1005                    java.lang.String jobName, java.lang.String groupName)
1006                    throws com.liferay.portal.kernel.exception.PortalException,
1007                            com.liferay.portal.kernel.exception.SystemException {
1008                    getService().unschedulePublishToRemote(groupId, jobName, groupName);
1009            }
1010    
1011            /**
1012            * Updates the layout with additional parameters.
1013            *
1014            * @param groupId the primary key of the group
1015            * @param privateLayout whether the layout is private to the group
1016            * @param layoutId the primary key of the layout
1017            * @param parentLayoutId the primary key of the layout's new parent layout
1018            * @param localeNamesMap the layout's locales and localized names
1019            * @param localeTitlesMap the layout's locales and localized titles
1020            * @param descriptionMap the locales and localized descriptions to merge
1021            (optionally <code>null</code>)
1022            * @param keywordsMap the locales and localized keywords to merge
1023            (optionally <code>null</code>)
1024            * @param robotsMap the locales and localized robots to merge (optionally
1025            <code>null</code>)
1026            * @param type the layout's new type (optionally {@link
1027            com.liferay.portal.model.LayoutConstants#TYPE_PORTLET})
1028            * @param hidden whether the layout is hidden
1029            * @param friendlyURLMap the layout's locales and localized friendly URLs.
1030            To see how the URL is normalized when accessed see {@link
1031            com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize(
1032            String)}.
1033            * @param iconImage whether the icon image will be updated
1034            * @param iconBytes the byte array of the layout's new icon image
1035            * @param serviceContext the service context to be applied. Can set the
1036            modification date and expando bridge attributes for the layout.
1037            * @return the updated layout
1038            * @throws PortalException if a group or layout with the primary key could
1039            not be found, if the user did not have permission to update the
1040            layout, if a unique friendly URL could not be generated, if a
1041            valid parent layout ID to use could not be found, or if the
1042            layout parameters were invalid
1043            * @throws SystemException if a system exception occurred
1044            */
1045            public static com.liferay.portal.model.Layout updateLayout(long groupId,
1046                    boolean privateLayout, long layoutId, long parentLayoutId,
1047                    java.util.Map<java.util.Locale, java.lang.String> localeNamesMap,
1048                    java.util.Map<java.util.Locale, java.lang.String> localeTitlesMap,
1049                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
1050                    java.util.Map<java.util.Locale, java.lang.String> keywordsMap,
1051                    java.util.Map<java.util.Locale, java.lang.String> robotsMap,
1052                    java.lang.String type, boolean hidden,
1053                    java.util.Map<java.util.Locale, java.lang.String> friendlyURLMap,
1054                    java.lang.Boolean iconImage, byte[] iconBytes,
1055                    com.liferay.portal.service.ServiceContext serviceContext)
1056                    throws com.liferay.portal.kernel.exception.PortalException,
1057                            com.liferay.portal.kernel.exception.SystemException {
1058                    return getService()
1059                                       .updateLayout(groupId, privateLayout, layoutId,
1060                            parentLayoutId, localeNamesMap, localeTitlesMap, descriptionMap,
1061                            keywordsMap, robotsMap, type, hidden, friendlyURLMap, iconImage,
1062                            iconBytes, serviceContext);
1063            }
1064    
1065            /**
1066            * Updates the layout with additional parameters.
1067            *
1068            * @param groupId the primary key of the group
1069            * @param privateLayout whether the layout is private to the group
1070            * @param layoutId the primary key of the layout
1071            * @param parentLayoutId the primary key of the layout's new parent
1072            layout
1073            * @param localeNamesMap the layout's locales and localized names
1074            * @param localeTitlesMap the layout's locales and localized titles
1075            * @param descriptionMap the locales and localized descriptions to
1076            merge (optionally <code>null</code>)
1077            * @param keywordsMap the locales and localized keywords to merge
1078            (optionally <code>null</code>)
1079            * @param robotsMap the locales and localized robots to merge
1080            (optionally <code>null</code>)
1081            * @param type the layout's new type (optionally {@link
1082            com.liferay.portal.model.LayoutConstants#TYPE_PORTLET})
1083            * @param hidden whether the layout is hidden
1084            * @param friendlyURL the layout's locales and new friendly URLs. To
1085            see how the URL is normalized when accessed, see {@link
1086            com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize(
1087            String)}.
1088            * @param iconImage whether the icon image will be updated
1089            * @param iconBytes the byte array of the layout's new icon image
1090            * @param serviceContext the service context to be applied. Can set the
1091            modification date and expando bridge attributes for the
1092            layout.
1093            * @return the updated layout
1094            * @throws PortalException if a group or layout with the primary key
1095            could not be found, if the user did not have permission to
1096            update the layout, if a unique friendly URL could not be
1097            generated, if a valid parent layout ID to use could not be
1098            found, or if the layout parameters were invalid
1099            * @throws SystemException if a system exception occurred
1100            * @deprecated As of 6.2.0, replaced by {@link #updateLayout(long, boolean,
1101            long, long, Map, Map, Map, Map, Map, String, boolean, Map,
1102            Boolean, byte[], ServiceContext)}
1103            */
1104            public static com.liferay.portal.model.Layout updateLayout(long groupId,
1105                    boolean privateLayout, long layoutId, long parentLayoutId,
1106                    java.util.Map<java.util.Locale, java.lang.String> localeNamesMap,
1107                    java.util.Map<java.util.Locale, java.lang.String> localeTitlesMap,
1108                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
1109                    java.util.Map<java.util.Locale, java.lang.String> keywordsMap,
1110                    java.util.Map<java.util.Locale, java.lang.String> robotsMap,
1111                    java.lang.String type, boolean hidden, java.lang.String friendlyURL,
1112                    java.lang.Boolean iconImage, byte[] iconBytes,
1113                    com.liferay.portal.service.ServiceContext serviceContext)
1114                    throws com.liferay.portal.kernel.exception.PortalException,
1115                            com.liferay.portal.kernel.exception.SystemException {
1116                    return getService()
1117                                       .updateLayout(groupId, privateLayout, layoutId,
1118                            parentLayoutId, localeNamesMap, localeTitlesMap, descriptionMap,
1119                            keywordsMap, robotsMap, type, hidden, friendlyURL, iconImage,
1120                            iconBytes, serviceContext);
1121            }
1122    
1123            /**
1124            * Updates the layout replacing its type settings.
1125            *
1126            * @param groupId the primary key of the group
1127            * @param privateLayout whether the layout is private to the group
1128            * @param layoutId the primary key of the layout
1129            * @param typeSettings the settings to load the unicode properties object.
1130            See {@link com.liferay.portal.kernel.util.UnicodeProperties
1131            #fastLoad(String)}.
1132            * @return the updated layout
1133            * @throws PortalException if a matching layout could not be found or if the
1134            user did not have permission to update the layout
1135            * @throws SystemException if a system exception occurred
1136            */
1137            public static com.liferay.portal.model.Layout updateLayout(long groupId,
1138                    boolean privateLayout, long layoutId, java.lang.String typeSettings)
1139                    throws com.liferay.portal.kernel.exception.PortalException,
1140                            com.liferay.portal.kernel.exception.SystemException {
1141                    return getService()
1142                                       .updateLayout(groupId, privateLayout, layoutId, typeSettings);
1143            }
1144    
1145            /**
1146            * Updates the look and feel of the layout.
1147            *
1148            * @param groupId the primary key of the group
1149            * @param privateLayout whether the layout is private to the group
1150            * @param layoutId the primary key of the layout
1151            * @param themeId the primary key of the layout's new theme
1152            * @param colorSchemeId the primary key of the layout's new color scheme
1153            * @param css the layout's new CSS
1154            * @param wapTheme whether the theme is for WAP browsers
1155            * @return the updated layout
1156            * @throws PortalException if a matching layout could not be found, or if
1157            the user did not have permission to update the layout and
1158            permission to apply the theme
1159            * @throws SystemException if a system exception occurred
1160            */
1161            public static com.liferay.portal.model.Layout updateLookAndFeel(
1162                    long groupId, boolean privateLayout, long layoutId,
1163                    java.lang.String themeId, java.lang.String colorSchemeId,
1164                    java.lang.String css, boolean wapTheme)
1165                    throws com.liferay.portal.kernel.exception.PortalException,
1166                            com.liferay.portal.kernel.exception.SystemException {
1167                    return getService()
1168                                       .updateLookAndFeel(groupId, privateLayout, layoutId,
1169                            themeId, colorSchemeId, css, wapTheme);
1170            }
1171    
1172            /**
1173            * Updates the name of the layout matching the group, layout ID, and
1174            * privacy.
1175            *
1176            * @param groupId the primary key of the group
1177            * @param privateLayout whether the layout is private to the group
1178            * @param layoutId the primary key of the layout
1179            * @param name the layout's new name
1180            * @param languageId the primary key of the language. For more information
1181            see {@link java.util.Locale}.
1182            * @return the updated layout
1183            * @throws PortalException if a matching layout could not be found, if the
1184            user did not have permission to update the layout, or if the new
1185            name was <code>null</code>
1186            * @throws SystemException if a system exception occurred
1187            */
1188            public static com.liferay.portal.model.Layout updateName(long groupId,
1189                    boolean privateLayout, long layoutId, java.lang.String name,
1190                    java.lang.String languageId)
1191                    throws com.liferay.portal.kernel.exception.PortalException,
1192                            com.liferay.portal.kernel.exception.SystemException {
1193                    return getService()
1194                                       .updateName(groupId, privateLayout, layoutId, name,
1195                            languageId);
1196            }
1197    
1198            /**
1199            * Updates the name of the layout matching the primary key.
1200            *
1201            * @param plid the primary key of the layout
1202            * @param name the name to be assigned
1203            * @param languageId the primary key of the language. For more information
1204            see {@link java.util.Locale}.
1205            * @return the updated layout
1206            * @throws PortalException if a layout with the primary key could not be
1207            found, or if the user did not have permission to update the
1208            layout, or if the name was <code>null</code>
1209            * @throws SystemException if a system exception occurred
1210            */
1211            public static com.liferay.portal.model.Layout updateName(long plid,
1212                    java.lang.String name, java.lang.String languageId)
1213                    throws com.liferay.portal.kernel.exception.PortalException,
1214                            com.liferay.portal.kernel.exception.SystemException {
1215                    return getService().updateName(plid, name, languageId);
1216            }
1217    
1218            /**
1219            * Updates the parent layout ID of the layout matching the group, layout ID,
1220            * and privacy.
1221            *
1222            * @param groupId the primary key of the group
1223            * @param privateLayout whether the layout is private to the group
1224            * @param layoutId the primary key of the layout
1225            * @param parentLayoutId the primary key to be assigned to the parent
1226            layout
1227            * @return the matching layout
1228            * @throws PortalException if a valid parent layout ID to use could not be
1229            found, if a matching layout could not be found, or if the user
1230            did not have permission to update the layout
1231            * @throws SystemException if a system exception occurred
1232            */
1233            public static com.liferay.portal.model.Layout updateParentLayoutId(
1234                    long groupId, boolean privateLayout, long layoutId, long parentLayoutId)
1235                    throws com.liferay.portal.kernel.exception.PortalException,
1236                            com.liferay.portal.kernel.exception.SystemException {
1237                    return getService()
1238                                       .updateParentLayoutId(groupId, privateLayout, layoutId,
1239                            parentLayoutId);
1240            }
1241    
1242            /**
1243            * Updates the parent layout ID of the layout matching the primary key. If a
1244            * layout matching the parent primary key is found, the layout ID of that
1245            * layout is assigned, otherwise {@link
1246            * com.liferay.portal.model.LayoutConstants#DEFAULT_PARENT_LAYOUT_ID} is
1247            * assigned.
1248            *
1249            * @param plid the primary key of the layout
1250            * @param parentPlid the primary key of the parent layout
1251            * @return the layout matching the primary key
1252            * @throws PortalException if a layout with the primary key could not be
1253            found, if the user did not have permission to update the layout,
1254            or if a valid parent layout ID to use could not be found
1255            * @throws SystemException if a system exception occurred
1256            */
1257            public static com.liferay.portal.model.Layout updateParentLayoutId(
1258                    long plid, long parentPlid)
1259                    throws com.liferay.portal.kernel.exception.PortalException,
1260                            com.liferay.portal.kernel.exception.SystemException {
1261                    return getService().updateParentLayoutId(plid, parentPlid);
1262            }
1263    
1264            /**
1265            * Updates the priority of the layout matching the group, layout ID, and
1266            * privacy.
1267            *
1268            * @param groupId the primary key of the group
1269            * @param privateLayout whether the layout is private to the group
1270            * @param layoutId the primary key of the layout
1271            * @param priority the layout's new priority
1272            * @return the updated layout
1273            * @throws PortalException if a matching layout could not be found or if the
1274            user did not have permission to update the layout
1275            * @throws SystemException if a system exception occurred
1276            */
1277            public static com.liferay.portal.model.Layout updatePriority(long groupId,
1278                    boolean privateLayout, long layoutId, int priority)
1279                    throws com.liferay.portal.kernel.exception.PortalException,
1280                            com.liferay.portal.kernel.exception.SystemException {
1281                    return getService()
1282                                       .updatePriority(groupId, privateLayout, layoutId, priority);
1283            }
1284    
1285            /**
1286            * Updates the priority of the layout matching the group, layout ID, and
1287            * privacy, setting the layout's priority based on the priorities of the
1288            * next and previous layouts.
1289            *
1290            * @param groupId the primary key of the group
1291            * @param privateLayout whether the layout is private to the group
1292            * @param layoutId the primary key of the layout
1293            * @param nextLayoutId the primary key of the next layout
1294            * @param previousLayoutId the primary key of the previous layout
1295            * @return the updated layout
1296            * @throws PortalException if a matching layout could not be found or if the
1297            user did not have permission to update the layout
1298            * @throws SystemException if a system exception occurred
1299            */
1300            public static com.liferay.portal.model.Layout updatePriority(long groupId,
1301                    boolean privateLayout, long layoutId, long nextLayoutId,
1302                    long previousLayoutId)
1303                    throws com.liferay.portal.kernel.exception.PortalException,
1304                            com.liferay.portal.kernel.exception.SystemException {
1305                    return getService()
1306                                       .updatePriority(groupId, privateLayout, layoutId,
1307                            nextLayoutId, previousLayoutId);
1308            }
1309    
1310            /**
1311            * Updates the priority of the layout matching the primary key.
1312            *
1313            * @param plid the primary key of the layout
1314            * @param priority the layout's new priority
1315            * @return the updated layout
1316            * @throws PortalException if a layout with the primary key could not be
1317            found
1318            * @throws SystemException if a system exception occurred
1319            */
1320            public static com.liferay.portal.model.Layout updatePriority(long plid,
1321                    int priority)
1322                    throws com.liferay.portal.kernel.exception.PortalException,
1323                            com.liferay.portal.kernel.exception.SystemException {
1324                    return getService().updatePriority(plid, priority);
1325            }
1326    
1327            public static com.liferay.portal.kernel.lar.MissingReferences validateImportLayoutsFile(
1328                    long groupId, boolean privateLayout,
1329                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
1330                    java.io.File file)
1331                    throws com.liferay.portal.kernel.exception.PortalException,
1332                            com.liferay.portal.kernel.exception.SystemException {
1333                    return getService()
1334                                       .validateImportLayoutsFile(groupId, privateLayout,
1335                            parameterMap, file);
1336            }
1337    
1338            public static com.liferay.portal.kernel.lar.MissingReferences validateImportLayoutsFile(
1339                    long groupId, boolean privateLayout,
1340                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
1341                    java.io.InputStream inputStream)
1342                    throws com.liferay.portal.kernel.exception.PortalException,
1343                            com.liferay.portal.kernel.exception.SystemException {
1344                    return getService()
1345                                       .validateImportLayoutsFile(groupId, privateLayout,
1346                            parameterMap, inputStream);
1347            }
1348    
1349            public static com.liferay.portal.kernel.lar.MissingReferences validateImportPortletInfo(
1350                    long plid, long groupId, java.lang.String portletId,
1351                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
1352                    java.io.File file)
1353                    throws com.liferay.portal.kernel.exception.PortalException,
1354                            com.liferay.portal.kernel.exception.SystemException {
1355                    return getService()
1356                                       .validateImportPortletInfo(plid, groupId, portletId,
1357                            parameterMap, file);
1358            }
1359    
1360            public static com.liferay.portal.kernel.lar.MissingReferences validateImportPortletInfo(
1361                    long plid, long groupId, java.lang.String portletId,
1362                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
1363                    java.io.InputStream inputStream)
1364                    throws com.liferay.portal.kernel.exception.PortalException,
1365                            com.liferay.portal.kernel.exception.SystemException {
1366                    return getService()
1367                                       .validateImportPortletInfo(plid, groupId, portletId,
1368                            parameterMap, inputStream);
1369            }
1370    
1371            public static LayoutService getService() {
1372                    if (_service == null) {
1373                            _service = (LayoutService)PortalBeanLocatorUtil.locate(LayoutService.class.getName());
1374    
1375                            ReferenceRegistry.registerReference(LayoutServiceUtil.class,
1376                                    "_service");
1377                    }
1378    
1379                    return _service;
1380            }
1381    
1382            /**
1383             * @deprecated As of 6.2.0
1384             */
1385            public void setService(LayoutService service) {
1386            }
1387    
1388            private static LayoutService _service;
1389    }