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