001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.util.ReferenceRegistry;
019    
020    /**
021     * The utility for the layout local service. This utility wraps {@link com.liferay.portal.service.impl.LayoutLocalServiceImpl} and is the primary access point for service operations in application layer code running on the local server.
022     *
023     * <p>
024     * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
025     * </p>
026     *
027     * @author Brian Wing Shun Chan
028     * @see LayoutLocalService
029     * @see com.liferay.portal.service.base.LayoutLocalServiceBaseImpl
030     * @see com.liferay.portal.service.impl.LayoutLocalServiceImpl
031     * @generated
032     */
033    public class LayoutLocalServiceUtil {
034            /*
035             * NOTE FOR DEVELOPERS:
036             *
037             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.LayoutLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
038             */
039    
040            /**
041            * Adds the layout to the database. Also notifies the appropriate model listeners.
042            *
043            * @param layout the layout
044            * @return the layout that was added
045            * @throws SystemException if a system exception occurred
046            */
047            public static com.liferay.portal.model.Layout addLayout(
048                    com.liferay.portal.model.Layout layout)
049                    throws com.liferay.portal.kernel.exception.SystemException {
050                    return getService().addLayout(layout);
051            }
052    
053            /**
054            * Creates a new layout with the primary key. Does not add the layout to the database.
055            *
056            * @param plid the primary key for the new layout
057            * @return the new layout
058            */
059            public static com.liferay.portal.model.Layout createLayout(long plid) {
060                    return getService().createLayout(plid);
061            }
062    
063            /**
064            * Deletes the layout with the primary key from the database. Also notifies the appropriate model listeners.
065            *
066            * @param plid the primary key of the layout
067            * @return the layout that was removed
068            * @throws PortalException if a layout with the primary key could not be found
069            * @throws SystemException if a system exception occurred
070            */
071            public static com.liferay.portal.model.Layout deleteLayout(long plid)
072                    throws com.liferay.portal.kernel.exception.PortalException,
073                            com.liferay.portal.kernel.exception.SystemException {
074                    return getService().deleteLayout(plid);
075            }
076    
077            /**
078            * Deletes the layout from the database. Also notifies the appropriate model listeners.
079            *
080            * @param layout the layout
081            * @return the layout that was removed
082            * @throws SystemException if a system exception occurred
083            */
084            public static com.liferay.portal.model.Layout deleteLayout(
085                    com.liferay.portal.model.Layout layout)
086                    throws com.liferay.portal.kernel.exception.SystemException {
087                    return getService().deleteLayout(layout);
088            }
089    
090            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
091                    return getService().dynamicQuery();
092            }
093    
094            /**
095            * Performs a dynamic query on the database and returns the matching rows.
096            *
097            * @param dynamicQuery the dynamic query
098            * @return the matching rows
099            * @throws SystemException if a system exception occurred
100            */
101            @SuppressWarnings("rawtypes")
102            public static java.util.List dynamicQuery(
103                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
104                    throws com.liferay.portal.kernel.exception.SystemException {
105                    return getService().dynamicQuery(dynamicQuery);
106            }
107    
108            /**
109            * Performs a dynamic query on the database and returns a range of the matching rows.
110            *
111            * <p>
112            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
113            * </p>
114            *
115            * @param dynamicQuery the dynamic query
116            * @param start the lower bound of the range of model instances
117            * @param end the upper bound of the range of model instances (not inclusive)
118            * @return the range of matching rows
119            * @throws SystemException if a system exception occurred
120            */
121            @SuppressWarnings("rawtypes")
122            public static java.util.List dynamicQuery(
123                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
124                    int end) throws com.liferay.portal.kernel.exception.SystemException {
125                    return getService().dynamicQuery(dynamicQuery, start, end);
126            }
127    
128            /**
129            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
130            *
131            * <p>
132            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
133            * </p>
134            *
135            * @param dynamicQuery the dynamic query
136            * @param start the lower bound of the range of model instances
137            * @param end the upper bound of the range of model instances (not inclusive)
138            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
139            * @return the ordered range of matching rows
140            * @throws SystemException if a system exception occurred
141            */
142            @SuppressWarnings("rawtypes")
143            public static java.util.List dynamicQuery(
144                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
145                    int end,
146                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
147                    throws com.liferay.portal.kernel.exception.SystemException {
148                    return getService()
149                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
150            }
151    
152            /**
153            * Returns the number of rows that match the dynamic query.
154            *
155            * @param dynamicQuery the dynamic query
156            * @return the number of rows that match the dynamic query
157            * @throws SystemException if a system exception occurred
158            */
159            public static long dynamicQueryCount(
160                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
161                    throws com.liferay.portal.kernel.exception.SystemException {
162                    return getService().dynamicQueryCount(dynamicQuery);
163            }
164    
165            public static com.liferay.portal.model.Layout fetchLayout(long plid)
166                    throws com.liferay.portal.kernel.exception.SystemException {
167                    return getService().fetchLayout(plid);
168            }
169    
170            /**
171            * Returns the layout with the primary key.
172            *
173            * @param plid the primary key of the layout
174            * @return the layout
175            * @throws PortalException if a layout with the primary key could not be found
176            * @throws SystemException if a system exception occurred
177            */
178            public static com.liferay.portal.model.Layout getLayout(long plid)
179                    throws com.liferay.portal.kernel.exception.PortalException,
180                            com.liferay.portal.kernel.exception.SystemException {
181                    return getService().getLayout(plid);
182            }
183    
184            public static com.liferay.portal.model.PersistedModel getPersistedModel(
185                    java.io.Serializable primaryKeyObj)
186                    throws com.liferay.portal.kernel.exception.PortalException,
187                            com.liferay.portal.kernel.exception.SystemException {
188                    return getService().getPersistedModel(primaryKeyObj);
189            }
190    
191            /**
192            * @param uuid the UUID of layout
193            * @param groupId the group id of the layout
194            * @param privateLayout whether the layout is private to the group
195            * @return the layout
196            * @throws PortalException if a layout with the UUID in the group and privateLayout could not be found
197            * @throws SystemException if a system exception occurred
198            */
199            public static com.liferay.portal.model.Layout getLayoutByUuidAndGroupId(
200                    java.lang.String uuid, long groupId, boolean privateLayout)
201                    throws com.liferay.portal.kernel.exception.PortalException,
202                            com.liferay.portal.kernel.exception.SystemException {
203                    return getService()
204                                       .getLayoutByUuidAndGroupId(uuid, groupId, privateLayout);
205            }
206    
207            /**
208            * Returns a range of all the layouts.
209            *
210            * <p>
211            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
212            * </p>
213            *
214            * @param start the lower bound of the range of layouts
215            * @param end the upper bound of the range of layouts (not inclusive)
216            * @return the range of layouts
217            * @throws SystemException if a system exception occurred
218            */
219            public static java.util.List<com.liferay.portal.model.Layout> getLayouts(
220                    int start, int end)
221                    throws com.liferay.portal.kernel.exception.SystemException {
222                    return getService().getLayouts(start, end);
223            }
224    
225            /**
226            * Returns the number of layouts.
227            *
228            * @return the number of layouts
229            * @throws SystemException if a system exception occurred
230            */
231            public static int getLayoutsCount()
232                    throws com.liferay.portal.kernel.exception.SystemException {
233                    return getService().getLayoutsCount();
234            }
235    
236            /**
237            * Updates the layout in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
238            *
239            * @param layout the layout
240            * @return the layout that was updated
241            * @throws SystemException if a system exception occurred
242            */
243            public static com.liferay.portal.model.Layout updateLayout(
244                    com.liferay.portal.model.Layout layout)
245                    throws com.liferay.portal.kernel.exception.SystemException {
246                    return getService().updateLayout(layout);
247            }
248    
249            /**
250            * Updates the layout in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
251            *
252            * @param layout the layout
253            * @param merge whether to merge the layout with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation.
254            * @return the layout that was updated
255            * @throws SystemException if a system exception occurred
256            */
257            public static com.liferay.portal.model.Layout updateLayout(
258                    com.liferay.portal.model.Layout layout, boolean merge)
259                    throws com.liferay.portal.kernel.exception.SystemException {
260                    return getService().updateLayout(layout, merge);
261            }
262    
263            /**
264            * Returns the Spring bean ID for this bean.
265            *
266            * @return the Spring bean ID for this bean
267            */
268            public static java.lang.String getBeanIdentifier() {
269                    return getService().getBeanIdentifier();
270            }
271    
272            /**
273            * Sets the Spring bean ID for this bean.
274            *
275            * @param beanIdentifier the Spring bean ID for this bean
276            */
277            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
278                    getService().setBeanIdentifier(beanIdentifier);
279            }
280    
281            /**
282            * Adds a layout with additional parameters.
283            *
284            * <p>
285            * This method handles the creation of the layout including its resources,
286            * metadata, and internal data structures. It is not necessary to make
287            * subsequent calls to any methods to setup default groups, resources, ...
288            * etc.
289            * </p>
290            *
291            * @param userId the primary key of the user
292            * @param groupId the primary key of the group
293            * @param privateLayout whether the layout is private to the group
294            * @param parentLayoutId the primary key of the parent layout (optionally
295            {@link
296            com.liferay.portal.model.LayoutConstants#DEFAULT_PARENT_LAYOUT_ID})
297            * @param nameMap the layout's locales and localized names
298            * @param titleMap the layout's locales and localized titles
299            * @param descriptionMap the layout's locales and localized descriptions
300            * @param keywordsMap the layout's locales and localized keywords
301            * @param robotsMap the layout's locales and localized robots
302            * @param type the layout's type (optionally {@link
303            com.liferay.portal.model.LayoutConstants#TYPE_PORTLET}). The
304            possible types can be found in {@link
305            com.liferay.portal.model.LayoutConstants}.
306            * @param hidden whether the layout is hidden
307            * @param friendlyURL the layout's friendly URL (optionally {@link
308            com.liferay.portal.util.PropsValues#DEFAULT_USER_PRIVATE_LAYOUT_FRIENDLY_URL}
309            or {@link
310            com.liferay.portal.util.PropsValues#DEFAULT_USER_PUBLIC_LAYOUT_FRIENDLY_URL}).
311            The default values can be overridden in
312            <code>portal-ext.properties</code> by specifying new values for
313            the corresponding properties defined in {@link
314            com.liferay.portal.util.PropsValues}. To see how the URL is
315            normalized when accessed see {@link
316            com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize(
317            String)}.
318            * @param serviceContext the service context. Must set the universally
319            unique identifier (UUID) for the layout. Can set the creation
320            date, modification date and the expando bridge attributes for the
321            layout. For layouts that belong to a layout set prototype, an
322            attribute named 'layoutUpdateable' can be set to specify whether
323            site administrators can modify this page within their site. For
324            layouts that are created from a layout prototype, attributes
325            named 'layoutPrototypeUuid' and 'layoutPrototypeLinkedEnabled'
326            can be specified to provide the unique identifier of the source
327            prototype and a boolean to determined whether a link to it should
328            be enabled to activate propagation of changes made to the linked
329            page in the prototype.
330            * @return the layout
331            * @throws PortalException if a group or user with the primary key could not
332            be found, or if layout values were invalid
333            * @throws SystemException if a system exception occurred
334            */
335            public static com.liferay.portal.model.Layout addLayout(long userId,
336                    long groupId, boolean privateLayout, long parentLayoutId,
337                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
338                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
339                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
340                    java.util.Map<java.util.Locale, java.lang.String> keywordsMap,
341                    java.util.Map<java.util.Locale, java.lang.String> robotsMap,
342                    java.lang.String type, boolean hidden, java.lang.String friendlyURL,
343                    com.liferay.portal.service.ServiceContext serviceContext)
344                    throws com.liferay.portal.kernel.exception.PortalException,
345                            com.liferay.portal.kernel.exception.SystemException {
346                    return getService()
347                                       .addLayout(userId, groupId, privateLayout, parentLayoutId,
348                            nameMap, titleMap, descriptionMap, keywordsMap, robotsMap, type,
349                            hidden, friendlyURL, serviceContext);
350            }
351    
352            /**
353            * Adds a layout.
354            *
355            * <p>
356            * This method handles the creation of the layout including its resources,
357            * metadata, and internal data structures. It is not necessary to make
358            * subsequent calls to any methods to setup default groups, resources, ...
359            * etc.
360            * </p>
361            *
362            * @param userId the primary key of the user
363            * @param groupId the primary key of the group
364            * @param privateLayout whether the layout is private to the group
365            * @param parentLayoutId the primary key of the parent layout (optionally
366            {@link
367            com.liferay.portal.model.LayoutConstants#DEFAULT_PARENT_LAYOUT_ID}).
368            The possible values can be found in {@link
369            com.liferay.portal.model.LayoutConstants}.
370            * @param name the layout's name (optionally {@link
371            com.liferay.portal.util.PropsValues#DEFAULT_USER_PRIVATE_LAYOUT_NAME}
372            or {@link
373            com.liferay.portal.util.PropsValues#DEFAULT_USER_PUBLIC_LAYOUT_NAME}).
374            The default values can be overridden in
375            <code>portal-ext.properties</code> by specifying new values for
376            the corresponding properties defined in {@link
377            com.liferay.portal.util.PropsValues}
378            * @param title the layout's title
379            * @param description the layout's description
380            * @param type the layout's type (optionally {@link
381            com.liferay.portal.model.LayoutConstants#TYPE_PORTLET}). The
382            possible types can be found in {@link
383            com.liferay.portal.model.LayoutConstants}.
384            * @param hidden whether the layout is hidden
385            * @param friendlyURL the friendly URL of the layout (optionally {@link
386            com.liferay.portal.util.PropsValues#DEFAULT_USER_PRIVATE_LAYOUT_FRIENDLY_URL}
387            or {@link
388            com.liferay.portal.util.PropsValues#DEFAULT_USER_PUBLIC_LAYOUT_FRIENDLY_URL}).
389            The default values can be overridden in
390            <code>portal-ext.properties</code> by specifying new values for
391            the corresponding properties defined in {@link
392            com.liferay.portal.util.PropsValues}. To see how the URL is
393            normalized when accessed see {@link
394            com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize(
395            String)}.
396            * @param serviceContext the service context. Must set the universally
397            unique identifier (UUID) for the layout. Can set the creation
398            date and modification date for the layout. For layouts that
399            belong to a layout set prototype, an attribute named
400            'layoutUpdateable' can be set to specify whether site
401            administrators can modify this page within their site.
402            * @return the layout
403            * @throws PortalException if a group or user with the primary key could not
404            be found
405            * @throws SystemException if a system exception occurred
406            */
407            public static com.liferay.portal.model.Layout addLayout(long userId,
408                    long groupId, boolean privateLayout, long parentLayoutId,
409                    java.lang.String name, java.lang.String title,
410                    java.lang.String description, java.lang.String type, boolean hidden,
411                    java.lang.String friendlyURL,
412                    com.liferay.portal.service.ServiceContext serviceContext)
413                    throws com.liferay.portal.kernel.exception.PortalException,
414                            com.liferay.portal.kernel.exception.SystemException {
415                    return getService()
416                                       .addLayout(userId, groupId, privateLayout, parentLayoutId,
417                            name, title, description, type, hidden, friendlyURL, serviceContext);
418            }
419    
420            /**
421            * Deletes the layout, its child layouts, and its associated resources.
422            *
423            * @param layout the layout
424            * @param updateLayoutSet whether the layout set's page counter needs to be
425            updated
426            * @param serviceContext the service context
427            * @throws PortalException if a portal exception occurred
428            * @throws SystemException if a system exception occurred
429            */
430            public static void deleteLayout(com.liferay.portal.model.Layout layout,
431                    boolean updateLayoutSet,
432                    com.liferay.portal.service.ServiceContext serviceContext)
433                    throws com.liferay.portal.kernel.exception.PortalException,
434                            com.liferay.portal.kernel.exception.SystemException {
435                    getService().deleteLayout(layout, updateLayoutSet, serviceContext);
436            }
437    
438            /**
439            * Deletes the layout with the primary key, also deleting the layout's child
440            * layouts, and associated resources.
441            *
442            * @param groupId the primary key of the group
443            * @param privateLayout whether the layout is private to the group
444            * @param layoutId the primary key of the layout
445            * @param serviceContext the service context
446            * @throws PortalException if a matching layout could not be found , or if
447            some other portal exception occurred
448            * @throws SystemException if a system exception occurred
449            */
450            public static void deleteLayout(long groupId, boolean privateLayout,
451                    long layoutId, com.liferay.portal.service.ServiceContext serviceContext)
452                    throws com.liferay.portal.kernel.exception.PortalException,
453                            com.liferay.portal.kernel.exception.SystemException {
454                    getService()
455                            .deleteLayout(groupId, privateLayout, layoutId, serviceContext);
456            }
457    
458            /**
459            * Deletes the layout with the plid, also deleting the layout's child
460            * layouts, and associated resources.
461            *
462            * @param plid the primary key of the layout
463            * @param serviceContext the service context
464            * @throws PortalException if a layout with the primary key could not be
465            found , or if some other portal exception occurred
466            * @throws SystemException if a system exception occurred
467            */
468            public static void deleteLayout(long plid,
469                    com.liferay.portal.service.ServiceContext serviceContext)
470                    throws com.liferay.portal.kernel.exception.PortalException,
471                            com.liferay.portal.kernel.exception.SystemException {
472                    getService().deleteLayout(plid, serviceContext);
473            }
474    
475            /**
476            * Deletes the group's private or non-private layouts, also deleting the
477            * layouts' child layouts, and associated resources.
478            *
479            * @param groupId the primary key of the group
480            * @param privateLayout whether the layout is private to the group
481            * @param serviceContext the service context
482            * @throws PortalException if a group with the primary key could not be
483            found or if a layout set for the group and privacy could not be
484            found
485            * @throws SystemException if a system exception occurred
486            */
487            public static void deleteLayouts(long groupId, boolean privateLayout,
488                    com.liferay.portal.service.ServiceContext serviceContext)
489                    throws com.liferay.portal.kernel.exception.PortalException,
490                            com.liferay.portal.kernel.exception.SystemException {
491                    getService().deleteLayouts(groupId, privateLayout, serviceContext);
492            }
493    
494            /**
495            * Exports layouts with the primary keys and criteria as a byte array.
496            *
497            * @param groupId the primary key of the group
498            * @param privateLayout whether the layout is private to the group
499            * @param layoutIds the primary keys of the layouts to be exported
500            * @param parameterMap the mapping of parameters indicating which
501            information to export. For information on the keys used in the
502            map see {@link
503            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}.
504            * @param startDate the export's start date
505            * @param endDate the export's end date
506            * @return the layouts as a byte array
507            * @throws PortalException if a group or any layout with the primary key
508            could not be found, or if some other portal exception occurred
509            * @throws SystemException if a system exception occurred
510            */
511            public static byte[] exportLayouts(long groupId, boolean privateLayout,
512                    long[] layoutIds,
513                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
514                    java.util.Date startDate, java.util.Date endDate)
515                    throws com.liferay.portal.kernel.exception.PortalException,
516                            com.liferay.portal.kernel.exception.SystemException {
517                    return getService()
518                                       .exportLayouts(groupId, privateLayout, layoutIds,
519                            parameterMap, startDate, endDate);
520            }
521    
522            /**
523            * Exports all layouts that match the criteria as a byte array.
524            *
525            * @param groupId the primary key of the group
526            * @param privateLayout whether the layout is private to the group
527            * @param parameterMap the mapping of parameters indicating which
528            information to export. For information on the keys used in the
529            map see {@link
530            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}.
531            * @param startDate the export's start date
532            * @param endDate the export's end date
533            * @return the layout as a byte array
534            * @throws PortalException if a group with the primary key could not be
535            found or if some other portal exception occurred
536            * @throws SystemException if a system exception occurred
537            */
538            public static byte[] exportLayouts(long groupId, boolean privateLayout,
539                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
540                    java.util.Date startDate, java.util.Date endDate)
541                    throws com.liferay.portal.kernel.exception.PortalException,
542                            com.liferay.portal.kernel.exception.SystemException {
543                    return getService()
544                                       .exportLayouts(groupId, privateLayout, parameterMap,
545                            startDate, endDate);
546            }
547    
548            /**
549            * Exports the layouts that match the primary keys and criteria as a file.
550            *
551            * @param groupId the primary key of the group
552            * @param privateLayout whether the layout is private to the group
553            * @param layoutIds the primary keys of the layouts to be exported
554            (optionally <code>null</code>)
555            * @param parameterMap the mapping of parameters indicating which
556            information to export. For information on the keys used in the
557            map see {@link
558            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}.
559            * @param startDate the export's start date
560            * @param endDate the export's end date
561            * @return the layouts as a File
562            * @throws PortalException if a group or any layout with the primary key
563            could not be found, or if some other portal exception occurred
564            * @throws SystemException if a system exception occurred
565            */
566            public static java.io.File exportLayoutsAsFile(long groupId,
567                    boolean privateLayout, long[] layoutIds,
568                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
569                    java.util.Date startDate, java.util.Date endDate)
570                    throws com.liferay.portal.kernel.exception.PortalException,
571                            com.liferay.portal.kernel.exception.SystemException {
572                    return getService()
573                                       .exportLayoutsAsFile(groupId, privateLayout, layoutIds,
574                            parameterMap, startDate, endDate);
575            }
576    
577            /**
578            * Exports the portlet information (categories, permissions, ... etc.) as a
579            * byte array.
580            *
581            * @param plid the primary key of the layout
582            * @param groupId the primary key of the group
583            * @param portletId the primary key of the portlet
584            * @param parameterMap the mapping of parameters indicating which
585            information to export. For information on the keys used in the
586            map see {@link
587            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}.
588            * @param startDate the export's start date
589            * @param endDate the export's end date
590            * @return the portlet information as a byte array
591            * @throws PortalException if a group or portlet with the primary key could
592            not be found, or if some other portal exception occurred
593            * @throws SystemException if a system exception occurred
594            */
595            public static byte[] exportPortletInfo(long plid, long groupId,
596                    java.lang.String portletId,
597                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
598                    java.util.Date startDate, java.util.Date endDate)
599                    throws com.liferay.portal.kernel.exception.PortalException,
600                            com.liferay.portal.kernel.exception.SystemException {
601                    return getService()
602                                       .exportPortletInfo(plid, groupId, portletId, parameterMap,
603                            startDate, endDate);
604            }
605    
606            /**
607            * Exports the portlet information (categories, permissions, ... etc.) as a
608            * file.
609            *
610            * @param plid the primary key of the layout
611            * @param groupId the primary key of the group
612            * @param portletId the primary key of the portlet
613            * @param parameterMap the mapping of parameters indicating which
614            information to export. For information on the keys used in the
615            map see {@link
616            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}.
617            * @param startDate the export's start date
618            * @param endDate the export's end date
619            * @return the portlet information as a file
620            * @throws PortalException if a group or portlet with the primary key could
621            not be found, or if some other portal exception occurred
622            * @throws SystemException if a system exception occurred
623            */
624            public static java.io.File exportPortletInfoAsFile(long plid, long groupId,
625                    java.lang.String portletId,
626                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
627                    java.util.Date startDate, java.util.Date endDate)
628                    throws com.liferay.portal.kernel.exception.PortalException,
629                            com.liferay.portal.kernel.exception.SystemException {
630                    return getService()
631                                       .exportPortletInfoAsFile(plid, groupId, portletId,
632                            parameterMap, startDate, endDate);
633            }
634    
635            public static com.liferay.portal.model.Layout fetchFirstLayout(
636                    long groupId, boolean privateLayout, long parentLayoutId)
637                    throws com.liferay.portal.kernel.exception.SystemException {
638                    return getService()
639                                       .fetchFirstLayout(groupId, privateLayout, parentLayoutId);
640            }
641    
642            /**
643            * @param uuid the universally unique identifier of the scope layout
644            * @param groupId the primary key of the group
645            * @param privateLayout whether the layout is private to the group
646            * @return the layout, or <code>null</code> if a matching layout could not
647            be found
648            * @throws SystemException if a system exception occurred
649            */
650            public static com.liferay.portal.model.Layout fetchLayoutByUuidAndGroupId(
651                    java.lang.String uuid, long groupId, boolean privateLayout)
652                    throws com.liferay.portal.kernel.exception.SystemException {
653                    return getService()
654                                       .fetchLayoutByUuidAndGroupId(uuid, groupId, privateLayout);
655            }
656    
657            /**
658            * Returns the primary key of the default layout for the group
659            *
660            * @param groupId the primary key of the group
661            * @return the primary key of the default layout for the group (optionally
662            {@link com.liferay.portal.model.LayoutConstants#DEFAULT_PLID})
663            * @throws SystemException if a system exception occurred
664            */
665            public static long getDefaultPlid(long groupId)
666                    throws com.liferay.portal.kernel.exception.SystemException {
667                    return getService().getDefaultPlid(groupId);
668            }
669    
670            /**
671            * Returns primary key of the matching default layout for the group
672            *
673            * @param groupId the primary key of the group
674            * @param privateLayout whether the layout is private to the group
675            * @return the primary key of the default layout for the group; {@link
676            com.liferay.portal.model.LayoutConstants#DEFAULT_PLID}) otherwise
677            * @throws SystemException if a system exception occurred
678            */
679            public static long getDefaultPlid(long groupId, boolean privateLayout)
680                    throws com.liferay.portal.kernel.exception.SystemException {
681                    return getService().getDefaultPlid(groupId, privateLayout);
682            }
683    
684            /**
685            * Returns primary key of the default portlet layout for the group
686            *
687            * @param groupId the primary key of the group
688            * @param privateLayout whether the layout is private to the group
689            * @param portletId the primary key of the portlet
690            * @return the primary key of the default portlet layout for the group;
691            {@link com.liferay.portal.model.LayoutConstants#DEFAULT_PLID}
692            otherwise
693            * @throws PortalException if a portlet with the primary key could not be
694            found
695            * @throws SystemException if a system exception occurred
696            */
697            public static long getDefaultPlid(long groupId, boolean privateLayout,
698                    java.lang.String portletId)
699                    throws com.liferay.portal.kernel.exception.PortalException,
700                            com.liferay.portal.kernel.exception.SystemException {
701                    return getService().getDefaultPlid(groupId, privateLayout, portletId);
702            }
703    
704            /**
705            * Returns the layout for the friendly URL
706            *
707            * @param groupId the primary key of the group
708            * @param privateLayout whether the layout is private to the group
709            * @param friendlyURL the friendly URL of the layout
710            * @return the layout for the friendly URL
711            * @throws PortalException if the friendly URL is <code>null</code> or a
712            matching layout could not be found
713            * @throws SystemException if a system exception occurred
714            */
715            public static com.liferay.portal.model.Layout getFriendlyURLLayout(
716                    long groupId, boolean privateLayout, java.lang.String friendlyURL)
717                    throws com.liferay.portal.kernel.exception.PortalException,
718                            com.liferay.portal.kernel.exception.SystemException {
719                    return getService()
720                                       .getFriendlyURLLayout(groupId, privateLayout, friendlyURL);
721            }
722    
723            /**
724            * Returns the layout matching the primary key, group, and privacy; throws a
725            * {@link com.liferay.portal.NoSuchLayoutException} otherwise.
726            *
727            * @param groupId the primary key of the group
728            * @param privateLayout whether the layout is private to the group
729            * @param layoutId the primary key of the layout
730            * @return the matching layout
731            * @throws PortalException if a matching layout could not be found
732            * @throws SystemException if a system exception occurred
733            */
734            public static com.liferay.portal.model.Layout getLayout(long groupId,
735                    boolean privateLayout, long layoutId)
736                    throws com.liferay.portal.kernel.exception.PortalException,
737                            com.liferay.portal.kernel.exception.SystemException {
738                    return getService().getLayout(groupId, privateLayout, layoutId);
739            }
740    
741            /**
742            * Returns the layout for the icon image; throws a {@link
743            * com.liferay.portal.NoSuchLayoutException} otherwise.
744            *
745            * @param iconImageId the primary key of the icon image
746            * @return Returns the layout for the icon image
747            * @throws PortalException if an icon image with the primary key could not
748            be found
749            * @throws SystemException if a system exception occurred
750            */
751            public static com.liferay.portal.model.Layout getLayoutByIconImageId(
752                    long iconImageId)
753                    throws com.liferay.portal.kernel.exception.PortalException,
754                            com.liferay.portal.kernel.exception.SystemException {
755                    return getService().getLayoutByIconImageId(iconImageId);
756            }
757    
758            /**
759            * Returns all the layouts belonging to the group.
760            *
761            * @param groupId the primary key of the group
762            * @param privateLayout whether the layout is private to the group
763            * @return the matching layouts, or <code>null</code> if no matches were
764            found
765            * @throws SystemException if a system exception occurred
766            */
767            public static java.util.List<com.liferay.portal.model.Layout> getLayouts(
768                    long groupId, boolean privateLayout)
769                    throws com.liferay.portal.kernel.exception.SystemException {
770                    return getService().getLayouts(groupId, privateLayout);
771            }
772    
773            /**
774            * Returns all the layouts belonging to the group that are children of the
775            * parent layout.
776            *
777            * @param groupId the primary key of the group
778            * @param privateLayout whether the layout is private to the group
779            * @param parentLayoutId the primary key of the parent layout
780            * @return the matching layouts, or <code>null</code> if no matches were
781            found
782            * @throws SystemException if a system exception occurred
783            */
784            public static java.util.List<com.liferay.portal.model.Layout> getLayouts(
785                    long groupId, boolean privateLayout, long parentLayoutId)
786                    throws com.liferay.portal.kernel.exception.SystemException {
787                    return getService().getLayouts(groupId, privateLayout, parentLayoutId);
788            }
789    
790            /**
791            * Returns a range of all the layouts belonging to the group that are
792            * children of the parent layout.
793            *
794            * <p>
795            * Useful when paginating results. Returns a maximum of <code>end -
796            * start</code> instances. <code>start</code> and <code>end</code> are not
797            * primary keys, they are indexes in the result set. Thus, <code>0</code>
798            * refers to the first result in the set. Setting both <code>start</code>
799            * and <code>end</code> to {@link
800            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
801            * result set.
802            * </p>
803            *
804            * @param groupId the primary key of the group
805            * @param privateLayout whether the layout is private to the group
806            * @param parentLayoutId the primary key of the parent layout
807            * @param incomplete whether the layout is incomplete
808            * @param start the lower bound of the range of layouts
809            * @param end the upper bound of the range of layouts (not inclusive)
810            * @return the matching layouts, or <code>null</code> if no matches were
811            found
812            * @throws SystemException if a system exception occurred
813            */
814            public static java.util.List<com.liferay.portal.model.Layout> getLayouts(
815                    long groupId, boolean privateLayout, long parentLayoutId,
816                    boolean incomplete, int start, int end)
817                    throws com.liferay.portal.kernel.exception.SystemException {
818                    return getService()
819                                       .getLayouts(groupId, privateLayout, parentLayoutId,
820                            incomplete, start, end);
821            }
822    
823            /**
824            * Returns all the layouts that match the layout IDs and belong to the
825            * group.
826            *
827            * @param groupId the primary key of the group
828            * @param privateLayout whether the layout is private to the group
829            * @param layoutIds the primary keys of the layouts
830            * @return the matching layouts, or <code>null</code> if no matches were
831            found
832            * @throws PortalException if a group or layout with the primary key could
833            not be found
834            * @throws SystemException if a system exception occurred
835            */
836            public static java.util.List<com.liferay.portal.model.Layout> getLayouts(
837                    long groupId, boolean privateLayout, long[] layoutIds)
838                    throws com.liferay.portal.kernel.exception.PortalException,
839                            com.liferay.portal.kernel.exception.SystemException {
840                    return getService().getLayouts(groupId, privateLayout, layoutIds);
841            }
842    
843            /**
844            * Returns all the layouts that match the type and belong to the group.
845            *
846            * @param groupId the primary key of the group
847            * @param privateLayout whether the layout is private to the group
848            * @param type the type of the layouts (optionally {@link
849            com.liferay.portal.model.LayoutConstants#TYPE_PORTLET})
850            * @return the matching layouts, or <code>null</code> if no matches were
851            found
852            * @throws SystemException if a system exception occurred
853            */
854            public static java.util.List<com.liferay.portal.model.Layout> getLayouts(
855                    long groupId, boolean privateLayout, java.lang.String type)
856                    throws com.liferay.portal.kernel.exception.SystemException {
857                    return getService().getLayouts(groupId, privateLayout, type);
858            }
859    
860            /**
861            * Returns the layout references for all the layouts that belong to the
862            * company and belong to the portlet that matches the preferences.
863            *
864            * @param companyId the primary key of the company
865            * @param portletId the primary key of the portlet
866            * @param preferencesKey the portlet's preference key
867            * @param preferencesValue the portlet's preference value
868            * @return the layout references of the matching layouts
869            * @throws SystemException if a system exception occurred
870            */
871            public static com.liferay.portal.model.LayoutReference[] getLayouts(
872                    long companyId, java.lang.String portletId,
873                    java.lang.String preferencesKey, java.lang.String preferencesValue)
874                    throws com.liferay.portal.kernel.exception.SystemException {
875                    return getService()
876                                       .getLayouts(companyId, portletId, preferencesKey,
877                            preferencesValue);
878            }
879    
880            public static int getLayoutsByLayoutPrototypeUuidCount(
881                    java.lang.String layoutPrototypeUuid)
882                    throws com.liferay.portal.kernel.exception.SystemException {
883                    return getService()
884                                       .getLayoutsByLayoutPrototypeUuidCount(layoutPrototypeUuid);
885            }
886    
887            public static int getLayoutsCount(com.liferay.portal.model.Group group,
888                    boolean privateLayout)
889                    throws com.liferay.portal.kernel.exception.PortalException,
890                            com.liferay.portal.kernel.exception.SystemException {
891                    return getService().getLayoutsCount(group, privateLayout);
892            }
893    
894            public static int getLayoutsCount(com.liferay.portal.model.Group group,
895                    boolean privateLayout, boolean includeUserGroups)
896                    throws com.liferay.portal.kernel.exception.PortalException,
897                            com.liferay.portal.kernel.exception.SystemException {
898                    return getService()
899                                       .getLayoutsCount(group, privateLayout, includeUserGroups);
900            }
901    
902            public static int getLayoutsCount(com.liferay.portal.model.User user,
903                    boolean privateLayout)
904                    throws com.liferay.portal.kernel.exception.PortalException,
905                            com.liferay.portal.kernel.exception.SystemException {
906                    return getService().getLayoutsCount(user, privateLayout);
907            }
908    
909            public static int getLayoutsCount(com.liferay.portal.model.User user,
910                    boolean privateLayout, boolean includeUserGroups)
911                    throws com.liferay.portal.kernel.exception.PortalException,
912                            com.liferay.portal.kernel.exception.SystemException {
913                    return getService()
914                                       .getLayoutsCount(user, privateLayout, includeUserGroups);
915            }
916    
917            /**
918            * Returns the primary key to use for the next layout.
919            *
920            * @param groupId the primary key of the group
921            * @param privateLayout whether the layout is private to the group
922            * @return the primary key to use for the next layout
923            * @throws SystemException if a system exception occurred
924            */
925            public static long getNextLayoutId(long groupId, boolean privateLayout)
926                    throws com.liferay.portal.kernel.exception.SystemException {
927                    return getService().getNextLayoutId(groupId, privateLayout);
928            }
929    
930            /**
931            * Returns all the layouts whose friendly URLs are <code>null</code>
932            *
933            * @return all the layouts whose friendly URLs are <code>null</code>
934            * @throws SystemException if a system exception occurred
935            */
936            public static java.util.List<com.liferay.portal.model.Layout> getNullFriendlyURLLayouts()
937                    throws com.liferay.portal.kernel.exception.SystemException {
938                    return getService().getNullFriendlyURLLayouts();
939            }
940    
941            /**
942            * Returns all the layouts within scope of the group
943            *
944            * @param groupId the primary key of the group
945            * @param privateLayout whether the layout is private to the group
946            * @return the layouts within scope of the group
947            * @throws SystemException if a system exception occurred
948            */
949            public static java.util.List<com.liferay.portal.model.Layout> getScopeGroupLayouts(
950                    long groupId, boolean privateLayout)
951                    throws com.liferay.portal.kernel.exception.SystemException {
952                    return getService().getScopeGroupLayouts(groupId, privateLayout);
953            }
954    
955            public static boolean hasLayouts(com.liferay.portal.model.Group group,
956                    boolean privateLayout)
957                    throws com.liferay.portal.kernel.exception.PortalException,
958                            com.liferay.portal.kernel.exception.SystemException {
959                    return getService().hasLayouts(group, privateLayout);
960            }
961    
962            public static boolean hasLayouts(com.liferay.portal.model.Group group,
963                    boolean privateLayout, boolean includeUserGroups)
964                    throws com.liferay.portal.kernel.exception.PortalException,
965                            com.liferay.portal.kernel.exception.SystemException {
966                    return getService().hasLayouts(group, privateLayout, includeUserGroups);
967            }
968    
969            /**
970            * Returns <code>true</code> if the group has any layouts;
971            * <code>false</code> otherwise.
972            *
973            * @param groupId the primary key of the group
974            * @param privateLayout whether the layout is private to the group
975            * @param parentLayoutId the primary key of the parent layout
976            * @return <code>true</code> if the group has any layouts;
977            <code>false</code> otherwise
978            * @throws SystemException if a system exception occurred
979            */
980            public static boolean hasLayouts(long groupId, boolean privateLayout,
981                    long parentLayoutId)
982                    throws com.liferay.portal.kernel.exception.SystemException {
983                    return getService().hasLayouts(groupId, privateLayout, parentLayoutId);
984            }
985    
986            public static boolean hasLayouts(com.liferay.portal.model.User user,
987                    boolean privateLayout)
988                    throws com.liferay.portal.kernel.exception.PortalException,
989                            com.liferay.portal.kernel.exception.SystemException {
990                    return getService().hasLayouts(user, privateLayout);
991            }
992    
993            public static boolean hasLayouts(com.liferay.portal.model.User user,
994                    boolean privateLayout, boolean includeUserGroups)
995                    throws com.liferay.portal.kernel.exception.PortalException,
996                            com.liferay.portal.kernel.exception.SystemException {
997                    return getService().hasLayouts(user, privateLayout, includeUserGroups);
998            }
999    
1000            public static boolean hasLayoutSetPrototypeLayout(
1001                    long layoutSetPrototypeId, java.lang.String layoutUuid)
1002                    throws com.liferay.portal.kernel.exception.PortalException,
1003                            com.liferay.portal.kernel.exception.SystemException {
1004                    return getService()
1005                                       .hasLayoutSetPrototypeLayout(layoutSetPrototypeId, layoutUuid);
1006            }
1007    
1008            public static boolean hasLayoutSetPrototypeLayout(
1009                    java.lang.String layoutSetPrototypeUuid, java.lang.String layoutUuid)
1010                    throws com.liferay.portal.kernel.exception.PortalException,
1011                            com.liferay.portal.kernel.exception.SystemException {
1012                    return getService()
1013                                       .hasLayoutSetPrototypeLayout(layoutSetPrototypeUuid,
1014                            layoutUuid);
1015            }
1016    
1017            /**
1018            * Imports the layouts from the byte array.
1019            *
1020            * @param userId the primary key of the user
1021            * @param groupId the primary key of the group
1022            * @param privateLayout whether the layout is private to the group
1023            * @param parameterMap the mapping of parameters indicating which
1024            information will be imported. For information on the keys used in
1025            the map see {@link
1026            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}.
1027            * @param bytes the byte array with the data
1028            * @throws PortalException if a group or user with the primary key could not
1029            be found, or if some other portal exception occurred
1030            * @throws SystemException if a system exception occurred
1031            * @see com.liferay.portal.lar.LayoutImporter
1032            */
1033            public static void importLayouts(long userId, long groupId,
1034                    boolean privateLayout,
1035                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
1036                    byte[] bytes)
1037                    throws com.liferay.portal.kernel.exception.PortalException,
1038                            com.liferay.portal.kernel.exception.SystemException {
1039                    getService()
1040                            .importLayouts(userId, groupId, privateLayout, parameterMap, bytes);
1041            }
1042    
1043            /**
1044            * Imports the layouts from the file.
1045            *
1046            * @param userId the primary key of the user
1047            * @param groupId the primary key of the group
1048            * @param privateLayout whether the layout is private to the group
1049            * @param parameterMap the mapping of parameters indicating which
1050            information will be imported. For information on the keys used in
1051            the map see {@link
1052            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}.
1053            * @param file the LAR file with the data
1054            * @throws PortalException if a group or user with the primary key could not
1055            be found, or if some other portal exception occurred
1056            * @throws SystemException if a system exception occurred
1057            * @see com.liferay.portal.lar.LayoutImporter
1058            */
1059            public static void importLayouts(long userId, long groupId,
1060                    boolean privateLayout,
1061                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
1062                    java.io.File file)
1063                    throws com.liferay.portal.kernel.exception.PortalException,
1064                            com.liferay.portal.kernel.exception.SystemException {
1065                    getService()
1066                            .importLayouts(userId, groupId, privateLayout, parameterMap, file);
1067            }
1068    
1069            /**
1070            * Imports the layouts from the input stream.
1071            *
1072            * @param userId the primary key of the user
1073            * @param groupId the primary key of the group
1074            * @param privateLayout whether the layout is private to the group
1075            * @param parameterMap the mapping of parameters indicating which
1076            information will be imported. For information on the keys used in
1077            the map see {@link
1078            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}.
1079            * @param is the input stream
1080            * @throws PortalException if a group or user with the primary key could not
1081            be found, or if some other portal exception occurred
1082            * @throws SystemException if a system exception occurred
1083            * @see com.liferay.portal.lar.LayoutImporter
1084            */
1085            public static void importLayouts(long userId, long groupId,
1086                    boolean privateLayout,
1087                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
1088                    java.io.InputStream is)
1089                    throws com.liferay.portal.kernel.exception.PortalException,
1090                            com.liferay.portal.kernel.exception.SystemException {
1091                    getService()
1092                            .importLayouts(userId, groupId, privateLayout, parameterMap, is);
1093            }
1094    
1095            /**
1096            * Imports the portlet information (categories, permissions, ... etc.) from
1097            * the file.
1098            *
1099            * @param userId the primary key of the user
1100            * @param plid the primary key of the target layout
1101            * @param groupId the primary key of the target group
1102            * @param portletId the primary key of the portlet
1103            * @param parameterMap the mapping of parameters indicating which
1104            information will be imported. For information on the keys used in
1105            the map see {@link
1106            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}.
1107            * @param file the LAR file with the data
1108            * @throws PortalException if a group, layout, portlet or user with the
1109            primary key could not be found
1110            * @throws SystemException if a system exception occurred
1111            */
1112            public static void importPortletInfo(long userId, long plid, long groupId,
1113                    java.lang.String portletId,
1114                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
1115                    java.io.File file)
1116                    throws com.liferay.portal.kernel.exception.PortalException,
1117                            com.liferay.portal.kernel.exception.SystemException {
1118                    getService()
1119                            .importPortletInfo(userId, plid, groupId, portletId, parameterMap,
1120                            file);
1121            }
1122    
1123            /**
1124            * Imports the portlet information (categories, permissions, ... etc.) from
1125            * the input stream.
1126            *
1127            * @param userId the primary key of the user
1128            * @param plid the primary key of the layout
1129            * @param groupId the primary key of the group
1130            * @param portletId the primary key of the portlet
1131            * @param parameterMap the mapping of parameters indicating which
1132            information will be imported. For information on the keys used in
1133            the map see {@link
1134            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}.
1135            * @param is the input stream
1136            * @throws PortalException if a group, portlet, layout or user with the
1137            primary key could not be found
1138            * @throws SystemException if a system exception occurred
1139            */
1140            public static void importPortletInfo(long userId, long plid, long groupId,
1141                    java.lang.String portletId,
1142                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
1143                    java.io.InputStream is)
1144                    throws com.liferay.portal.kernel.exception.PortalException,
1145                            com.liferay.portal.kernel.exception.SystemException {
1146                    getService()
1147                            .importPortletInfo(userId, plid, groupId, portletId, parameterMap,
1148                            is);
1149            }
1150    
1151            /**
1152            * Sets the layouts for the group, replacing and prioritizing all layouts of
1153            * the parent layout.
1154            *
1155            * @param groupId the primary key of the group
1156            * @param privateLayout whether the layout is private to the group
1157            * @param parentLayoutId the primary key of the parent layout
1158            * @param layoutIds the primary keys of the layouts
1159            * @param serviceContext the service context
1160            * @throws PortalException if a group or layout with the primary key could
1161            not be found, if no layouts were specified, if the first layout
1162            was not page-able, if the first layout was hidden, or if some
1163            other portal exception occurred
1164            * @throws SystemException if a system exception occurred
1165            */
1166            public static void setLayouts(long groupId, boolean privateLayout,
1167                    long parentLayoutId, long[] layoutIds,
1168                    com.liferay.portal.service.ServiceContext serviceContext)
1169                    throws com.liferay.portal.kernel.exception.PortalException,
1170                            com.liferay.portal.kernel.exception.SystemException {
1171                    getService()
1172                            .setLayouts(groupId, privateLayout, parentLayoutId, layoutIds,
1173                            serviceContext);
1174            }
1175    
1176            /**
1177            * Updates the friendly URL of the layout.
1178            *
1179            * @param plid the primary key of the layout
1180            * @param friendlyURL the friendly URL to be assigned
1181            * @return the updated layout
1182            * @throws PortalException if a group or layout with the primary key could
1183            not be found
1184            * @throws SystemException if a system exception occurred
1185            */
1186            public static com.liferay.portal.model.Layout updateFriendlyURL(long plid,
1187                    java.lang.String friendlyURL)
1188                    throws com.liferay.portal.kernel.exception.PortalException,
1189                            com.liferay.portal.kernel.exception.SystemException {
1190                    return getService().updateFriendlyURL(plid, friendlyURL);
1191            }
1192    
1193            /**
1194            * Updates the layout.
1195            *
1196            * @param groupId the primary key of the group
1197            * @param privateLayout whether the layout is private to the group
1198            * @param layoutId the primary key of the layout
1199            * @param parentLayoutId the primary key of the layout's new parent layout
1200            * @param nameMap the locales and localized names to merge (optionally
1201            <code>null</code>)
1202            * @param titleMap the locales and localized titles to merge (optionally
1203            <code>null</code>)
1204            * @param descriptionMap the locales and localized descriptions to merge
1205            (optionally <code>null</code>)
1206            * @param keywordsMap the locales and localized keywords to merge
1207            (optionally <code>null</code>)
1208            * @param robotsMap the locales and localized robots to merge (optionally
1209            <code>null</code>)
1210            * @param type the layout's new type (optionally {@link
1211            com.liferay.portal.model.LayoutConstants#TYPE_PORTLET})
1212            * @param hidden whether the layout is hidden
1213            * @param friendlyURL the layout's new friendly URL (optionally {@link
1214            com.liferay.portal.util.PropsValues#DEFAULT_USER_PRIVATE_LAYOUT_FRIENDLY_URL}
1215            or {@link
1216            com.liferay.portal.util.PropsValues#DEFAULT_USER_PRIVATE_LAYOUT_FRIENDLY_URL}).
1217            The default values can be overridden in
1218            <code>portal-ext.properties</code> by specifying new values for
1219            the corresponding properties defined in {@link
1220            com.liferay.portal.util.PropsValues}. To see how the URL is
1221            normalized when accessed see {@link
1222            com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize(
1223            String)}.
1224            * @param iconImage whether the icon image will be updated
1225            * @param iconBytes the byte array of the layout's new icon image
1226            * @param serviceContext the service context. Can set the modification date
1227            and expando bridge attributes for the layout. For layouts that
1228            are linked to a layout prototype, attributes named
1229            'layoutPrototypeUuid' and 'layoutPrototypeLinkedEnabled' can be
1230            specified to provide the unique identifier of the source
1231            prototype and a boolean to determined whether a link to it should
1232            be enabled to activate propagation of changes made to the linked
1233            page in the prototype.
1234            * @return the updated layout
1235            * @throws PortalException if a group or layout with the primary key could
1236            not be found, if a unique friendly URL could not be generated, if
1237            a valid parent layout ID to use could not be found, or if the
1238            layout parameters were invalid
1239            * @throws SystemException if a system exception occurred
1240            */
1241            public static com.liferay.portal.model.Layout updateLayout(long groupId,
1242                    boolean privateLayout, long layoutId, long parentLayoutId,
1243                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
1244                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
1245                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
1246                    java.util.Map<java.util.Locale, java.lang.String> keywordsMap,
1247                    java.util.Map<java.util.Locale, java.lang.String> robotsMap,
1248                    java.lang.String type, boolean hidden, java.lang.String friendlyURL,
1249                    java.lang.Boolean iconImage, byte[] iconBytes,
1250                    com.liferay.portal.service.ServiceContext serviceContext)
1251                    throws com.liferay.portal.kernel.exception.PortalException,
1252                            com.liferay.portal.kernel.exception.SystemException {
1253                    return getService()
1254                                       .updateLayout(groupId, privateLayout, layoutId,
1255                            parentLayoutId, nameMap, titleMap, descriptionMap, keywordsMap,
1256                            robotsMap, type, hidden, friendlyURL, iconImage, iconBytes,
1257                            serviceContext);
1258            }
1259    
1260            /**
1261            * Updates the layout replacing its type settings.
1262            *
1263            * @param groupId the primary key of the group
1264            * @param privateLayout whether the layout is private to the group
1265            * @param layoutId the primary key of the layout
1266            * @param typeSettings the settings to load the unicode properties object.
1267            See {@link com.liferay.portal.kernel.util.UnicodeProperties
1268            #fastLoad(String)}.
1269            * @return the updated layout
1270            * @throws PortalException if a matching layout could not be found
1271            * @throws SystemException if a system exception occurred
1272            */
1273            public static com.liferay.portal.model.Layout updateLayout(long groupId,
1274                    boolean privateLayout, long layoutId, java.lang.String typeSettings)
1275                    throws com.liferay.portal.kernel.exception.PortalException,
1276                            com.liferay.portal.kernel.exception.SystemException {
1277                    return getService()
1278                                       .updateLayout(groupId, privateLayout, layoutId, typeSettings);
1279            }
1280    
1281            /**
1282            * Updates the look and feel of the layout.
1283            *
1284            * @param groupId the primary key of the group
1285            * @param privateLayout whether the layout is private to the group
1286            * @param layoutId the primary key of the layout
1287            * @param themeId the primary key of the layout's new theme
1288            * @param colorSchemeId the primary key of the layout's new color scheme
1289            * @param css the layout's new CSS
1290            * @param wapTheme whether the theme is for WAP browsers
1291            * @return the updated layout
1292            * @throws PortalException if a matching layout could not be found
1293            * @throws SystemException if a system exception occurred
1294            */
1295            public static com.liferay.portal.model.Layout updateLookAndFeel(
1296                    long groupId, boolean privateLayout, long layoutId,
1297                    java.lang.String themeId, java.lang.String colorSchemeId,
1298                    java.lang.String css, boolean wapTheme)
1299                    throws com.liferay.portal.kernel.exception.PortalException,
1300                            com.liferay.portal.kernel.exception.SystemException {
1301                    return getService()
1302                                       .updateLookAndFeel(groupId, privateLayout, layoutId,
1303                            themeId, colorSchemeId, css, wapTheme);
1304            }
1305    
1306            /**
1307            * Updates the name of the layout.
1308            *
1309            * @param layout the layout to be updated
1310            * @param name the layout's new name
1311            * @param languageId the primary key of the language. For more information
1312            see {@link java.util.Locale}.
1313            * @return the updated layout
1314            * @throws PortalException if the new name was <code>null</code>
1315            * @throws SystemException if a system exception occurred
1316            */
1317            public static com.liferay.portal.model.Layout updateName(
1318                    com.liferay.portal.model.Layout layout, java.lang.String name,
1319                    java.lang.String languageId)
1320                    throws com.liferay.portal.kernel.exception.PortalException,
1321                            com.liferay.portal.kernel.exception.SystemException {
1322                    return getService().updateName(layout, name, languageId);
1323            }
1324    
1325            /**
1326            * Updates the name of the layout matching the group, layout ID, and
1327            * privacy.
1328            *
1329            * @param groupId the primary key of the group
1330            * @param privateLayout whether the layout is private to the group
1331            * @param layoutId the primary key of the layout
1332            * @param name the layout's new name
1333            * @param languageId the primary key of the language. For more information
1334            see {@link java.util.Locale}.
1335            * @return the updated layout
1336            * @throws PortalException if a matching layout could not be found or if the
1337            new name was <code>null</code>
1338            * @throws SystemException if a system exception occurred
1339            */
1340            public static com.liferay.portal.model.Layout updateName(long groupId,
1341                    boolean privateLayout, long layoutId, java.lang.String name,
1342                    java.lang.String languageId)
1343                    throws com.liferay.portal.kernel.exception.PortalException,
1344                            com.liferay.portal.kernel.exception.SystemException {
1345                    return getService()
1346                                       .updateName(groupId, privateLayout, layoutId, name,
1347                            languageId);
1348            }
1349    
1350            /**
1351            * Updates the name of the layout matching the primary key.
1352            *
1353            * @param plid the primary key of the layout
1354            * @param name the name to be assigned
1355            * @param languageId the primary key of the language. For more information
1356            see {@link java.util.Locale}.
1357            * @return the updated layout
1358            * @throws PortalException if a layout with the primary key could not be
1359            found or if the name was <code>null</code>
1360            * @throws SystemException if a system exception occurred
1361            */
1362            public static com.liferay.portal.model.Layout updateName(long plid,
1363                    java.lang.String name, java.lang.String languageId)
1364                    throws com.liferay.portal.kernel.exception.PortalException,
1365                            com.liferay.portal.kernel.exception.SystemException {
1366                    return getService().updateName(plid, name, languageId);
1367            }
1368    
1369            /**
1370            * Updates the parent layout ID of the layout matching the group, layout ID,
1371            * and privacy.
1372            *
1373            * @param groupId the primary key of the group
1374            * @param privateLayout whether the layout is private to the group
1375            * @param layoutId the primary key of the layout
1376            * @param parentLayoutId the primary key to be assigned to the parent
1377            layout
1378            * @return the matching layout
1379            * @throws PortalException if a valid parent layout ID to use could not be
1380            found or if a matching layout could not be found
1381            * @throws SystemException if a system exception occurred
1382            */
1383            public static com.liferay.portal.model.Layout updateParentLayoutId(
1384                    long groupId, boolean privateLayout, long layoutId, long parentLayoutId)
1385                    throws com.liferay.portal.kernel.exception.PortalException,
1386                            com.liferay.portal.kernel.exception.SystemException {
1387                    return getService()
1388                                       .updateParentLayoutId(groupId, privateLayout, layoutId,
1389                            parentLayoutId);
1390            }
1391    
1392            /**
1393            * Updates the parent layout ID of the layout matching the primary key. If a
1394            * layout matching the parent primary key is found, the layout ID of that
1395            * layout is assigned, otherwise {@link
1396            * com.liferay.portal.model.LayoutConstants#DEFAULT_PARENT_LAYOUT_ID} is
1397            * assigned.
1398            *
1399            * @param plid the primary key of the layout
1400            * @param parentPlid the primary key of the parent layout
1401            * @return the layout matching the primary key
1402            * @throws PortalException if a layout with the primary key could not be
1403            found or if a valid parent layout ID to use could not be found
1404            * @throws SystemException if a system exception occurred
1405            */
1406            public static com.liferay.portal.model.Layout updateParentLayoutId(
1407                    long plid, long parentPlid)
1408                    throws com.liferay.portal.kernel.exception.PortalException,
1409                            com.liferay.portal.kernel.exception.SystemException {
1410                    return getService().updateParentLayoutId(plid, parentPlid);
1411            }
1412    
1413            /**
1414            * Updates the priorities of the layouts.
1415            *
1416            * @param groupId the primary key of the group
1417            * @param privateLayout whether the layout is private to the group
1418            * @throws PortalException if a matching layout could not be found
1419            * @throws SystemException if a system exception occurred
1420            */
1421            public static void updatePriorities(long groupId, boolean privateLayout)
1422                    throws com.liferay.portal.kernel.exception.PortalException,
1423                            com.liferay.portal.kernel.exception.SystemException {
1424                    getService().updatePriorities(groupId, privateLayout);
1425            }
1426    
1427            /**
1428            * Updates the priority of the layout.
1429            *
1430            * @param layout the layout to be updated
1431            * @param priority the layout's new priority
1432            * @return the updated layout
1433            * @throws SystemException if a system exception occurred
1434            */
1435            public static com.liferay.portal.model.Layout updatePriority(
1436                    com.liferay.portal.model.Layout layout, int priority)
1437                    throws com.liferay.portal.kernel.exception.SystemException {
1438                    return getService().updatePriority(layout, priority);
1439            }
1440    
1441            /**
1442            * Updates the priority of the layout matching the group, layout ID, and
1443            * privacy.
1444            *
1445            * @param groupId the primary key of the group
1446            * @param privateLayout whether the layout is private to the group
1447            * @param layoutId the primary key of the layout
1448            * @param priority the layout's new priority
1449            * @return the updated layout
1450            * @throws PortalException if a matching layout could not be found
1451            * @throws SystemException if a system exception occurred
1452            */
1453            public static com.liferay.portal.model.Layout updatePriority(long groupId,
1454                    boolean privateLayout, long layoutId, int priority)
1455                    throws com.liferay.portal.kernel.exception.PortalException,
1456                            com.liferay.portal.kernel.exception.SystemException {
1457                    return getService()
1458                                       .updatePriority(groupId, privateLayout, layoutId, priority);
1459            }
1460    
1461            /**
1462            * Updates the priority of the layout matching the primary key.
1463            *
1464            * @param plid the primary key of the layout
1465            * @param priority the layout's new priority
1466            * @return the updated layout
1467            * @throws PortalException if a layout with the primary key could not be
1468            found
1469            * @throws SystemException if a system exception occurred
1470            */
1471            public static com.liferay.portal.model.Layout updatePriority(long plid,
1472                    int priority)
1473                    throws com.liferay.portal.kernel.exception.PortalException,
1474                            com.liferay.portal.kernel.exception.SystemException {
1475                    return getService().updatePriority(plid, priority);
1476            }
1477    
1478            /**
1479            * @deprecated As of 6.2.0, with no direct replacement
1480            */
1481            public static void updateScopedPortletNames(long groupId,
1482                    boolean privateLayout, long layoutId,
1483                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
1484                    java.util.List<java.util.Locale> nameMapModifiedLocales)
1485                    throws com.liferay.portal.kernel.exception.PortalException,
1486                            com.liferay.portal.kernel.exception.SystemException {
1487                    getService()
1488                            .updateScopedPortletNames(groupId, privateLayout, layoutId,
1489                            nameMap, nameMapModifiedLocales);
1490            }
1491    
1492            /**
1493            * Updates the names of the portlets within scope of the group, the scope of
1494            * the layout's universally unique identifier, and the privacy.
1495            *
1496            * @param groupId the primary key of the group
1497            * @param privateLayout whether the layout is private to the group
1498            * @param layoutId the primary key of the layout whose universally
1499            unique identifier to match
1500            * @param name the new name for the portlets
1501            * @param languageId the primary key of the language
1502            * @throws PortalException if a matching layout could not be found
1503            * @throws SystemException if a system exception occurred
1504            * @see com.liferay.portlet.portletconfiguration.action.EditScopeAction
1505            * @deprecated As of 6.2.0, with no direct replacement
1506            */
1507            public static void updateScopedPortletNames(long groupId,
1508                    boolean privateLayout, long layoutId, java.lang.String name,
1509                    java.lang.String languageId)
1510                    throws com.liferay.portal.kernel.exception.PortalException,
1511                            com.liferay.portal.kernel.exception.SystemException {
1512                    getService()
1513                            .updateScopedPortletNames(groupId, privateLayout, layoutId, name,
1514                            languageId);
1515            }
1516    
1517            public static LayoutLocalService getService() {
1518                    if (_service == null) {
1519                            _service = (LayoutLocalService)PortalBeanLocatorUtil.locate(LayoutLocalService.class.getName());
1520    
1521                            ReferenceRegistry.registerReference(LayoutLocalServiceUtil.class,
1522                                    "_service");
1523                    }
1524    
1525                    return _service;
1526            }
1527    
1528            /**
1529             * @deprecated
1530             */
1531            public void setService(LayoutLocalService service) {
1532            }
1533    
1534            private static LayoutLocalService _service;
1535    }