001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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            * Returns the layout with the UUID in the group.
193            *
194            * @param uuid the UUID of layout
195            * @param groupId the group id of the layout
196            * @return the layout
197            * @throws PortalException if a layout with the UUID in the group could not be found
198            * @throws SystemException if a system exception occurred
199            */
200            public static com.liferay.portal.model.Layout getLayoutByUuidAndGroupId(
201                    java.lang.String uuid, long groupId)
202                    throws com.liferay.portal.kernel.exception.PortalException,
203                            com.liferay.portal.kernel.exception.SystemException {
204                    return getService().getLayoutByUuidAndGroupId(uuid, groupId);
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            * Returns the layout matching the universally unique identifier and group
644            * ID
645            *
646            * @param uuid the universally unique identifier of the scope layout
647            * @param groupId the primary key of the group
648            * @return the layout, or <code>null</code> if a matching layout could not
649            be found
650            * @throws SystemException if a system exception occurred
651            */
652            public static com.liferay.portal.model.Layout fetchLayoutByUuidAndGroupId(
653                    java.lang.String uuid, long groupId)
654                    throws com.liferay.portal.kernel.exception.SystemException {
655                    return getService().fetchLayoutByUuidAndGroupId(uuid, groupId);
656            }
657    
658            /**
659            * Returns the primary key of the default layout for the group
660            *
661            * @param groupId the primary key of the group
662            * @return the primary key of the default layout for the group (optionally
663            {@link com.liferay.portal.model.LayoutConstants#DEFAULT_PLID})
664            * @throws SystemException if a system exception occurred
665            */
666            public static long getDefaultPlid(long groupId)
667                    throws com.liferay.portal.kernel.exception.SystemException {
668                    return getService().getDefaultPlid(groupId);
669            }
670    
671            /**
672            * Returns primary key of the matching default layout for the group
673            *
674            * @param groupId the primary key of the group
675            * @param privateLayout whether the layout is private to the group
676            * @return the primary key of the default layout for the group; {@link
677            com.liferay.portal.model.LayoutConstants#DEFAULT_PLID}) otherwise
678            * @throws SystemException if a system exception occurred
679            */
680            public static long getDefaultPlid(long groupId, boolean privateLayout)
681                    throws com.liferay.portal.kernel.exception.SystemException {
682                    return getService().getDefaultPlid(groupId, privateLayout);
683            }
684    
685            /**
686            * Returns primary key of the default portlet layout for the group
687            *
688            * @param groupId the primary key of the group
689            * @param privateLayout whether the layout is private to the group
690            * @param portletId the primary key of the portlet
691            * @return the primary key of the default portlet layout for the group;
692            {@link com.liferay.portal.model.LayoutConstants#DEFAULT_PLID}
693            otherwise
694            * @throws PortalException if a portlet with the primary key could not be
695            found
696            * @throws SystemException if a system exception occurred
697            */
698            public static long getDefaultPlid(long groupId, boolean privateLayout,
699                    java.lang.String portletId)
700                    throws com.liferay.portal.kernel.exception.PortalException,
701                            com.liferay.portal.kernel.exception.SystemException {
702                    return getService().getDefaultPlid(groupId, privateLayout, portletId);
703            }
704    
705            /**
706            * Returns the layout for the friendly URL
707            *
708            * @param groupId the primary key of the group
709            * @param privateLayout whether the layout is private to the group
710            * @param friendlyURL the friendly URL of the layout
711            * @return the layout for the friendly URL
712            * @throws PortalException if the friendly URL is <code>null</code> or a
713            matching layout could not be found
714            * @throws SystemException if a system exception occurred
715            */
716            public static com.liferay.portal.model.Layout getFriendlyURLLayout(
717                    long groupId, boolean privateLayout, java.lang.String friendlyURL)
718                    throws com.liferay.portal.kernel.exception.PortalException,
719                            com.liferay.portal.kernel.exception.SystemException {
720                    return getService()
721                                       .getFriendlyURLLayout(groupId, privateLayout, friendlyURL);
722            }
723    
724            /**
725            * Returns the layout matching the primary key, group, and privacy; throws a
726            * {@link com.liferay.portal.NoSuchLayoutException} otherwise.
727            *
728            * @param groupId the primary key of the group
729            * @param privateLayout whether the layout is private to the group
730            * @param layoutId the primary key of the layout
731            * @return the matching layout
732            * @throws PortalException if a matching layout could not be found
733            * @throws SystemException if a system exception occurred
734            */
735            public static com.liferay.portal.model.Layout getLayout(long groupId,
736                    boolean privateLayout, long layoutId)
737                    throws com.liferay.portal.kernel.exception.PortalException,
738                            com.liferay.portal.kernel.exception.SystemException {
739                    return getService().getLayout(groupId, privateLayout, layoutId);
740            }
741    
742            /**
743            * Returns the layout for the icon image; throws a {@link
744            * com.liferay.portal.NoSuchLayoutException} otherwise.
745            *
746            * @param iconImageId the primary key of the icon image
747            * @return Returns the layout for the icon image
748            * @throws PortalException if an icon image with the primary key could not
749            be found
750            * @throws SystemException if a system exception occurred
751            */
752            public static com.liferay.portal.model.Layout getLayoutByIconImageId(
753                    long iconImageId)
754                    throws com.liferay.portal.kernel.exception.PortalException,
755                            com.liferay.portal.kernel.exception.SystemException {
756                    return getService().getLayoutByIconImageId(iconImageId);
757            }
758    
759            /**
760            * Returns all the layouts belonging to the group.
761            *
762            * @param groupId the primary key of the group
763            * @param privateLayout whether the layout is private to the group
764            * @return the matching layouts, or <code>null</code> if no matches were
765            found
766            * @throws SystemException if a system exception occurred
767            */
768            public static java.util.List<com.liferay.portal.model.Layout> getLayouts(
769                    long groupId, boolean privateLayout)
770                    throws com.liferay.portal.kernel.exception.SystemException {
771                    return getService().getLayouts(groupId, privateLayout);
772            }
773    
774            /**
775            * Returns all the layouts belonging to the group that are children of the
776            * parent layout.
777            *
778            * @param groupId the primary key of the group
779            * @param privateLayout whether the layout is private to the group
780            * @param parentLayoutId the primary key of the parent layout
781            * @return the matching layouts, or <code>null</code> if no matches were
782            found
783            * @throws SystemException if a system exception occurred
784            */
785            public static java.util.List<com.liferay.portal.model.Layout> getLayouts(
786                    long groupId, boolean privateLayout, long parentLayoutId)
787                    throws com.liferay.portal.kernel.exception.SystemException {
788                    return getService().getLayouts(groupId, privateLayout, parentLayoutId);
789            }
790    
791            /**
792            * Returns a range of all the layouts belonging to the group that are
793            * children of the parent layout.
794            *
795            * <p>
796            * Useful when paginating results. Returns a maximum of <code>end -
797            * start</code> instances. <code>start</code> and <code>end</code> are not
798            * primary keys, they are indexes in the result set. Thus, <code>0</code>
799            * refers to the first result in the set. Setting both <code>start</code>
800            * and <code>end</code> to {@link
801            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
802            * result set.
803            * </p>
804            *
805            * @param groupId the primary key of the group
806            * @param privateLayout whether the layout is private to the group
807            * @param parentLayoutId the primary key of the parent layout
808            * @param incomplete whether the layout is incomplete
809            * @param start the lower bound of the range of layouts
810            * @param end the upper bound of the range of layouts (not inclusive)
811            * @return the matching layouts, or <code>null</code> if no matches were
812            found
813            * @throws SystemException if a system exception occurred
814            */
815            public static java.util.List<com.liferay.portal.model.Layout> getLayouts(
816                    long groupId, boolean privateLayout, long parentLayoutId,
817                    boolean incomplete, int start, int end)
818                    throws com.liferay.portal.kernel.exception.SystemException {
819                    return getService()
820                                       .getLayouts(groupId, privateLayout, parentLayoutId,
821                            incomplete, start, end);
822            }
823    
824            /**
825            * Returns all the layouts that match the layout IDs and belong to the
826            * group.
827            *
828            * @param groupId the primary key of the group
829            * @param privateLayout whether the layout is private to the group
830            * @param layoutIds the primary keys of the layouts
831            * @return the matching layouts, or <code>null</code> if no matches were
832            found
833            * @throws PortalException if a group or layout with the primary key could
834            not be found
835            * @throws SystemException if a system exception occurred
836            */
837            public static java.util.List<com.liferay.portal.model.Layout> getLayouts(
838                    long groupId, boolean privateLayout, long[] layoutIds)
839                    throws com.liferay.portal.kernel.exception.PortalException,
840                            com.liferay.portal.kernel.exception.SystemException {
841                    return getService().getLayouts(groupId, privateLayout, layoutIds);
842            }
843    
844            /**
845            * Returns all the layouts that match the type and belong to the group.
846            *
847            * @param groupId the primary key of the group
848            * @param privateLayout whether the layout is private to the group
849            * @param type the type of the layouts (optionally {@link
850            com.liferay.portal.model.LayoutConstants#TYPE_PORTLET})
851            * @return the matching layouts, or <code>null</code> if no matches were
852            found
853            * @throws SystemException if a system exception occurred
854            */
855            public static java.util.List<com.liferay.portal.model.Layout> getLayouts(
856                    long groupId, boolean privateLayout, java.lang.String type)
857                    throws com.liferay.portal.kernel.exception.SystemException {
858                    return getService().getLayouts(groupId, privateLayout, type);
859            }
860    
861            /**
862            * Returns the layout references for all the layouts that belong to the
863            * company and belong to the portlet that matches the preferences.
864            *
865            * @param companyId the primary key of the company
866            * @param portletId the primary key of the portlet
867            * @param preferencesKey the portlet's preference key
868            * @param preferencesValue the portlet's preference value
869            * @return the layout references of the matching layouts
870            * @throws SystemException if a system exception occurred
871            */
872            public static com.liferay.portal.model.LayoutReference[] getLayouts(
873                    long companyId, java.lang.String portletId,
874                    java.lang.String preferencesKey, java.lang.String preferencesValue)
875                    throws com.liferay.portal.kernel.exception.SystemException {
876                    return getService()
877                                       .getLayouts(companyId, portletId, preferencesKey,
878                            preferencesValue);
879            }
880    
881            public static int getLayoutsByLayoutPrototypeUuidCount(
882                    java.lang.String layoutPrototypeUuid)
883                    throws com.liferay.portal.kernel.exception.SystemException {
884                    return getService()
885                                       .getLayoutsByLayoutPrototypeUuidCount(layoutPrototypeUuid);
886            }
887    
888            public static int getLayoutsCount(com.liferay.portal.model.Group group,
889                    boolean privateLayout)
890                    throws com.liferay.portal.kernel.exception.PortalException,
891                            com.liferay.portal.kernel.exception.SystemException {
892                    return getService().getLayoutsCount(group, privateLayout);
893            }
894    
895            public static int getLayoutsCount(com.liferay.portal.model.User user,
896                    boolean privateLayout)
897                    throws com.liferay.portal.kernel.exception.PortalException,
898                            com.liferay.portal.kernel.exception.SystemException {
899                    return getService().getLayoutsCount(user, privateLayout);
900            }
901    
902            /**
903            * Returns the primary key to use for the next layout.
904            *
905            * @param groupId the primary key of the group
906            * @param privateLayout whether the layout is private to the group
907            * @return the primary key to use for the next layout
908            * @throws SystemException if a system exception occurred
909            */
910            public static long getNextLayoutId(long groupId, boolean privateLayout)
911                    throws com.liferay.portal.kernel.exception.SystemException {
912                    return getService().getNextLayoutId(groupId, privateLayout);
913            }
914    
915            /**
916            * Returns all the layouts whose friendly URLs are <code>null</code>
917            *
918            * @return all the layouts whose friendly URLs are <code>null</code>
919            * @throws SystemException if a system exception occurred
920            */
921            public static java.util.List<com.liferay.portal.model.Layout> getNullFriendlyURLLayouts()
922                    throws com.liferay.portal.kernel.exception.SystemException {
923                    return getService().getNullFriendlyURLLayouts();
924            }
925    
926            /**
927            * Returns all the layouts within scope of the group
928            *
929            * @param groupId the primary key of the group
930            * @param privateLayout whether the layout is private to the group
931            * @return the layouts within scope of the group
932            * @throws SystemException if a system exception occurred
933            */
934            public static java.util.List<com.liferay.portal.model.Layout> getScopeGroupLayouts(
935                    long groupId, boolean privateLayout)
936                    throws com.liferay.portal.kernel.exception.SystemException {
937                    return getService().getScopeGroupLayouts(groupId, privateLayout);
938            }
939    
940            public static boolean hasLayouts(com.liferay.portal.model.Group group,
941                    boolean privateLayout)
942                    throws com.liferay.portal.kernel.exception.PortalException,
943                            com.liferay.portal.kernel.exception.SystemException {
944                    return getService().hasLayouts(group, privateLayout);
945            }
946    
947            /**
948            * Returns <code>true</code> if the group has any layouts;
949            * <code>false</code> otherwise.
950            *
951            * @param groupId the primary key of the group
952            * @param privateLayout whether the layout is private to the group
953            * @param parentLayoutId the primary key of the parent layout
954            * @return <code>true</code> if the group has any layouts;
955            <code>false</code> otherwise
956            * @throws SystemException if a system exception occurred
957            */
958            public static boolean hasLayouts(long groupId, boolean privateLayout,
959                    long parentLayoutId)
960                    throws com.liferay.portal.kernel.exception.SystemException {
961                    return getService().hasLayouts(groupId, privateLayout, parentLayoutId);
962            }
963    
964            public static boolean hasLayouts(com.liferay.portal.model.User user,
965                    boolean privateLayout)
966                    throws com.liferay.portal.kernel.exception.PortalException,
967                            com.liferay.portal.kernel.exception.SystemException {
968                    return getService().hasLayouts(user, privateLayout);
969            }
970    
971            public static boolean hasLayoutSetPrototypeLayout(
972                    long layoutSetPrototypeId, java.lang.String layoutUuid)
973                    throws com.liferay.portal.kernel.exception.PortalException,
974                            com.liferay.portal.kernel.exception.SystemException {
975                    return getService()
976                                       .hasLayoutSetPrototypeLayout(layoutSetPrototypeId, layoutUuid);
977            }
978    
979            public static boolean hasLayoutSetPrototypeLayout(
980                    java.lang.String layoutSetPrototypeUuid, java.lang.String layoutUuid)
981                    throws com.liferay.portal.kernel.exception.PortalException,
982                            com.liferay.portal.kernel.exception.SystemException {
983                    return getService()
984                                       .hasLayoutSetPrototypeLayout(layoutSetPrototypeUuid,
985                            layoutUuid);
986            }
987    
988            /**
989            * Imports the layouts from the byte array.
990            *
991            * @param userId the primary key of the user
992            * @param groupId the primary key of the group
993            * @param privateLayout whether the layout is private to the group
994            * @param parameterMap the mapping of parameters indicating which
995            information will be imported. For information on the keys used in
996            the map see {@link
997            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}.
998            * @param bytes the byte array with the data
999            * @throws PortalException if a group or user with the primary key could not
1000            be found, or if some other portal exception occurred
1001            * @throws SystemException if a system exception occurred
1002            * @see com.liferay.portal.lar.LayoutImporter
1003            */
1004            public static void importLayouts(long userId, long groupId,
1005                    boolean privateLayout,
1006                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
1007                    byte[] bytes)
1008                    throws com.liferay.portal.kernel.exception.PortalException,
1009                            com.liferay.portal.kernel.exception.SystemException {
1010                    getService()
1011                            .importLayouts(userId, groupId, privateLayout, parameterMap, bytes);
1012            }
1013    
1014            /**
1015            * Imports the layouts from the file.
1016            *
1017            * @param userId the primary key of the user
1018            * @param groupId the primary key of the group
1019            * @param privateLayout whether the layout is private to the group
1020            * @param parameterMap the mapping of parameters indicating which
1021            information will be imported. For information on the keys used in
1022            the map see {@link
1023            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}.
1024            * @param file the LAR file with the data
1025            * @throws PortalException if a group or user with the primary key could not
1026            be found, or if some other portal exception occurred
1027            * @throws SystemException if a system exception occurred
1028            * @see com.liferay.portal.lar.LayoutImporter
1029            */
1030            public static void importLayouts(long userId, long groupId,
1031                    boolean privateLayout,
1032                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
1033                    java.io.File file)
1034                    throws com.liferay.portal.kernel.exception.PortalException,
1035                            com.liferay.portal.kernel.exception.SystemException {
1036                    getService()
1037                            .importLayouts(userId, groupId, privateLayout, parameterMap, file);
1038            }
1039    
1040            /**
1041            * Imports the layouts from the input stream.
1042            *
1043            * @param userId the primary key of the user
1044            * @param groupId the primary key of the group
1045            * @param privateLayout whether the layout is private to the group
1046            * @param parameterMap the mapping of parameters indicating which
1047            information will be imported. For information on the keys used in
1048            the map see {@link
1049            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}.
1050            * @param is the input stream
1051            * @throws PortalException if a group or user with the primary key could not
1052            be found, or if some other portal exception occurred
1053            * @throws SystemException if a system exception occurred
1054            * @see com.liferay.portal.lar.LayoutImporter
1055            */
1056            public static void importLayouts(long userId, long groupId,
1057                    boolean privateLayout,
1058                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
1059                    java.io.InputStream is)
1060                    throws com.liferay.portal.kernel.exception.PortalException,
1061                            com.liferay.portal.kernel.exception.SystemException {
1062                    getService()
1063                            .importLayouts(userId, groupId, privateLayout, parameterMap, is);
1064            }
1065    
1066            /**
1067            * Imports the portlet information (categories, permissions, ... etc.) from
1068            * the file.
1069            *
1070            * @param userId the primary key of the user
1071            * @param plid the primary key of the target layout
1072            * @param groupId the primary key of the target group
1073            * @param portletId the primary key of the portlet
1074            * @param parameterMap the mapping of parameters indicating which
1075            information will be imported. For information on the keys used in
1076            the map see {@link
1077            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}.
1078            * @param file the LAR file with the data
1079            * @throws PortalException if a group, layout, portlet or user with the
1080            primary key could not be found
1081            * @throws SystemException if a system exception occurred
1082            */
1083            public static void importPortletInfo(long userId, long plid, long groupId,
1084                    java.lang.String portletId,
1085                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
1086                    java.io.File file)
1087                    throws com.liferay.portal.kernel.exception.PortalException,
1088                            com.liferay.portal.kernel.exception.SystemException {
1089                    getService()
1090                            .importPortletInfo(userId, plid, groupId, portletId, parameterMap,
1091                            file);
1092            }
1093    
1094            /**
1095            * Imports the portlet information (categories, permissions, ... etc.) from
1096            * the input stream.
1097            *
1098            * @param userId the primary key of the user
1099            * @param plid the primary key of the layout
1100            * @param groupId the primary key of the group
1101            * @param portletId the primary key of the portlet
1102            * @param parameterMap the mapping of parameters indicating which
1103            information will be imported. For information on the keys used in
1104            the map see {@link
1105            com.liferay.portal.kernel.lar.PortletDataHandlerKeys}.
1106            * @param is the input stream
1107            * @throws PortalException if a group, portlet, layout or user with the
1108            primary key could not be found
1109            * @throws SystemException if a system exception occurred
1110            */
1111            public static void importPortletInfo(long userId, long plid, long groupId,
1112                    java.lang.String portletId,
1113                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
1114                    java.io.InputStream is)
1115                    throws com.liferay.portal.kernel.exception.PortalException,
1116                            com.liferay.portal.kernel.exception.SystemException {
1117                    getService()
1118                            .importPortletInfo(userId, plid, groupId, portletId, parameterMap,
1119                            is);
1120            }
1121    
1122            /**
1123            * Sets the layouts for the group, replacing and prioritizing all layouts of
1124            * the parent layout.
1125            *
1126            * @param groupId the primary key of the group
1127            * @param privateLayout whether the layout is private to the group
1128            * @param parentLayoutId the primary key of the parent layout
1129            * @param layoutIds the primary keys of the layouts
1130            * @param serviceContext the service context
1131            * @throws PortalException if a group or layout with the primary key could
1132            not be found, if no layouts were specified, if the first layout
1133            was not page-able, if the first layout was hidden, or if some
1134            other portal exception occurred
1135            * @throws SystemException if a system exception occurred
1136            */
1137            public static void setLayouts(long groupId, boolean privateLayout,
1138                    long parentLayoutId, long[] layoutIds,
1139                    com.liferay.portal.service.ServiceContext serviceContext)
1140                    throws com.liferay.portal.kernel.exception.PortalException,
1141                            com.liferay.portal.kernel.exception.SystemException {
1142                    getService()
1143                            .setLayouts(groupId, privateLayout, parentLayoutId, layoutIds,
1144                            serviceContext);
1145            }
1146    
1147            /**
1148            * Updates the friendly URL of the layout.
1149            *
1150            * @param plid the primary key of the layout
1151            * @param friendlyURL the friendly URL to be assigned
1152            * @return the updated layout
1153            * @throws PortalException if a group or layout with the primary key could
1154            not be found
1155            * @throws SystemException if a system exception occurred
1156            */
1157            public static com.liferay.portal.model.Layout updateFriendlyURL(long plid,
1158                    java.lang.String friendlyURL)
1159                    throws com.liferay.portal.kernel.exception.PortalException,
1160                            com.liferay.portal.kernel.exception.SystemException {
1161                    return getService().updateFriendlyURL(plid, friendlyURL);
1162            }
1163    
1164            /**
1165            * Updates the layout.
1166            *
1167            * @param groupId the primary key of the group
1168            * @param privateLayout whether the layout is private to the group
1169            * @param layoutId the primary key of the layout
1170            * @param parentLayoutId the primary key of the layout's new parent layout
1171            * @param nameMap the locales and localized names to merge (optionally
1172            <code>null</code>)
1173            * @param titleMap the locales and localized titles to merge (optionally
1174            <code>null</code>)
1175            * @param descriptionMap the locales and localized descriptions to merge
1176            (optionally <code>null</code>)
1177            * @param keywordsMap the locales and localized keywords to merge
1178            (optionally <code>null</code>)
1179            * @param robotsMap the locales and localized robots to merge (optionally
1180            <code>null</code>)
1181            * @param type the layout's new type (optionally {@link
1182            com.liferay.portal.model.LayoutConstants#TYPE_PORTLET})
1183            * @param hidden whether the layout is hidden
1184            * @param friendlyURL the layout's new friendly URL (optionally {@link
1185            com.liferay.portal.util.PropsValues#DEFAULT_USER_PRIVATE_LAYOUT_FRIENDLY_URL}
1186            or {@link
1187            com.liferay.portal.util.PropsValues#DEFAULT_USER_PRIVATE_LAYOUT_FRIENDLY_URL}).
1188            The default values can be overridden in
1189            <code>portal-ext.properties</code> by specifying new values for
1190            the corresponding properties defined in {@link
1191            com.liferay.portal.util.PropsValues}. To see how the URL is
1192            normalized when accessed see {@link
1193            com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize(
1194            String)}.
1195            * @param iconImage whether the icon image will be updated
1196            * @param iconBytes the byte array of the layout's new icon image
1197            * @param serviceContext the service context. Can set the modification date
1198            and expando bridge attributes for the layout. For layouts that
1199            are linked to a layout prototype, attributes named
1200            'layoutPrototypeUuid' and 'layoutPrototypeLinkedEnabled' can be
1201            specified to provide the unique identifier of the source
1202            prototype and a boolean to determined whether a link to it should
1203            be enabled to activate propagation of changes made to the linked
1204            page in the prototype.
1205            * @return the updated layout
1206            * @throws PortalException if a group or layout with the primary key could
1207            not be found, if a unique friendly URL could not be generated, if
1208            a valid parent layout ID to use could not be found, or if the
1209            layout parameters were invalid
1210            * @throws SystemException if a system exception occurred
1211            */
1212            public static com.liferay.portal.model.Layout updateLayout(long groupId,
1213                    boolean privateLayout, long layoutId, long parentLayoutId,
1214                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
1215                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
1216                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
1217                    java.util.Map<java.util.Locale, java.lang.String> keywordsMap,
1218                    java.util.Map<java.util.Locale, java.lang.String> robotsMap,
1219                    java.lang.String type, boolean hidden, java.lang.String friendlyURL,
1220                    java.lang.Boolean iconImage, byte[] iconBytes,
1221                    com.liferay.portal.service.ServiceContext serviceContext)
1222                    throws com.liferay.portal.kernel.exception.PortalException,
1223                            com.liferay.portal.kernel.exception.SystemException {
1224                    return getService()
1225                                       .updateLayout(groupId, privateLayout, layoutId,
1226                            parentLayoutId, nameMap, titleMap, descriptionMap, keywordsMap,
1227                            robotsMap, type, hidden, friendlyURL, iconImage, iconBytes,
1228                            serviceContext);
1229            }
1230    
1231            /**
1232            * Updates the layout replacing its type settings.
1233            *
1234            * @param groupId the primary key of the group
1235            * @param privateLayout whether the layout is private to the group
1236            * @param layoutId the primary key of the layout
1237            * @param typeSettings the settings to load the unicode properties object.
1238            See {@link com.liferay.portal.kernel.util.UnicodeProperties
1239            #fastLoad(String)}.
1240            * @return the updated layout
1241            * @throws PortalException if a matching layout could not be found
1242            * @throws SystemException if a system exception occurred
1243            */
1244            public static com.liferay.portal.model.Layout updateLayout(long groupId,
1245                    boolean privateLayout, long layoutId, java.lang.String typeSettings)
1246                    throws com.liferay.portal.kernel.exception.PortalException,
1247                            com.liferay.portal.kernel.exception.SystemException {
1248                    return getService()
1249                                       .updateLayout(groupId, privateLayout, layoutId, typeSettings);
1250            }
1251    
1252            /**
1253            * Updates the look and feel of the layout.
1254            *
1255            * @param groupId the primary key of the group
1256            * @param privateLayout whether the layout is private to the group
1257            * @param layoutId the primary key of the layout
1258            * @param themeId the primary key of the layout's new theme
1259            * @param colorSchemeId the primary key of the layout's new color scheme
1260            * @param css the layout's new CSS
1261            * @param wapTheme whether the theme is for WAP browsers
1262            * @return the updated layout
1263            * @throws PortalException if a matching layout could not be found
1264            * @throws SystemException if a system exception occurred
1265            */
1266            public static com.liferay.portal.model.Layout updateLookAndFeel(
1267                    long groupId, boolean privateLayout, long layoutId,
1268                    java.lang.String themeId, java.lang.String colorSchemeId,
1269                    java.lang.String css, boolean wapTheme)
1270                    throws com.liferay.portal.kernel.exception.PortalException,
1271                            com.liferay.portal.kernel.exception.SystemException {
1272                    return getService()
1273                                       .updateLookAndFeel(groupId, privateLayout, layoutId,
1274                            themeId, colorSchemeId, css, wapTheme);
1275            }
1276    
1277            /**
1278            * Updates the name of the layout.
1279            *
1280            * @param layout the layout to be updated
1281            * @param name the layout's new name
1282            * @param languageId the primary key of the language. For more information
1283            see {@link java.util.Locale}.
1284            * @return the updated layout
1285            * @throws PortalException if the new name was <code>null</code>
1286            * @throws SystemException if a system exception occurred
1287            */
1288            public static com.liferay.portal.model.Layout updateName(
1289                    com.liferay.portal.model.Layout layout, java.lang.String name,
1290                    java.lang.String languageId)
1291                    throws com.liferay.portal.kernel.exception.PortalException,
1292                            com.liferay.portal.kernel.exception.SystemException {
1293                    return getService().updateName(layout, name, languageId);
1294            }
1295    
1296            /**
1297            * Updates the name of the layout matching the group, layout ID, and
1298            * privacy.
1299            *
1300            * @param groupId the primary key of the group
1301            * @param privateLayout whether the layout is private to the group
1302            * @param layoutId the primary key of the layout
1303            * @param name the layout's new name
1304            * @param languageId the primary key of the language. For more information
1305            see {@link java.util.Locale}.
1306            * @return the updated layout
1307            * @throws PortalException if a matching layout could not be found or if the
1308            new name was <code>null</code>
1309            * @throws SystemException if a system exception occurred
1310            */
1311            public static com.liferay.portal.model.Layout updateName(long groupId,
1312                    boolean privateLayout, long layoutId, java.lang.String name,
1313                    java.lang.String languageId)
1314                    throws com.liferay.portal.kernel.exception.PortalException,
1315                            com.liferay.portal.kernel.exception.SystemException {
1316                    return getService()
1317                                       .updateName(groupId, privateLayout, layoutId, name,
1318                            languageId);
1319            }
1320    
1321            /**
1322            * Updates the name of the layout matching the primary key.
1323            *
1324            * @param plid the primary key of the layout
1325            * @param name the name to be assigned
1326            * @param languageId the primary key of the language. For more information
1327            see {@link java.util.Locale}.
1328            * @return the updated layout
1329            * @throws PortalException if a layout with the primary key could not be
1330            found or if the name was <code>null</code>
1331            * @throws SystemException if a system exception occurred
1332            */
1333            public static com.liferay.portal.model.Layout updateName(long plid,
1334                    java.lang.String name, java.lang.String languageId)
1335                    throws com.liferay.portal.kernel.exception.PortalException,
1336                            com.liferay.portal.kernel.exception.SystemException {
1337                    return getService().updateName(plid, name, languageId);
1338            }
1339    
1340            /**
1341            * Updates the parent layout ID of the layout matching the group, layout ID,
1342            * and privacy.
1343            *
1344            * @param groupId the primary key of the group
1345            * @param privateLayout whether the layout is private to the group
1346            * @param layoutId the primary key of the layout
1347            * @param parentLayoutId the primary key to be assigned to the parent
1348            layout
1349            * @return the matching layout
1350            * @throws PortalException if a valid parent layout ID to use could not be
1351            found or if a matching layout could not be found
1352            * @throws SystemException if a system exception occurred
1353            */
1354            public static com.liferay.portal.model.Layout updateParentLayoutId(
1355                    long groupId, boolean privateLayout, long layoutId, long parentLayoutId)
1356                    throws com.liferay.portal.kernel.exception.PortalException,
1357                            com.liferay.portal.kernel.exception.SystemException {
1358                    return getService()
1359                                       .updateParentLayoutId(groupId, privateLayout, layoutId,
1360                            parentLayoutId);
1361            }
1362    
1363            /**
1364            * Updates the parent layout ID of the layout matching the primary key. If a
1365            * layout matching the parent primary key is found, the layout ID of that
1366            * layout is assigned, otherwise {@link
1367            * com.liferay.portal.model.LayoutConstants#DEFAULT_PARENT_LAYOUT_ID} is
1368            * assigned.
1369            *
1370            * @param plid the primary key of the layout
1371            * @param parentPlid the primary key of the parent layout
1372            * @return the layout matching the primary key
1373            * @throws PortalException if a layout with the primary key could not be
1374            found or if a valid parent layout ID to use could not be found
1375            * @throws SystemException if a system exception occurred
1376            */
1377            public static com.liferay.portal.model.Layout updateParentLayoutId(
1378                    long plid, long parentPlid)
1379                    throws com.liferay.portal.kernel.exception.PortalException,
1380                            com.liferay.portal.kernel.exception.SystemException {
1381                    return getService().updateParentLayoutId(plid, parentPlid);
1382            }
1383    
1384            /**
1385            * Updates the priorities of the layouts.
1386            *
1387            * @param groupId the primary key of the group
1388            * @param privateLayout whether the layout is private to the group
1389            * @throws PortalException if a matching layout could not be found
1390            * @throws SystemException if a system exception occurred
1391            */
1392            public static void updatePriorities(long groupId, boolean privateLayout)
1393                    throws com.liferay.portal.kernel.exception.PortalException,
1394                            com.liferay.portal.kernel.exception.SystemException {
1395                    getService().updatePriorities(groupId, privateLayout);
1396            }
1397    
1398            /**
1399            * Updates the priority of the layout.
1400            *
1401            * @param layout the layout to be updated
1402            * @param priority the layout's new priority
1403            * @return the updated layout
1404            * @throws SystemException if a system exception occurred
1405            */
1406            public static com.liferay.portal.model.Layout updatePriority(
1407                    com.liferay.portal.model.Layout layout, int priority)
1408                    throws com.liferay.portal.kernel.exception.SystemException {
1409                    return getService().updatePriority(layout, priority);
1410            }
1411    
1412            /**
1413            * Updates the priority of the layout matching the group, layout ID, and
1414            * privacy.
1415            *
1416            * @param groupId the primary key of the group
1417            * @param privateLayout whether the layout is private to the group
1418            * @param layoutId the primary key of the layout
1419            * @param priority the layout's new priority
1420            * @return the updated layout
1421            * @throws PortalException if a matching layout could not be found
1422            * @throws SystemException if a system exception occurred
1423            */
1424            public static com.liferay.portal.model.Layout updatePriority(long groupId,
1425                    boolean privateLayout, long layoutId, int priority)
1426                    throws com.liferay.portal.kernel.exception.PortalException,
1427                            com.liferay.portal.kernel.exception.SystemException {
1428                    return getService()
1429                                       .updatePriority(groupId, privateLayout, layoutId, priority);
1430            }
1431    
1432            /**
1433            * Updates the priority of the layout matching the primary key.
1434            *
1435            * @param plid the primary key of the layout
1436            * @param priority the layout's new priority
1437            * @return the updated layout
1438            * @throws PortalException if a layout with the primary key could not be
1439            found
1440            * @throws SystemException if a system exception occurred
1441            */
1442            public static com.liferay.portal.model.Layout updatePriority(long plid,
1443                    int priority)
1444                    throws com.liferay.portal.kernel.exception.PortalException,
1445                            com.liferay.portal.kernel.exception.SystemException {
1446                    return getService().updatePriority(plid, priority);
1447            }
1448    
1449            public static void updateScopedPortletNames(long groupId,
1450                    boolean privateLayout, long layoutId,
1451                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
1452                    java.util.List<java.util.Locale> nameMapModifiedLocales)
1453                    throws com.liferay.portal.kernel.exception.PortalException,
1454                            com.liferay.portal.kernel.exception.SystemException {
1455                    getService()
1456                            .updateScopedPortletNames(groupId, privateLayout, layoutId,
1457                            nameMap, nameMapModifiedLocales);
1458            }
1459    
1460            /**
1461            * Updates the names of the portlets within scope of the group, the scope of
1462            * the layout's universally unique identifier, and the privacy.
1463            *
1464            * @param groupId the primary key of the group
1465            * @param privateLayout whether the layout is private to the group
1466            * @param layoutId the primary key of the layout whose universally unique
1467            identifier to match
1468            * @param name the new name for the portlets
1469            * @param languageId the primary key of the language
1470            * @throws PortalException if a matching layout could not be found
1471            * @throws SystemException if a system exception occurred
1472            * @see com.liferay.portlet.portletconfiguration.action.EditScopeAction
1473            */
1474            public static void updateScopedPortletNames(long groupId,
1475                    boolean privateLayout, long layoutId, java.lang.String name,
1476                    java.lang.String languageId)
1477                    throws com.liferay.portal.kernel.exception.PortalException,
1478                            com.liferay.portal.kernel.exception.SystemException {
1479                    getService()
1480                            .updateScopedPortletNames(groupId, privateLayout, layoutId, name,
1481                            languageId);
1482            }
1483    
1484            public static LayoutLocalService getService() {
1485                    if (_service == null) {
1486                            _service = (LayoutLocalService)PortalBeanLocatorUtil.locate(LayoutLocalService.class.getName());
1487    
1488                            ReferenceRegistry.registerReference(LayoutLocalServiceUtil.class,
1489                                    "_service");
1490                    }
1491    
1492                    return _service;
1493            }
1494    
1495            /**
1496             * @deprecated
1497             */
1498            public void setService(LayoutLocalService service) {
1499            }
1500    
1501            private static LayoutLocalService _service;
1502    }