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