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.model;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.util.Accessor;
020    
021    /**
022     * 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.
023     *
024     * @author Brian Wing Shun Chan
025     * @see LayoutModel
026     * @see com.liferay.portal.model.impl.LayoutImpl
027     * @see com.liferay.portal.model.impl.LayoutModelImpl
028     * @generated
029     */
030    @ProviderType
031    public interface Layout extends LayoutModel, PersistedModel {
032            /*
033             * NOTE FOR DEVELOPERS:
034             *
035             * 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.
036             */
037            public static final Accessor<Layout, Long> PLID_ACCESSOR = new Accessor<Layout, Long>() {
038                            @Override
039                            public Long get(Layout layout) {
040                                    return layout.getPlid();
041                            }
042    
043                            @Override
044                            public Class<Long> getAttributeClass() {
045                                    return Long.class;
046                            }
047    
048                            @Override
049                            public Class<Layout> getTypeClass() {
050                                    return Layout.class;
051                            }
052                    };
053    
054            public static final Accessor<Layout, Long> LAYOUT_ID_ACCESSOR = new Accessor<Layout, Long>() {
055                            @Override
056                            public Long get(Layout layout) {
057                                    return layout.getLayoutId();
058                            }
059    
060                            @Override
061                            public Class<Long> getAttributeClass() {
062                                    return Long.class;
063                            }
064    
065                            @Override
066                            public Class<Layout> getTypeClass() {
067                                    return Layout.class;
068                            }
069                    };
070    
071            /**
072            * Returns all layouts that are direct or indirect children of the current
073            * layout.
074            *
075            * @return the layouts that are direct or indirect children of the current
076            layout
077            */
078            public java.util.List<com.liferay.portal.model.Layout> getAllChildren();
079    
080            /**
081            * Returns the ID of the topmost parent layout (e.g. n-th parent layout) of
082            * the current layout.
083            *
084            * @return the ID of the topmost parent layout of the current layout
085            * @throws PortalException if a matching layout could not be found
086            */
087            public long getAncestorLayoutId()
088                    throws com.liferay.portal.kernel.exception.PortalException;
089    
090            /**
091            * Returns the plid of the topmost parent layout (e.g. n-th parent layout)
092            * of the current layout.
093            *
094            * @return the plid of the topmost parent layout of the current layout
095            * @throws PortalException if a matching layout could not be found
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            * @throws PortalException if a matching layout could not be found
107            */
108            public java.util.List<com.liferay.portal.model.Layout> getAncestors()
109                    throws com.liferay.portal.kernel.exception.PortalException;
110    
111            /**
112            * Returns all child layouts of the current layout, independent of user
113            * access permissions.
114            *
115            * @return the list of all child layouts
116            */
117            public java.util.List<com.liferay.portal.model.Layout> getChildren();
118    
119            /**
120            * Returns all child layouts of the current layout that the user has
121            * permission to access.
122            *
123            * @param permissionChecker the user-specific context to check permissions
124            * @return the list of all child layouts that the user has permission to
125            access
126            * @throws PortalException if a portal exception occurred
127            */
128            public java.util.List<com.liferay.portal.model.Layout> getChildren(
129                    com.liferay.portal.security.permission.PermissionChecker permissionChecker)
130                    throws com.liferay.portal.kernel.exception.PortalException;
131    
132            /**
133            * Returns the color scheme that is configured for the current layout, or
134            * the color scheme of the layout set that contains the current layout if no
135            * color scheme is configured.
136            *
137            * @return the color scheme that is configured for the current layout, or
138            the color scheme  of the layout set that contains the current
139            layout if no color scheme is configured
140            * @throws PortalException if a portal exception occurred
141            */
142            public com.liferay.portal.model.ColorScheme getColorScheme()
143                    throws com.liferay.portal.kernel.exception.PortalException;
144    
145            /**
146            * Returns the CSS text for the current layout, or for the layout set if no
147            * CSS text is configured in the current layout.
148            *
149            * <p>
150            * Layouts and layout sets can configure CSS that is applied in addition to
151            * the theme's CSS.
152            * </p>
153            *
154            * @return the CSS text for the current layout, or for the layout set if no
155            CSS text is configured in the current layout
156            * @throws PortalException if a portal exception occurred
157            */
158            public java.lang.String getCssText()
159                    throws com.liferay.portal.kernel.exception.PortalException;
160    
161            public java.lang.String getDefaultThemeSetting(java.lang.String key,
162                    java.lang.String device, boolean inheritLookAndFeel);
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            * @throws PortalException if a group with the primary key could not be
190            found
191            */
192            public com.liferay.portal.model.Group getGroup()
193                    throws com.liferay.portal.kernel.exception.PortalException;
194    
195            /**
196            * Returns the current layout's HTML title for the given locale, or the
197            * current layout's name for the given locale if no HTML title is
198            * configured.
199            *
200            * @param locale the locale that the HTML title should be retrieved for
201            * @return the current layout's HTML title for the given locale, or the
202            current layout's name for the given locale if no HTML title is
203            configured
204            */
205            public java.lang.String getHTMLTitle(java.util.Locale locale);
206    
207            /**
208            * Returns the current layout's HTML title for the given locale language ID,
209            * or the current layout's name if no HTML title is configured.
210            *
211            * @param localeLanguageId the locale that the HTML title should be
212            retrieved for
213            * @return the current layout's HTML title for the given locale language ID,
214            or the current layout's name if no HTML title is configured
215            */
216            public java.lang.String getHTMLTitle(java.lang.String localeLanguageId);
217    
218            /**
219            * Returns <code>true</code> if the current layout has a configured icon.
220            *
221            * @return <code>true</code> if the current layout has a configured icon;
222            <code>false</code> otherwise
223            */
224            public boolean getIconImage();
225    
226            /**
227            * Returns the current layout's {@link LayoutSet}.
228            *
229            * @return the current layout's layout set
230            * @throws PortalException if a portal exception occurred
231            */
232            public com.liferay.portal.model.LayoutSet getLayoutSet()
233                    throws com.liferay.portal.kernel.exception.PortalException;
234    
235            /**
236            * Returns the current layout's {@link LayoutType}.
237            *
238            * @return the current layout's layout type
239            */
240            public com.liferay.portal.model.LayoutType getLayoutType();
241    
242            /**
243            * Returns the current layout's linked layout.
244            *
245            * @return the current layout's linked layout, or <code>null</code> if no
246            linked layout could be found
247            */
248            public com.liferay.portal.model.Layout getLinkedToLayout();
249    
250            /**
251            * Returns the current layout's parent plid.
252            *
253            * @return the current layout's parent plid, or <code>0</code> if the
254            current layout is the topmost parent layout
255            * @throws PortalException if a matching layout could not be found
256            */
257            public long getParentPlid()
258                    throws com.liferay.portal.kernel.exception.PortalException;
259    
260            public java.lang.String getRegularURL(
261                    javax.servlet.http.HttpServletRequest request)
262                    throws com.liferay.portal.kernel.exception.PortalException;
263    
264            public java.lang.String getResetLayoutURL(
265                    javax.servlet.http.HttpServletRequest request)
266                    throws com.liferay.portal.kernel.exception.PortalException;
267    
268            public java.lang.String getResetMaxStateURL(
269                    javax.servlet.http.HttpServletRequest request)
270                    throws com.liferay.portal.kernel.exception.PortalException;
271    
272            public com.liferay.portal.model.Group getScopeGroup()
273                    throws com.liferay.portal.kernel.exception.PortalException;
274    
275            public java.lang.String getTarget();
276    
277            /**
278            * Returns the current layout's theme, or the layout set's theme if no
279            * layout theme is configured.
280            *
281            * @return the current layout's theme, or the layout set's theme if no
282            layout theme is configured
283            * @throws PortalException if a portal exception occurred
284            */
285            public com.liferay.portal.model.Theme getTheme()
286                    throws com.liferay.portal.kernel.exception.PortalException;
287    
288            public java.lang.String getThemeSetting(java.lang.String key,
289                    java.lang.String device);
290    
291            public java.lang.String getThemeSetting(java.lang.String key,
292                    java.lang.String device, boolean inheritLookAndFeel);
293    
294            public com.liferay.portal.kernel.util.UnicodeProperties getTypeSettingsProperties();
295    
296            public java.lang.String getTypeSettingsProperty(java.lang.String key);
297    
298            public java.lang.String getTypeSettingsProperty(java.lang.String key,
299                    java.lang.String defaultValue);
300    
301            public com.liferay.portal.model.ColorScheme getWapColorScheme()
302                    throws com.liferay.portal.kernel.exception.PortalException;
303    
304            public com.liferay.portal.model.Theme getWapTheme()
305                    throws com.liferay.portal.kernel.exception.PortalException;
306    
307            /**
308            * Returns <code>true</code> if the given layout ID matches one of the
309            * current layout's hierarchical parents.
310            *
311            * @param layoutId the layout ID to search for in the current layout's
312            parent list
313            * @return <code>true</code> if the given layout ID matches one of the
314            current layout's hierarchical parents; <code>false</code>
315            otherwise
316            * @throws PortalException if any one of the current layout's acestors could
317            not be retrieved
318            */
319            public boolean hasAncestor(long layoutId)
320                    throws com.liferay.portal.kernel.exception.PortalException;
321    
322            /**
323            * Returns <code>true</code> if the current layout has child layouts.
324            *
325            * @return <code>true</code> if the current layout has child layouts,
326            <code>false</code> otherwise
327            */
328            public boolean hasChildren();
329    
330            public boolean hasScopeGroup()
331                    throws com.liferay.portal.kernel.exception.PortalException;
332    
333            public boolean hasSetModifiedDate();
334    
335            public boolean includeLayoutContent(
336                    javax.servlet.http.HttpServletRequest request,
337                    javax.servlet.http.HttpServletResponse response)
338                    throws java.lang.Exception;
339    
340            public boolean isChildSelected(boolean selectable,
341                    com.liferay.portal.model.Layout layout)
342                    throws com.liferay.portal.kernel.exception.PortalException;
343    
344            /**
345            * Returns <code>true</code> if the current layout can be used as a content
346            * display page.
347            *
348            * <p>
349            * A content display page must have an Asset Publisher portlet that is
350            * configured as the default Asset Publisher for the layout.
351            * </p>
352            *
353            * @return <code>true</code> if the current layout can be used as a content
354            display page; <code>false</code> otherwise
355            */
356            public boolean isContentDisplayPage();
357    
358            /**
359            * Returns <code>true</code> if the current layout is the first layout in
360            * its parent's hierarchical list of children layouts.
361            *
362            * @return <code>true</code> if the current layout is the first layout in
363            its parent's hierarchical list of children layouts;
364            <code>false</code> otherwise
365            */
366            public boolean isFirstChild();
367    
368            /**
369            * Returns <code>true</code> if the current layout is the topmost parent
370            * layout.
371            *
372            * @return <code>true</code> if the current layout is the topmost parent
373            layout; <code>false</code> otherwise
374            */
375            public boolean isFirstParent();
376    
377            public boolean isIconImage();
378    
379            /**
380            * Returns <code>true</code> if the current layout utilizes its {@link
381            * LayoutSet}'s look and feel options (e.g. theme and color scheme).
382            *
383            * @return <code>true</code> if the current layout utilizes its layout set's
384            look and feel options; <code>false</code> otherwise
385            */
386            public boolean isInheritLookAndFeel();
387    
388            public boolean isInheritWapLookAndFeel();
389    
390            /**
391            * Returns <code>true</code> if the current layout is built from a layout
392            * template and still maintains an active connection to it.
393            *
394            * @return <code>true</code> if the current layout is built from a layout
395            template and still maintains an active connection to it;
396            <code>false</code> otherwise
397            */
398            public boolean isLayoutPrototypeLinkActive();
399    
400            /**
401            * Returns <code>true</code> if the current layout is part of the public
402            * {@link LayoutSet}.
403            *
404            * <p>
405            * Note, the returned value reflects the layout's default access options,
406            * not its access permissions.
407            * </p>
408            *
409            * @return <code>true</code> if the current layout is part of the public
410            layout set; <code>false</code> otherwise
411            */
412            public boolean isPublicLayout();
413    
414            /**
415            * Returns <code>true</code> if the current layout is the root layout.
416            *
417            * @return <code>true</code> if the current layout is the root layout;
418            <code>false</code> otherwise
419            */
420            public boolean isRootLayout();
421    
422            public boolean isSelected(boolean selectable,
423                    com.liferay.portal.model.Layout layout, long ancestorPlid);
424    
425            /**
426            * Returns <code>true</code> if the current layout can hold embedded
427            * portlets.
428            *
429            * @return <code>true</code> if the current layout can hold embedded
430            portlets; <code>false</code> otherwise
431            */
432            public boolean isSupportsEmbeddedPortlets();
433    
434            /**
435            * @deprecated As of 7.0.0, with no direct replacement
436            */
437            @java.lang.Deprecated()
438            public boolean isTypeArticle();
439    
440            public boolean isTypeControlPanel();
441    
442            public boolean isTypeEmbedded();
443    
444            public boolean isTypeLinkToLayout();
445    
446            public boolean isTypePanel();
447    
448            public boolean isTypePortlet();
449    
450            public boolean isTypeURL();
451    
452            public boolean matches(javax.servlet.http.HttpServletRequest request,
453                    java.lang.String friendlyURL);
454    
455            public void setLayoutSet(com.liferay.portal.model.LayoutSet layoutSet);
456    
457            public void setTypeSettingsProperties(
458                    com.liferay.portal.kernel.util.UnicodeProperties typeSettingsProperties);
459    }