001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service;
016    
017    import com.liferay.portal.kernel.exception.PortalException;
018    import com.liferay.portal.kernel.exception.SystemException;
019    import com.liferay.portal.kernel.jsonwebservice.JSONWebService;
020    import com.liferay.portal.kernel.transaction.Isolation;
021    import com.liferay.portal.kernel.transaction.Propagation;
022    import com.liferay.portal.kernel.transaction.Transactional;
023    import com.liferay.portal.security.ac.AccessControlled;
024    
025    /**
026     * The interface for the layout remote service.
027     *
028     * <p>
029     * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely.
030     * </p>
031     *
032     * @author Brian Wing Shun Chan
033     * @see LayoutServiceUtil
034     * @see com.liferay.portal.service.base.LayoutServiceBaseImpl
035     * @see com.liferay.portal.service.impl.LayoutServiceImpl
036     * @generated
037     */
038    @AccessControlled
039    @JSONWebService
040    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
041            PortalException.class, SystemException.class})
042    public interface LayoutService extends BaseService {
043            /*
044             * NOTE FOR DEVELOPERS:
045             *
046             * Never modify or reference this interface directly. Always use {@link LayoutServiceUtil} to access the layout remote service. Add custom service methods to {@link com.liferay.portal.service.impl.LayoutServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
047             */
048    
049            /**
050            * Returns the Spring bean ID for this bean.
051            *
052            * @return the Spring bean ID for this bean
053            */
054            public java.lang.String getBeanIdentifier();
055    
056            /**
057            * Sets the Spring bean ID for this bean.
058            *
059            * @param beanIdentifier the Spring bean ID for this bean
060            */
061            public void setBeanIdentifier(java.lang.String beanIdentifier);
062    
063            /**
064            * Adds a layout with additional parameters.
065            *
066            * <p>
067            * This method handles the creation of the layout including its resources,
068            * metadata, and internal data structures. It is not necessary to make
069            * subsequent calls to any methods to setup default groups, resources, ...
070            * etc.
071            * </p>
072            *
073            * @param groupId the primary key of the group
074            * @param privateLayout whether the layout is private to the group
075            * @param parentLayoutId the primary key of the parent layout (optionally
076            {@link
077            com.liferay.portal.model.LayoutConstants#DEFAULT_PARENT_LAYOUT_ID})
078            * @param localeNamesMap the layout's locales and localized names
079            * @param localeTitlesMap the layout's locales and localized titles
080            * @param descriptionMap the layout's locales and localized 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 friendly URL (optionally {@link
089            com.liferay.portal.util.PropsValues#DEFAULT_USER_PRIVATE_LAYOUT_FRIENDLY_URL}
090            or {@link
091            com.liferay.portal.util.PropsValues#DEFAULT_USER_PUBLIC_LAYOUT_FRIENDLY_URL}).
092            The default values can be overridden in
093            <code>portal-ext.properties</code> by specifying new values for
094            the corresponding properties defined in {@link
095            com.liferay.portal.util.PropsValues}. To see how the URL is
096            normalized when accessed see {@link
097            com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize(
098            String)}.
099            * @param serviceContext the service context. Must set the UUID for the
100            layout. Can set the creation date, modification date and the
101            expando bridge attributes for the layout. For layouts that belong
102            to a layout set prototype, an attribute named 'layoutUpdateable'
103            can be used to specify whether site administrators can modify
104            this page within their site.
105            * @return the layout
106            * @throws PortalException if a group with the primary key could not be
107            found, if the group did not have permission to manage the layouts
108            involved, or if layout values were invalid
109            * @throws SystemException if a system exception occurred
110            */
111            public com.liferay.portal.model.Layout addLayout(long groupId,
112                    boolean privateLayout, long parentLayoutId,
113                    java.util.Map<java.util.Locale, java.lang.String> localeNamesMap,
114                    java.util.Map<java.util.Locale, java.lang.String> localeTitlesMap,
115                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
116                    java.util.Map<java.util.Locale, java.lang.String> keywordsMap,
117                    java.util.Map<java.util.Locale, java.lang.String> robotsMap,
118                    java.lang.String type, boolean hidden, java.lang.String friendlyURL,
119                    com.liferay.portal.service.ServiceContext serviceContext)
120                    throws com.liferay.portal.kernel.exception.PortalException,
121                            com.liferay.portal.kernel.exception.SystemException;
122    
123            /**
124            * Adds a layout with single entry maps for name, title, and description to
125            * the default locale.
126            *
127            * <p>
128            * This method handles the creation of the layout including its resources,
129            * metadata, and internal data structures. It is not necessary to make
130            * subsequent calls to any methods to setup default groups, resources, ...
131            * etc.
132            * </p>
133            *
134            * @param groupId the primary key of the group
135            * @param privateLayout whether the layout is private to the group
136            * @param parentLayoutId the primary key of the parent layout (optionally
137            {@link
138            com.liferay.portal.model.LayoutConstants#DEFAULT_PARENT_LAYOUT_ID})
139            * @param name Map the layout's locales and localized names
140            * @param title Map the layout's locales and localized titles
141            * @param description Map the layout's locales and localized descriptions
142            * @param type the layout's type (optionally {@link
143            com.liferay.portal.model.LayoutConstants#TYPE_PORTLET}). The
144            possible types can be found in {@link
145            com.liferay.portal.model.LayoutConstants}.
146            * @param hidden whether the layout is hidden
147            * @param friendlyURL the layout's friendly URL (optionally {@link
148            com.liferay.portal.util.PropsValues#DEFAULT_USER_PRIVATE_LAYOUT_FRIENDLY_URL}
149            or {@link
150            com.liferay.portal.util.PropsValues#DEFAULT_USER_PUBLIC_LAYOUT_FRIENDLY_URL}).
151            The default values can be overridden in
152            <code>portal-ext.properties</code> by specifying new values for
153            the corresponding properties defined in {@link
154            com.liferay.portal.util.PropsValues}. To see how the URL is
155            normalized when accessed see {@link
156            com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize(
157            String)}.
158            * @param serviceContext the service context. Must set the UUID for the
159            layout. Can specify the creation date, modification date and the
160            expando bridge attributes for the layout. For layouts that belong
161            to a layout set prototype, an attribute named 'layoutUpdateable'
162            can be used to specify whether site administrators can modify
163            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, or if layout values were invalid
168            * @throws SystemException if a system exception occurred
169            */
170            public com.liferay.portal.model.Layout addLayout(long groupId,
171                    boolean privateLayout, long parentLayoutId, java.lang.String name,
172                    java.lang.String title, java.lang.String description,
173                    java.lang.String type, boolean hidden, java.lang.String friendlyURL,
174                    com.liferay.portal.service.ServiceContext serviceContext)
175                    throws com.liferay.portal.kernel.exception.PortalException,
176                            com.liferay.portal.kernel.exception.SystemException;
177    
178            /**
179            * Deletes the layout with the primary key, also deleting the layout's child
180            * layouts, and associated resources.
181            *
182            * @param groupId the primary key of the group
183            * @param privateLayout whether the layout is private to the group
184            * @param layoutId the primary key of the layout
185            * @param serviceContext the service context
186            * @throws PortalException if the user did not have permission to delete the
187            layout, if a matching layout could not be found , or if some
188            other portal exception occurred
189            * @throws SystemException if a system exception occurred
190            */
191            public void deleteLayout(long groupId, boolean privateLayout,
192                    long layoutId, com.liferay.portal.service.ServiceContext serviceContext)
193                    throws com.liferay.portal.kernel.exception.PortalException,
194                            com.liferay.portal.kernel.exception.SystemException;
195    
196            /**
197            * Deletes the layout with the plid, also deleting the layout's child
198            * layouts, and associated resources.
199            *
200            * @param plid the primary key of the layout
201            * @param serviceContext the service context
202            * @throws PortalException if the user did not have permission to delete the
203            layout, if a layout with the primary key could not be found , or
204            if some other portal exception occurred
205            * @throws SystemException if a system exception occurred
206            */
207            public void deleteLayout(long plid,
208                    com.liferay.portal.service.ServiceContext serviceContext)
209                    throws com.liferay.portal.kernel.exception.PortalException,
210                            com.liferay.portal.kernel.exception.SystemException;
211    
212            /**
213            * Exports the layouts that match the primary keys and the criteria as a
214            * byte array.
215            *
216            * @param groupId the primary key of the group
217            * @param privateLayout whether the layout is private to the group
218            * @param layoutIds the primary keys of the layouts to be exported
219            * @param parameterMap the mapping of parameters indicating which
220            information to export. For information on the keys used in the
221            map see {@link
222            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}.
223            * @param startDate the export's start date
224            * @param endDate the export's end date
225            * @return the layouts as a byte array
226            * @throws PortalException if a group or any layout with the primary key
227            could not be found, if the group did not have permission to
228            manage the layouts, or if some other portal exception occurred
229            * @throws SystemException if a system exception occurred
230            */
231            public byte[] exportLayouts(long groupId, boolean privateLayout,
232                    long[] layoutIds,
233                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
234                    java.util.Date startDate, java.util.Date endDate)
235                    throws com.liferay.portal.kernel.exception.PortalException,
236                            com.liferay.portal.kernel.exception.SystemException;
237    
238            /**
239            * Exports all layouts that match the criteria as a byte array.
240            *
241            * @param groupId the primary key of the group
242            * @param privateLayout whether the layout is private to the group
243            * @param parameterMap the mapping of parameters indicating which
244            information to export. For information on the keys used in the
245            map see {@link
246            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}.
247            * @param startDate the export's start date
248            * @param endDate the export's end date
249            * @return the layout as a byte array
250            * @throws PortalException if a group with the primary key could not be
251            found, if the group did not have permission to manage the
252            layouts, or if some other portal exception occurred
253            * @throws SystemException if a system exception occurred
254            */
255            public byte[] exportLayouts(long groupId, boolean privateLayout,
256                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
257                    java.util.Date startDate, java.util.Date endDate)
258                    throws com.liferay.portal.kernel.exception.PortalException,
259                            com.liferay.portal.kernel.exception.SystemException;
260    
261            /**
262            * Exports all layouts that match the primary keys and criteria as a file.
263            *
264            * @param groupId the primary key of the group
265            * @param privateLayout whether the layout is private to the group
266            * @param layoutIds the primary keys of the layouts to be exported
267            (optionally <code>null</code>)
268            * @param parameterMap the mapping of parameters indicating which
269            information to export. For information on the keys used in the
270            map see {@link
271            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}.
272            * @param startDate the export's start date
273            * @param endDate the export's end date
274            * @return the layouts as a File
275            * @throws PortalException if a group or any layout with the primary key
276            could not be found, it the group did not have permission to
277            manage the layouts, or if some other portal exception occurred
278            * @throws SystemException if a system exception occurred
279            */
280            public java.io.File exportLayoutsAsFile(long groupId,
281                    boolean privateLayout, long[] layoutIds,
282                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
283                    java.util.Date startDate, java.util.Date endDate)
284                    throws com.liferay.portal.kernel.exception.PortalException,
285                            com.liferay.portal.kernel.exception.SystemException;
286    
287            /**
288            * Exports the portlet information (categories, permissions, ... etc.) as a
289            * byte array.
290            *
291            * @param plid the primary key of the layout
292            * @param groupId the primary key of the group
293            * @param portletId the primary key of the portlet
294            * @param parameterMap the mapping of parameters indicating which
295            information to export. For information on the keys used in the
296            map see {@link
297            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}.
298            * @param startDate the export's start date
299            * @param endDate the export's end date
300            * @return the portlet information as a byte array
301            * @throws PortalException if a layout, group, or portlet with the primary
302            key could not be found, if the group did not have permission to
303            manage the layouts involved, or if some other portal exception
304            occurred
305            * @throws SystemException if a system exception occurred
306            */
307            public byte[] exportPortletInfo(long plid, long groupId,
308                    java.lang.String portletId,
309                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
310                    java.util.Date startDate, java.util.Date endDate)
311                    throws com.liferay.portal.kernel.exception.PortalException,
312                            com.liferay.portal.kernel.exception.SystemException;
313    
314            /**
315            * Exports the portlet information (categories, permissions, ... etc.) as a
316            * file.
317            *
318            * @param plid the primary key of the layout
319            * @param groupId the primary key of the group
320            * @param portletId the primary key of the portlet
321            * @param parameterMap the mapping of parameters indicating which
322            information to export. For information on the keys used in the
323            map see {@link
324            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}.
325            * @param startDate the export's start date
326            * @param endDate the export's end date
327            * @return the portlet information as a file
328            * @throws PortalException if a layout, group, or portlet with the primary
329            key could not be found, it the group did not have permission to
330            manage the layouts involved, or if some other portal exception
331            occurred
332            * @throws SystemException if a system exception occurred
333            */
334            public java.io.File exportPortletInfoAsFile(long plid, long groupId,
335                    java.lang.String portletId,
336                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
337                    java.util.Date startDate, java.util.Date endDate)
338                    throws com.liferay.portal.kernel.exception.PortalException,
339                            com.liferay.portal.kernel.exception.SystemException;
340    
341            /**
342            * Returns all the ancestor layouts of the layout.
343            *
344            * @param plid the primary key of the layout
345            * @return the ancestor layouts of the layout
346            * @throws PortalException if a matching layout could not be found or if a
347            portal exception occurred
348            * @throws SystemException if a system exception occurred
349            */
350            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
351            public java.util.List<com.liferay.portal.model.Layout> getAncestorLayouts(
352                    long plid)
353                    throws com.liferay.portal.kernel.exception.PortalException,
354                            com.liferay.portal.kernel.exception.SystemException;
355    
356            /**
357            * Returns the primary key of the default layout for the group.
358            *
359            * @param groupId the primary key of the group
360            * @param scopeGroupId the primary key of the scope group. See {@link
361            com.liferay.portal.service.ServiceContext#getScopeGroupId()}.
362            * @param privateLayout whether the layout is private to the group
363            * @param portletId the primary key of the portlet
364            * @return Returns the primary key of the default layout group; {@link
365            com.liferay.portal.model.LayoutConstants#DEFAULT_PLID} otherwise
366            * @throws PortalException if a group, layout, or portlet with the primary
367            key could not be found
368            * @throws SystemException if a system exception occurred
369            */
370            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
371            public long getDefaultPlid(long groupId, long scopeGroupId,
372                    boolean privateLayout, java.lang.String portletId)
373                    throws com.liferay.portal.kernel.exception.PortalException,
374                            com.liferay.portal.kernel.exception.SystemException;
375    
376            /**
377            * @param uuid the layout's UUID
378            * @param groupId the primary key of the group
379            * @param privateLayout whether the layout is private to the group
380            * @return the matching layout
381            * @throws PortalException if a matching layout could not be found, if the
382            user did not have permission to view the layout, or if some other
383            portal exception occurred
384            * @throws SystemException if a system exception occurred
385            */
386            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
387            public com.liferay.portal.model.Layout getLayoutByUuidAndGroupId(
388                    java.lang.String uuid, long groupId, boolean privateLayout)
389                    throws com.liferay.portal.kernel.exception.PortalException,
390                            com.liferay.portal.kernel.exception.SystemException;
391    
392            /**
393            * Returns the name of the layout.
394            *
395            * @param groupId the primary key of the group
396            * @param privateLayout whether the layout is private to the group
397            * @param layoutId the primary key of the layout
398            * @param languageId the primary key of the language. For more information
399            See {@link java.util.Locale}.
400            * @return the layout's name
401            * @throws PortalException if a matching layout could not be found
402            * @throws SystemException if a system exception occurred
403            */
404            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
405            public java.lang.String getLayoutName(long groupId, boolean privateLayout,
406                    long layoutId, java.lang.String languageId)
407                    throws com.liferay.portal.kernel.exception.PortalException,
408                            com.liferay.portal.kernel.exception.SystemException;
409    
410            /**
411            * Returns the layout references for all the layouts that belong to the
412            * company and belong to the portlet that matches the preferences.
413            *
414            * @param companyId the primary key of the company
415            * @param portletId the primary key of the portlet
416            * @param preferencesKey the portlet's preference key
417            * @param preferencesValue the portlet's preference value
418            * @return the layout references of the matching layouts
419            * @throws SystemException if a system exception occurred
420            */
421            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
422            public com.liferay.portal.model.LayoutReference[] getLayoutReferences(
423                    long companyId, java.lang.String portletId,
424                    java.lang.String preferencesKey, java.lang.String preferencesValue)
425                    throws com.liferay.portal.kernel.exception.SystemException;
426    
427            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
428            public java.util.List<com.liferay.portal.model.Layout> getLayouts(
429                    long groupId, boolean privateLayout)
430                    throws com.liferay.portal.kernel.exception.SystemException;
431    
432            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
433            public java.util.List<com.liferay.portal.model.Layout> getLayouts(
434                    long groupId, boolean privateLayout, long parentLayoutId)
435                    throws com.liferay.portal.kernel.exception.SystemException;
436    
437            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
438            public java.util.List<com.liferay.portal.model.Layout> getLayouts(
439                    long groupId, boolean privateLayout, long parentLayoutId,
440                    boolean incomplete, int start, int end)
441                    throws com.liferay.portal.kernel.exception.PortalException,
442                            com.liferay.portal.kernel.exception.SystemException;
443    
444            /**
445            * Imports the layouts from the byte array.
446            *
447            * @param groupId the primary key of the group
448            * @param privateLayout whether the layout is private to the group
449            * @param parameterMap the mapping of parameters indicating which
450            information will be imported. For information on the keys used in
451            the map see {@link
452            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}.
453            * @param bytes the byte array with the data
454            * @throws PortalException if a group with the primary key could not be
455            found, if the group did not have permission to manage the
456            layouts, or if some other portal exception occurred
457            * @throws SystemException if a system exception occurred
458            * @see com.liferay.portal.lar.LayoutImporter
459            */
460            public void importLayouts(long groupId, boolean privateLayout,
461                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
462                    byte[] bytes)
463                    throws com.liferay.portal.kernel.exception.PortalException,
464                            com.liferay.portal.kernel.exception.SystemException;
465    
466            /**
467            * Imports the layouts from the file.
468            *
469            * @param groupId the primary key of the group
470            * @param privateLayout whether the layout is private to the group
471            * @param parameterMap the mapping of parameters indicating which
472            information will be imported. For information on the keys used in
473            the map see {@link
474            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}.
475            * @param file the LAR file with the data
476            * @throws PortalException if a group with the primary key could not be
477            found, if the group did not have permission to manage the layouts
478            and publish, or if some other portal exception occurred
479            * @throws SystemException if a system exception occurred
480            * @see com.liferay.portal.lar.LayoutImporter
481            */
482            public void importLayouts(long groupId, boolean privateLayout,
483                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
484                    java.io.File file)
485                    throws com.liferay.portal.kernel.exception.PortalException,
486                            com.liferay.portal.kernel.exception.SystemException;
487    
488            /**
489            * Imports the layouts from the input stream.
490            *
491            * @param groupId the primary key of the group
492            * @param privateLayout whether the layout is private to the group
493            * @param parameterMap the mapping of parameters indicating which
494            information will be imported. For information on the keys used in
495            the map see {@link
496            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}.
497            * @param is the input stream
498            * @throws PortalException if a group with the primary key could not be
499            found, if the group did not have permission to manage the
500            layouts, or if some other portal exception occurred
501            * @throws SystemException if a system exception occurred
502            * @see com.liferay.portal.lar.LayoutImporter
503            */
504            public void importLayouts(long groupId, boolean privateLayout,
505                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
506                    java.io.InputStream is)
507                    throws com.liferay.portal.kernel.exception.PortalException,
508                            com.liferay.portal.kernel.exception.SystemException;
509    
510            /**
511            * Imports the portlet information (categories, permissions, ... etc.) from
512            * the file.
513            *
514            * @param plid the primary key of the layout
515            * @param groupId the primary key of the group
516            * @param portletId the primary key of the portlet
517            * @param parameterMap the mapping of parameters indicating which
518            information will be imported. For information on the keys used in
519            the map see {@link
520            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}.
521            * @param file the LAR file with the data
522            * @throws PortalException if a group, layout, or portlet with the primary
523            key could not be found, or if the group did not have permission
524            to manage the layouts
525            * @throws SystemException if a system exception occurred
526            */
527            public void importPortletInfo(long plid, long groupId,
528                    java.lang.String portletId,
529                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
530                    java.io.File file)
531                    throws com.liferay.portal.kernel.exception.PortalException,
532                            com.liferay.portal.kernel.exception.SystemException;
533    
534            /**
535            * Imports the portlet information (categories, permissions, ... etc.) from
536            * the input stream.
537            *
538            * @param plid the primary key of the layout
539            * @param groupId the primary key of the group
540            * @param portletId the primary key of the portlet
541            * @param parameterMap the mapping of parameters indicating which
542            information will be imported. For information on the keys used in
543            the map see {@link
544            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}.
545            * @param is the input stream
546            * @throws PortalException if a group, portlet, or layout with the primary
547            key could not be found or if the group did not have permission to
548            manage the layouts
549            * @throws SystemException if a system exception occurred
550            */
551            public void importPortletInfo(long plid, long groupId,
552                    java.lang.String portletId,
553                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
554                    java.io.InputStream is)
555                    throws com.liferay.portal.kernel.exception.PortalException,
556                            com.liferay.portal.kernel.exception.SystemException;
557    
558            /**
559            * Schedules a range of layouts to be published.
560            *
561            * @param sourceGroupId the primary key of the source group
562            * @param targetGroupId the primary key of the target group
563            * @param privateLayout whether the layout is private to the group
564            * @param layoutIdMap the layouts considered for publishing, specified by
565            the layout IDs and booleans indicating whether they have children
566            * @param parameterMap the mapping of parameters indicating which
567            information will be used. See {@link
568            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}
569            * @param scope the scope of the pages. It can be <code>all-pages</code> or
570            <code>selected-pages</code>.
571            * @param startDate the start date
572            * @param endDate the end date
573            * @param groupName the group name (optionally {@link
574            com.liferay.portal.kernel.messaging.DestinationNames#LAYOUTS_LOCAL_PUBLISHER}).
575            See {@link com.liferay.portal.kernel.messaging.DestinationNames}.
576            * @param cronText the cron text. See {@link
577            com.liferay.portal.kernel.cal.RecurrenceSerializer #toCronText}
578            * @param schedulerStartDate the scheduler start date
579            * @param schedulerEndDate the scheduler end date
580            * @param description the scheduler description
581            * @throws PortalException if the group did not have permission to manage
582            and publish
583            * @throws SystemException if a system exception occurred
584            */
585            public void schedulePublishToLive(long sourceGroupId, long targetGroupId,
586                    boolean privateLayout,
587                    java.util.Map<java.lang.Long, java.lang.Boolean> layoutIdMap,
588                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
589                    java.lang.String scope, java.util.Date startDate,
590                    java.util.Date endDate, java.lang.String groupName,
591                    java.lang.String cronText, java.util.Date schedulerStartDate,
592                    java.util.Date schedulerEndDate, java.lang.String description)
593                    throws com.liferay.portal.kernel.exception.PortalException,
594                            com.liferay.portal.kernel.exception.SystemException;
595    
596            /**
597            * Schedules a range of layouts to be stored.
598            *
599            * @param sourceGroupId the primary key of the source group
600            * @param privateLayout whether the layout is private to the group
601            * @param layoutIdMap the layouts considered for publishing, specified by
602            the layout IDs and booleans indicating whether they have children
603            * @param parameterMap the mapping of parameters indicating which
604            information will be used. See {@link
605            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}
606            * @param remoteAddress the remote address
607            * @param remotePort the remote port
608            * @param remotePathContext the remote path context
609            * @param secureConnection whether the connection is secure
610            * @param remoteGroupId the primary key of the remote group
611            * @param remotePrivateLayout whether remote group's layout is private
612            * @param startDate the start date
613            * @param endDate the end date
614            * @param groupName the group name. Optionally {@link
615            com.liferay.portal.kernel.messaging.DestinationNames#LAYOUTS_LOCAL_PUBLISHER}).
616            See {@link com.liferay.portal.kernel.messaging.DestinationNames}.
617            * @param cronText the cron text. See {@link
618            com.liferay.portal.kernel.cal.RecurrenceSerializer #toCronText}
619            * @param schedulerStartDate the scheduler start date
620            * @param schedulerEndDate the scheduler end date
621            * @param description the scheduler description
622            * @throws PortalException if a group with the source group primary key was
623            not found or if the group did not have permission to publish
624            * @throws SystemException if a system exception occurred
625            */
626            public void schedulePublishToRemote(long sourceGroupId,
627                    boolean privateLayout,
628                    java.util.Map<java.lang.Long, java.lang.Boolean> layoutIdMap,
629                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
630                    java.lang.String remoteAddress, int remotePort,
631                    java.lang.String remotePathContext, boolean secureConnection,
632                    long remoteGroupId, boolean remotePrivateLayout,
633                    java.util.Date startDate, java.util.Date endDate,
634                    java.lang.String groupName, java.lang.String cronText,
635                    java.util.Date schedulerStartDate, java.util.Date schedulerEndDate,
636                    java.lang.String description)
637                    throws com.liferay.portal.kernel.exception.PortalException,
638                            com.liferay.portal.kernel.exception.SystemException;
639    
640            /**
641            * Sets the layouts for the group, replacing and prioritizing all layouts of
642            * the parent layout.
643            *
644            * @param groupId the primary key of the group
645            * @param privateLayout whether the layout is private to the group
646            * @param parentLayoutId the primary key of the parent layout
647            * @param layoutIds the primary keys of the layouts
648            * @param serviceContext the service context
649            * @throws PortalException if a group or layout with the primary key could
650            not be found, if the group did not have permission to manage the
651            layouts, if no layouts were specified, if the first layout was
652            not page-able, if the first layout was hidden, or if some other
653            portal exception occurred
654            * @throws SystemException if a system exception occurred
655            */
656            public void setLayouts(long groupId, boolean privateLayout,
657                    long parentLayoutId, long[] layoutIds,
658                    com.liferay.portal.service.ServiceContext serviceContext)
659                    throws com.liferay.portal.kernel.exception.PortalException,
660                            com.liferay.portal.kernel.exception.SystemException;
661    
662            /**
663            * Deletes the job from the scheduler's queue.
664            *
665            * @param groupId the primary key of the group
666            * @param jobName the job name
667            * @param groupName the group name (optionally {@link
668            com.liferay.portal.kernel.messaging.DestinationNames#LAYOUTS_LOCAL_PUBLISHER}).
669            See {@link com.liferay.portal.kernel.messaging.DestinationNames}.
670            * @throws PortalException if the group did not permission to manage staging
671            and publish
672            * @throws SystemException if a system exception occurred
673            */
674            public void unschedulePublishToLive(long groupId, java.lang.String jobName,
675                    java.lang.String groupName)
676                    throws com.liferay.portal.kernel.exception.PortalException,
677                            com.liferay.portal.kernel.exception.SystemException;
678    
679            /**
680            * Deletes the job from the scheduler's persistent queue.
681            *
682            * @param groupId the primary key of the group
683            * @param jobName the job name
684            * @param groupName the group name (optionally {@link
685            com.liferay.portal.kernel.messaging.DestinationNames#LAYOUTS_LOCAL_PUBLISHER}).
686            See {@link com.liferay.portal.kernel.messaging.DestinationNames}.
687            * @throws PortalException if a group with the primary key could not be
688            found or if the group did not have permission to publish
689            * @throws SystemException if a system exception occurred
690            */
691            public void unschedulePublishToRemote(long groupId,
692                    java.lang.String jobName, java.lang.String groupName)
693                    throws com.liferay.portal.kernel.exception.PortalException,
694                            com.liferay.portal.kernel.exception.SystemException;
695    
696            /**
697            * Updates the layout.
698            *
699            * @param groupId the primary key of the group
700            * @param privateLayout whether the layout is private to the group
701            * @param layoutId the primary key of the layout
702            * @param parentLayoutId the primary key of the layout's new parent layout
703            * @param localeNamesMap the layout's locales and localized names
704            * @param localeTitlesMap the layout's locales and localized titles
705            * @param descriptionMap the locales and localized descriptions to merge
706            (optionally <code>null</code>)
707            * @param keywordsMap the locales and localized keywords to merge
708            (optionally <code>null</code>)
709            * @param robotsMap the locales and localized robots to merge (optionally
710            <code>null</code>)
711            * @param type the layout's new type (optionally {@link
712            com.liferay.portal.model.LayoutConstants#TYPE_PORTLET})
713            * @param hidden whether the layout is hidden
714            * @param friendlyURL the layout's new friendly URL (optionally {@link
715            com.liferay.portal.util.PropsValues#DEFAULT_USER_PRIVATE_LAYOUT_FRIENDLY_URL}
716            or {@link
717            com.liferay.portal.util.PropsValues#DEFAULT_USER_PRIVATE_LAYOUT_FRIENDLY_URL}).
718            The default values can be overridden in
719            <code>portal-ext.properties</code> by specifying new values for
720            the corresponding properties defined in {@link
721            com.liferay.portal.util.PropsValues}. To see how the URL is
722            normalized when accessed see {@link
723            com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize(
724            String)}.
725            * @param iconImage whether the icon image will be updated
726            * @param iconBytes the byte array of the layout's new icon image
727            * @param serviceContext the service context. Can set the modification date
728            and expando bridge attributes for the layout.
729            * @return the updated layout
730            * @throws PortalException if a group or layout with the primary key could
731            not be found, if the user did not have permission to update the
732            layout, if a unique friendly URL could not be generated, if a
733            valid parent layout ID to use could not be found, or if the
734            layout parameters were invalid
735            * @throws SystemException if a system exception occurred
736            */
737            public com.liferay.portal.model.Layout updateLayout(long groupId,
738                    boolean privateLayout, long layoutId, long parentLayoutId,
739                    java.util.Map<java.util.Locale, java.lang.String> localeNamesMap,
740                    java.util.Map<java.util.Locale, java.lang.String> localeTitlesMap,
741                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
742                    java.util.Map<java.util.Locale, java.lang.String> keywordsMap,
743                    java.util.Map<java.util.Locale, java.lang.String> robotsMap,
744                    java.lang.String type, boolean hidden, java.lang.String friendlyURL,
745                    java.lang.Boolean iconImage, byte[] iconBytes,
746                    com.liferay.portal.service.ServiceContext serviceContext)
747                    throws com.liferay.portal.kernel.exception.PortalException,
748                            com.liferay.portal.kernel.exception.SystemException;
749    
750            /**
751            * Updates the layout replacing its type settings.
752            *
753            * @param groupId the primary key of the group
754            * @param privateLayout whether the layout is private to the group
755            * @param layoutId the primary key of the layout
756            * @param typeSettings the settings to load the unicode properties object.
757            See {@link com.liferay.portal.kernel.util.UnicodeProperties
758            #fastLoad(String)}.
759            * @return the updated layout
760            * @throws PortalException if a matching layout could not be found or if the
761            user did not have permission to update the layout
762            * @throws SystemException if a system exception occurred
763            */
764            public com.liferay.portal.model.Layout updateLayout(long groupId,
765                    boolean privateLayout, long layoutId, java.lang.String typeSettings)
766                    throws com.liferay.portal.kernel.exception.PortalException,
767                            com.liferay.portal.kernel.exception.SystemException;
768    
769            /**
770            * Updates the look and feel of the layout.
771            *
772            * @param groupId the primary key of the group
773            * @param privateLayout whether the layout is private to the group
774            * @param layoutId the primary key of the layout
775            * @param themeId the primary key of the layout's new theme
776            * @param colorSchemeId the primary key of the layout's new color scheme
777            * @param css the layout's new CSS
778            * @param wapTheme whether the theme is for WAP browsers
779            * @return the updated layout
780            * @throws PortalException if a matching layout could not be found, or if
781            the user did not have permission to update the layout and
782            permission to apply the theme
783            * @throws SystemException if a system exception occurred
784            */
785            public com.liferay.portal.model.Layout updateLookAndFeel(long groupId,
786                    boolean privateLayout, long layoutId, java.lang.String themeId,
787                    java.lang.String colorSchemeId, java.lang.String css, boolean wapTheme)
788                    throws com.liferay.portal.kernel.exception.PortalException,
789                            com.liferay.portal.kernel.exception.SystemException;
790    
791            /**
792            * Updates the name of the layout matching the group, layout ID, and
793            * privacy.
794            *
795            * @param groupId the primary key of the group
796            * @param privateLayout whether the layout is private to the group
797            * @param layoutId the primary key of the layout
798            * @param name the layout's new name
799            * @param languageId the primary key of the language. For more information
800            see {@link java.util.Locale}.
801            * @return the updated layout
802            * @throws PortalException if a matching layout could not be found, if the
803            user did not have permission to update the layout, or if the new
804            name was <code>null</code>
805            * @throws SystemException if a system exception occurred
806            */
807            public com.liferay.portal.model.Layout updateName(long groupId,
808                    boolean privateLayout, long layoutId, java.lang.String name,
809                    java.lang.String languageId)
810                    throws com.liferay.portal.kernel.exception.PortalException,
811                            com.liferay.portal.kernel.exception.SystemException;
812    
813            /**
814            * Updates the name of the layout matching the primary key.
815            *
816            * @param plid the primary key of the layout
817            * @param name the name to be assigned
818            * @param languageId the primary key of the language. For more information
819            see {@link java.util.Locale}.
820            * @return the updated layout
821            * @throws PortalException if a layout with the primary key could not be
822            found, or if the user did not have permission to update the
823            layout, or if the name was <code>null</code>
824            * @throws SystemException if a system exception occurred
825            */
826            public com.liferay.portal.model.Layout updateName(long plid,
827                    java.lang.String name, java.lang.String languageId)
828                    throws com.liferay.portal.kernel.exception.PortalException,
829                            com.liferay.portal.kernel.exception.SystemException;
830    
831            /**
832            * Updates the parent layout ID of the layout matching the group, layout ID,
833            * and privacy.
834            *
835            * @param groupId the primary key of the group
836            * @param privateLayout whether the layout is private to the group
837            * @param layoutId the primary key of the layout
838            * @param parentLayoutId the primary key to be assigned to the parent
839            layout
840            * @return the matching layout
841            * @throws PortalException if a valid parent layout ID to use could not be
842            found, if a matching layout could not be found, or if the user
843            did not have permission to update the layout
844            * @throws SystemException if a system exception occurred
845            */
846            public com.liferay.portal.model.Layout updateParentLayoutId(long groupId,
847                    boolean privateLayout, long layoutId, long parentLayoutId)
848                    throws com.liferay.portal.kernel.exception.PortalException,
849                            com.liferay.portal.kernel.exception.SystemException;
850    
851            /**
852            * Updates the parent layout ID of the layout matching the primary key. If a
853            * layout matching the parent primary key is found, the layout ID of that
854            * layout is assigned, otherwise {@link
855            * com.liferay.portal.model.LayoutConstants#DEFAULT_PARENT_LAYOUT_ID} is
856            * assigned.
857            *
858            * @param plid the primary key of the layout
859            * @param parentPlid the primary key of the parent layout
860            * @return the layout matching the primary key
861            * @throws PortalException if a layout with the primary key could not be
862            found, if the user did not have permission to update the layout,
863            or if a valid parent layout ID to use could not be found
864            * @throws SystemException if a system exception occurred
865            */
866            public com.liferay.portal.model.Layout updateParentLayoutId(long plid,
867                    long parentPlid)
868                    throws com.liferay.portal.kernel.exception.PortalException,
869                            com.liferay.portal.kernel.exception.SystemException;
870    
871            /**
872            * Updates the priority of the layout matching the group, layout ID, and
873            * privacy.
874            *
875            * @param groupId the primary key of the group
876            * @param privateLayout whether the layout is private to the group
877            * @param layoutId the primary key of the layout
878            * @param priority the layout's new priority
879            * @return the updated layout
880            * @throws PortalException if a matching layout could not be found or if the
881            user did not have permission to update the layout
882            * @throws SystemException if a system exception occurred
883            */
884            public com.liferay.portal.model.Layout updatePriority(long groupId,
885                    boolean privateLayout, long layoutId, int priority)
886                    throws com.liferay.portal.kernel.exception.PortalException,
887                            com.liferay.portal.kernel.exception.SystemException;
888    
889            /**
890            * Updates the priority of the layout matching the primary key.
891            *
892            * @param plid the primary key of the layout
893            * @param priority the layout's new priority
894            * @return the updated layout
895            * @throws PortalException if a layout with the primary key could not be
896            found
897            * @throws SystemException if a system exception occurred
898            */
899            public com.liferay.portal.model.Layout updatePriority(long plid,
900                    int priority)
901                    throws com.liferay.portal.kernel.exception.PortalException,
902                            com.liferay.portal.kernel.exception.SystemException;
903    }