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