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