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<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<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<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<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 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<Portlet> getEmbeddedPortlets();
161    
162            public java.util.List<Portlet> getEmbeddedPortlets(long groupId);
163    
164            /**
165            * Returns the layout's friendly URL for the given locale.
166            *
167            * @param locale the locale that the friendly URL should be retrieved for
168            * @return the layout's friendly URL for the given locale
169            */
170            public java.lang.String getFriendlyURL(java.util.Locale locale);
171    
172            /**
173            * Returns the friendly URLs for all configured locales.
174            *
175            * @return the friendly URLs for all configured locales
176            */
177            public java.util.Map<java.util.Locale, java.lang.String> getFriendlyURLMap();
178    
179            public java.lang.String getFriendlyURLsXML();
180    
181            /**
182            * Returns the current layout's group.
183            *
184            * <p>
185            * Group is Liferay's technical name for a site.
186            * </p>
187            *
188            * @return the current layout's group
189            */
190            public Group getGroup()
191                    throws com.liferay.portal.kernel.exception.PortalException;
192    
193            /**
194            * Returns the current layout's HTML title for the given locale, or the
195            * current layout's name for the given locale if no HTML title is
196            * configured.
197            *
198            * @param locale the locale that the HTML title should be retrieved for
199            * @return the current layout's HTML title for the given locale, or the
200            current layout's name for the given locale if no HTML title is
201            configured
202            */
203            public java.lang.String getHTMLTitle(java.util.Locale locale);
204    
205            /**
206            * Returns the current layout's HTML title for the given locale language ID,
207            * or the current layout's name if no HTML title is configured.
208            *
209            * @param localeLanguageId the locale that the HTML title should be
210            retrieved for
211            * @return the current layout's HTML title for the given locale language ID,
212            or the current layout's name if no HTML title is configured
213            */
214            public java.lang.String getHTMLTitle(java.lang.String localeLanguageId);
215    
216            /**
217            * Returns <code>true</code> if the current layout has a configured icon.
218            *
219            * @return <code>true</code> if the current layout has a configured icon;
220            <code>false</code> otherwise
221            */
222            public boolean getIconImage();
223    
224            /**
225            * Returns the current layout's {@link LayoutSet}.
226            *
227            * @return the current layout's layout set
228            */
229            public LayoutSet getLayoutSet()
230                    throws com.liferay.portal.kernel.exception.PortalException;
231    
232            /**
233            * Returns the current layout's {@link LayoutType}.
234            *
235            * @return the current layout's layout type
236            */
237            public LayoutType getLayoutType();
238    
239            /**
240            * Returns the current layout's linked layout.
241            *
242            * @return the current layout's linked layout, or <code>null</code> if no
243            linked layout could be found
244            */
245            public Layout getLinkedToLayout();
246    
247            /**
248            * Returns the current layout's parent plid.
249            *
250            * @return the current layout's parent plid, or <code>0</code> if the
251            current layout is the topmost parent layout
252            */
253            public long getParentPlid()
254                    throws com.liferay.portal.kernel.exception.PortalException;
255    
256            public java.lang.String getRegularURL(
257                    javax.servlet.http.HttpServletRequest request)
258                    throws com.liferay.portal.kernel.exception.PortalException;
259    
260            public java.lang.String getResetLayoutURL(
261                    javax.servlet.http.HttpServletRequest request)
262                    throws com.liferay.portal.kernel.exception.PortalException;
263    
264            public java.lang.String getResetMaxStateURL(
265                    javax.servlet.http.HttpServletRequest request)
266                    throws com.liferay.portal.kernel.exception.PortalException;
267    
268            public Group getScopeGroup()
269                    throws com.liferay.portal.kernel.exception.PortalException;
270    
271            public java.lang.String getTarget();
272    
273            /**
274            * Returns the current layout's theme, or the layout set's theme if no
275            * layout theme is configured.
276            *
277            * @return the current layout's theme, or the layout set's theme if no
278            layout theme is configured
279            */
280            public Theme getTheme()
281                    throws com.liferay.portal.kernel.exception.PortalException;
282    
283            public java.lang.String getThemeSetting(java.lang.String key,
284                    java.lang.String device);
285    
286            public java.lang.String getThemeSetting(java.lang.String key,
287                    java.lang.String device, boolean inheritLookAndFeel);
288    
289            public com.liferay.portal.kernel.util.UnicodeProperties getTypeSettingsProperties();
290    
291            public java.lang.String getTypeSettingsProperty(java.lang.String key);
292    
293            public java.lang.String getTypeSettingsProperty(java.lang.String key,
294                    java.lang.String defaultValue);
295    
296            /**
297            * Returns <code>true</code> if the given layout ID matches one of the
298            * current layout's hierarchical parents.
299            *
300            * @param layoutId the layout ID to search for in the current layout's
301            parent list
302            * @return <code>true</code> if the given layout ID matches one of the
303            current layout's hierarchical parents; <code>false</code>
304            otherwise
305            */
306            public boolean hasAncestor(long layoutId)
307                    throws com.liferay.portal.kernel.exception.PortalException;
308    
309            /**
310            * Returns <code>true</code> if the current layout has child layouts.
311            *
312            * @return <code>true</code> if the current layout has child layouts,
313            <code>false</code> otherwise
314            */
315            public boolean hasChildren();
316    
317            public boolean hasScopeGroup()
318                    throws com.liferay.portal.kernel.exception.PortalException;
319    
320            public boolean hasSetModifiedDate();
321    
322            public boolean includeLayoutContent(
323                    javax.servlet.http.HttpServletRequest request,
324                    javax.servlet.http.HttpServletResponse response)
325                    throws java.lang.Exception;
326    
327            public boolean isChildSelected(boolean selectable, Layout layout)
328                    throws com.liferay.portal.kernel.exception.PortalException;
329    
330            /**
331            * Returns <code>true</code> if the current layout can be used as a content
332            * display page.
333            *
334            * <p>
335            * A content display page must have an Asset Publisher portlet that is
336            * configured as the default Asset Publisher for the layout.
337            * </p>
338            *
339            * @return <code>true</code> if the current layout can be used as a content
340            display page; <code>false</code> otherwise
341            */
342            public boolean isContentDisplayPage();
343    
344            public boolean isCustomizable();
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, Layout layout,
411                    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(LayoutSet layoutSet);
446    
447            public void setTypeSettingsProperties(
448                    com.liferay.portal.kernel.util.UnicodeProperties typeSettingsProperties);
449    }