001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.kernel.model;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.annotation.ImplementationClassName;
020    import com.liferay.portal.kernel.util.Accessor;
021    
022    /**
023     * The extended model interface for the Layout service. Represents a row in the "Layout" database table, with each column mapped to a property of this class.
024     *
025     * @author Brian Wing Shun Chan
026     * @see LayoutModel
027     * @see com.liferay.portal.model.impl.LayoutImpl
028     * @see com.liferay.portal.model.impl.LayoutModelImpl
029     * @generated
030     */
031    @ImplementationClassName("com.liferay.portal.model.impl.LayoutImpl")
032    @ProviderType
033    public interface Layout extends LayoutModel, PersistedModel {
034            /*
035             * NOTE FOR DEVELOPERS:
036             *
037             * Never modify this interface directly. Add methods to {@link com.liferay.portal.model.impl.LayoutImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
038             */
039            public static final Accessor<Layout, Long> PLID_ACCESSOR = new Accessor<Layout, Long>() {
040                            @Override
041                            public Long get(Layout layout) {
042                                    return layout.getPlid();
043                            }
044    
045                            @Override
046                            public Class<Long> getAttributeClass() {
047                                    return Long.class;
048                            }
049    
050                            @Override
051                            public Class<Layout> getTypeClass() {
052                                    return Layout.class;
053                            }
054                    };
055    
056            public static final Accessor<Layout, Long> LAYOUT_ID_ACCESSOR = new Accessor<Layout, Long>() {
057                            @Override
058                            public Long get(Layout layout) {
059                                    return layout.getLayoutId();
060                            }
061    
062                            @Override
063                            public Class<Long> getAttributeClass() {
064                                    return Long.class;
065                            }
066    
067                            @Override
068                            public Class<Layout> getTypeClass() {
069                                    return Layout.class;
070                            }
071                    };
072    
073            /**
074            * Returns all layouts that are direct or indirect children of the current
075            * layout.
076            *
077            * @return the layouts that are direct or indirect children of the current
078            layout
079            */
080            public java.util.List<com.liferay.portal.kernel.model.Layout> getAllChildren();
081    
082            /**
083            * Returns the ID of the topmost parent layout (e.g. n-th parent layout) of
084            * the current layout.
085            *
086            * @return the ID of the topmost parent layout of the current layout
087            */
088            public long getAncestorLayoutId()
089                    throws com.liferay.portal.kernel.exception.PortalException;
090    
091            /**
092            * Returns the plid of the topmost parent layout (e.g. n-th parent layout)
093            * of the current layout.
094            *
095            * @return the plid of the topmost parent layout of the current layout
096            */
097            public long getAncestorPlid()
098                    throws com.liferay.portal.kernel.exception.PortalException;
099    
100            /**
101            * Returns all parent layouts of the current layout. The list is retrieved
102            * recursively with the direct parent layout listed first, and most distant
103            * parent listed last.
104            *
105            * @return the current layout's list of parent layouts
106            */
107            public java.util.List<com.liferay.portal.kernel.model.Layout> getAncestors()
108                    throws com.liferay.portal.kernel.exception.PortalException;
109    
110            /**
111            * Returns all child layouts of the current layout, independent of user
112            * access permissions.
113            *
114            * @return the list of all child layouts
115            */
116            public java.util.List<com.liferay.portal.kernel.model.Layout> getChildren();
117    
118            /**
119            * Returns all child layouts of the current layout that the user has
120            * permission to access.
121            *
122            * @param permissionChecker the user-specific context to check permissions
123            * @return the list of all child layouts that the user has permission to
124            access
125            */
126            public java.util.List<com.liferay.portal.kernel.model.Layout> getChildren(
127                    com.liferay.portal.kernel.security.permission.PermissionChecker permissionChecker)
128                    throws com.liferay.portal.kernel.exception.PortalException;
129    
130            /**
131            * Returns the color scheme that is configured for the current layout, or
132            * the color scheme of the layout set that contains the current layout if no
133            * color scheme is configured.
134            *
135            * @return the color scheme that is configured for the current layout, or
136            the color scheme  of the layout set that contains the current
137            layout if no color scheme is configured
138            */
139            public com.liferay.portal.kernel.model.ColorScheme getColorScheme()
140                    throws com.liferay.portal.kernel.exception.PortalException;
141    
142            /**
143            * Returns the CSS text for the current layout, or for the layout set if no
144            * CSS text is configured in the current layout.
145            *
146            * <p>
147            * Layouts and layout sets can configure CSS that is applied in addition to
148            * the theme's CSS.
149            * </p>
150            *
151            * @return the CSS text for the current layout, or for the layout set if no
152            CSS text is configured in the current layout
153            */
154            public java.lang.String getCssText()
155                    throws com.liferay.portal.kernel.exception.PortalException;
156    
157            public java.lang.String getDefaultThemeSetting(java.lang.String key,
158                    java.lang.String device, boolean inheritLookAndFeel);
159    
160            public java.util.List<com.liferay.portal.kernel.model.Portlet> getEmbeddedPortlets();
161    
162            public java.util.List<com.liferay.portal.kernel.model.Portlet> getEmbeddedPortlets(
163                    long groupId);
164    
165            /**
166            * Returns the layout's friendly URL for the given locale.
167            *
168            * @param locale the locale that the friendly URL should be retrieved for
169            * @return the layout's friendly URL for the given locale
170            */
171            public java.lang.String getFriendlyURL(java.util.Locale locale);
172    
173            /**
174            * Returns the friendly URLs for all configured locales.
175            *
176            * @return the friendly URLs for all configured locales
177            */
178            public java.util.Map<java.util.Locale, java.lang.String> getFriendlyURLMap();
179    
180            public java.lang.String getFriendlyURLsXML();
181    
182            /**
183            * Returns the current layout's group.
184            *
185            * <p>
186            * Group is Liferay's technical name for a site.
187            * </p>
188            *
189            * @return the current layout's group
190            */
191            public com.liferay.portal.kernel.model.Group getGroup()
192                    throws com.liferay.portal.kernel.exception.PortalException;
193    
194            /**
195            * Returns the current layout's HTML title for the given locale, or the
196            * current layout's name for the given locale if no HTML title is
197            * configured.
198            *
199            * @param locale the locale that the HTML title should be retrieved for
200            * @return the current layout's HTML title for the given locale, or the
201            current layout's name for the given locale if no HTML title is
202            configured
203            */
204            public java.lang.String getHTMLTitle(java.util.Locale locale);
205    
206            /**
207            * Returns the current layout's HTML title for the given locale language ID,
208            * or the current layout's name if no HTML title is configured.
209            *
210            * @param localeLanguageId the locale that the HTML title should be
211            retrieved for
212            * @return the current layout's HTML title for the given locale language ID,
213            or the current layout's name if no HTML title is configured
214            */
215            public java.lang.String getHTMLTitle(java.lang.String localeLanguageId);
216    
217            /**
218            * Returns <code>true</code> if the current layout has a configured icon.
219            *
220            * @return <code>true</code> if the current layout has a configured icon;
221            <code>false</code> otherwise
222            */
223            public boolean getIconImage();
224    
225            /**
226            * Returns the current layout's {@link LayoutSet}.
227            *
228            * @return the current layout's layout set
229            */
230            public com.liferay.portal.kernel.model.LayoutSet getLayoutSet()
231                    throws com.liferay.portal.kernel.exception.PortalException;
232    
233            /**
234            * Returns the current layout's {@link LayoutType}.
235            *
236            * @return the current layout's layout type
237            */
238            public com.liferay.portal.kernel.model.LayoutType getLayoutType();
239    
240            /**
241            * Returns the current layout's linked layout.
242            *
243            * @return the current layout's linked layout, or <code>null</code> if no
244            linked layout could be found
245            */
246            public com.liferay.portal.kernel.model.Layout getLinkedToLayout();
247    
248            /**
249            * Returns the current layout's parent plid.
250            *
251            * @return the current layout's parent plid, or <code>0</code> if the
252            current layout is the topmost parent layout
253            */
254            public long getParentPlid()
255                    throws com.liferay.portal.kernel.exception.PortalException;
256    
257            public java.lang.String getRegularURL(
258                    javax.servlet.http.HttpServletRequest request)
259                    throws com.liferay.portal.kernel.exception.PortalException;
260    
261            public java.lang.String getResetLayoutURL(
262                    javax.servlet.http.HttpServletRequest request)
263                    throws com.liferay.portal.kernel.exception.PortalException;
264    
265            public java.lang.String getResetMaxStateURL(
266                    javax.servlet.http.HttpServletRequest request)
267                    throws com.liferay.portal.kernel.exception.PortalException;
268    
269            public com.liferay.portal.kernel.model.Group getScopeGroup()
270                    throws com.liferay.portal.kernel.exception.PortalException;
271    
272            public java.lang.String getTarget();
273    
274            /**
275            * Returns the current layout's theme, or the layout set's theme if no
276            * layout theme is configured.
277            *
278            * @return the current layout's theme, or the layout set's theme if no
279            layout theme is configured
280            */
281            public com.liferay.portal.kernel.model.Theme getTheme()
282                    throws com.liferay.portal.kernel.exception.PortalException;
283    
284            public java.lang.String getThemeSetting(java.lang.String key,
285                    java.lang.String device);
286    
287            public java.lang.String getThemeSetting(java.lang.String key,
288                    java.lang.String device, boolean inheritLookAndFeel);
289    
290            public com.liferay.portal.kernel.util.UnicodeProperties getTypeSettingsProperties();
291    
292            public java.lang.String getTypeSettingsProperty(java.lang.String key);
293    
294            public java.lang.String getTypeSettingsProperty(java.lang.String key,
295                    java.lang.String defaultValue);
296    
297            /**
298            * Returns <code>true</code> if the given layout ID matches one of the
299            * current layout's hierarchical parents.
300            *
301            * @param layoutId the layout ID to search for in the current layout's
302            parent list
303            * @return <code>true</code> if the given layout ID matches one of the
304            current layout's hierarchical parents; <code>false</code>
305            otherwise
306            */
307            public boolean hasAncestor(long layoutId)
308                    throws com.liferay.portal.kernel.exception.PortalException;
309    
310            /**
311            * Returns <code>true</code> if the current layout has child layouts.
312            *
313            * @return <code>true</code> if the current layout has child layouts,
314            <code>false</code> otherwise
315            */
316            public boolean hasChildren();
317    
318            public boolean hasScopeGroup()
319                    throws com.liferay.portal.kernel.exception.PortalException;
320    
321            public boolean hasSetModifiedDate();
322    
323            public boolean includeLayoutContent(
324                    javax.servlet.http.HttpServletRequest request,
325                    javax.servlet.http.HttpServletResponse response)
326                    throws java.lang.Exception;
327    
328            public boolean isChildSelected(boolean selectable,
329                    com.liferay.portal.kernel.model.Layout layout)
330                    throws com.liferay.portal.kernel.exception.PortalException;
331    
332            /**
333            * Returns <code>true</code> if the current layout can be used as a content
334            * display page.
335            *
336            * <p>
337            * A content display page must have an Asset Publisher portlet that is
338            * configured as the default Asset Publisher for the layout.
339            * </p>
340            *
341            * @return <code>true</code> if the current layout can be used as a content
342            display page; <code>false</code> otherwise
343            */
344            public boolean isContentDisplayPage();
345    
346            /**
347            * Returns <code>true</code> if the current layout is the first layout in
348            * its parent's hierarchical list of children layouts.
349            *
350            * @return <code>true</code> if the current layout is the first layout in
351            its parent's hierarchical list of children layouts;
352            <code>false</code> otherwise
353            */
354            public boolean isFirstChild();
355    
356            /**
357            * Returns <code>true</code> if the current layout is the topmost parent
358            * layout.
359            *
360            * @return <code>true</code> if the current layout is the topmost parent
361            layout; <code>false</code> otherwise
362            */
363            public boolean isFirstParent();
364    
365            public boolean isIconImage();
366    
367            /**
368            * Returns <code>true</code> if the current layout utilizes its {@link
369            * LayoutSet}'s look and feel options (e.g. theme and color scheme).
370            *
371            * @return <code>true</code> if the current layout utilizes its layout set's
372            look and feel options; <code>false</code> otherwise
373            */
374            public boolean isInheritLookAndFeel();
375    
376            /**
377            * Returns <code>true</code> if the current layout is built from a layout
378            * template and still maintains an active connection to it.
379            *
380            * @return <code>true</code> if the current layout is built from a layout
381            template and still maintains an active connection to it;
382            <code>false</code> otherwise
383            */
384            public boolean isLayoutPrototypeLinkActive();
385    
386            public boolean isPortletEmbedded(java.lang.String portletId, long groupId);
387    
388            /**
389            * Returns <code>true</code> if the current layout is part of the public
390            * {@link LayoutSet}.
391            *
392            * <p>
393            * Note, the returned value reflects the layout's default access options,
394            * not its access permissions.
395            * </p>
396            *
397            * @return <code>true</code> if the current layout is part of the public
398            layout set; <code>false</code> otherwise
399            */
400            public boolean isPublicLayout();
401    
402            /**
403            * Returns <code>true</code> if the current layout is the root layout.
404            *
405            * @return <code>true</code> if the current layout is the root layout;
406            <code>false</code> otherwise
407            */
408            public boolean isRootLayout();
409    
410            public boolean isSelected(boolean selectable,
411                    com.liferay.portal.kernel.model.Layout layout, long ancestorPlid);
412    
413            /**
414            * Returns <code>true</code> if the current layout can hold embedded
415            * portlets.
416            *
417            * @return <code>true</code> if the current layout can hold embedded
418            portlets; <code>false</code> otherwise
419            */
420            public boolean isSupportsEmbeddedPortlets();
421    
422            /**
423            * @deprecated As of 7.0.0, with no direct replacement
424            */
425            @java.lang.Deprecated()
426            public boolean isTypeArticle();
427    
428            public boolean isTypeControlPanel();
429    
430            public boolean isTypeEmbedded();
431    
432            public boolean isTypeLinkToLayout();
433    
434            public boolean isTypePanel();
435    
436            public boolean isTypePortlet();
437    
438            public boolean isTypeSharedPortlet();
439    
440            public boolean isTypeURL();
441    
442            public boolean matches(javax.servlet.http.HttpServletRequest request,
443                    java.lang.String friendlyURL);
444    
445            public void setLayoutSet(
446                    com.liferay.portal.kernel.model.LayoutSet layoutSet);
447    
448            public void setTypeSettingsProperties(
449                    com.liferay.portal.kernel.util.UnicodeProperties typeSettingsProperties);
450    }