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