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