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