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