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.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.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.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.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.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.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.model.Portlet> getEmbeddedPortlets(); 161 162 public java.util.List<com.liferay.portal.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.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.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.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.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.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.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 public com.liferay.portal.model.ColorScheme getWapColorScheme() 298 throws com.liferay.portal.kernel.exception.PortalException; 299 300 public com.liferay.portal.model.Theme getWapTheme() 301 throws com.liferay.portal.kernel.exception.PortalException; 302 303 /** 304 * Returns <code>true</code> if the given layout ID matches one of the 305 * current layout's hierarchical parents. 306 * 307 * @param layoutId the layout ID to search for in the current layout's 308 parent list 309 * @return <code>true</code> if the given layout ID matches one of the 310 current layout's hierarchical parents; <code>false</code> 311 otherwise 312 */ 313 public boolean hasAncestor(long layoutId) 314 throws com.liferay.portal.kernel.exception.PortalException; 315 316 /** 317 * Returns <code>true</code> if the current layout has child layouts. 318 * 319 * @return <code>true</code> if the current layout has child layouts, 320 <code>false</code> otherwise 321 */ 322 public boolean hasChildren(); 323 324 public boolean hasScopeGroup() 325 throws com.liferay.portal.kernel.exception.PortalException; 326 327 public boolean hasSetModifiedDate(); 328 329 public boolean includeLayoutContent( 330 javax.servlet.http.HttpServletRequest request, 331 javax.servlet.http.HttpServletResponse response) 332 throws java.lang.Exception; 333 334 public boolean isChildSelected(boolean selectable, 335 com.liferay.portal.model.Layout layout) 336 throws com.liferay.portal.kernel.exception.PortalException; 337 338 /** 339 * Returns <code>true</code> if the current layout can be used as a content 340 * display page. 341 * 342 * <p> 343 * A content display page must have an Asset Publisher portlet that is 344 * configured as the default Asset Publisher for the layout. 345 * </p> 346 * 347 * @return <code>true</code> if the current layout can be used as a content 348 display page; <code>false</code> otherwise 349 */ 350 public boolean isContentDisplayPage(); 351 352 /** 353 * Returns <code>true</code> if the current layout is the first layout in 354 * its parent's hierarchical list of children layouts. 355 * 356 * @return <code>true</code> if the current layout is the first layout in 357 its parent's hierarchical list of children layouts; 358 <code>false</code> otherwise 359 */ 360 public boolean isFirstChild(); 361 362 /** 363 * Returns <code>true</code> if the current layout is the topmost parent 364 * layout. 365 * 366 * @return <code>true</code> if the current layout is the topmost parent 367 layout; <code>false</code> otherwise 368 */ 369 public boolean isFirstParent(); 370 371 public boolean isIconImage(); 372 373 /** 374 * Returns <code>true</code> if the current layout utilizes its {@link 375 * LayoutSet}'s look and feel options (e.g. theme and color scheme). 376 * 377 * @return <code>true</code> if the current layout utilizes its layout set's 378 look and feel options; <code>false</code> otherwise 379 */ 380 public boolean isInheritLookAndFeel(); 381 382 public boolean isInheritWapLookAndFeel(); 383 384 /** 385 * Returns <code>true</code> if the current layout is built from a layout 386 * template and still maintains an active connection to it. 387 * 388 * @return <code>true</code> if the current layout is built from a layout 389 template and still maintains an active connection to it; 390 <code>false</code> otherwise 391 */ 392 public boolean isLayoutPrototypeLinkActive(); 393 394 public boolean isPortletEmbedded(java.lang.String portletId); 395 396 /** 397 * Returns <code>true</code> if the current layout is part of the public 398 * {@link LayoutSet}. 399 * 400 * <p> 401 * Note, the returned value reflects the layout's default access options, 402 * not its access permissions. 403 * </p> 404 * 405 * @return <code>true</code> if the current layout is part of the public 406 layout set; <code>false</code> otherwise 407 */ 408 public boolean isPublicLayout(); 409 410 /** 411 * Returns <code>true</code> if the current layout is the root layout. 412 * 413 * @return <code>true</code> if the current layout is the root layout; 414 <code>false</code> otherwise 415 */ 416 public boolean isRootLayout(); 417 418 public boolean isSelected(boolean selectable, 419 com.liferay.portal.model.Layout layout, long ancestorPlid); 420 421 /** 422 * Returns <code>true</code> if the current layout can hold embedded 423 * portlets. 424 * 425 * @return <code>true</code> if the current layout can hold embedded 426 portlets; <code>false</code> otherwise 427 */ 428 public boolean isSupportsEmbeddedPortlets(); 429 430 /** 431 * @deprecated As of 7.0.0, with no direct replacement 432 */ 433 @java.lang.Deprecated() 434 public boolean isTypeArticle(); 435 436 public boolean isTypeControlPanel(); 437 438 public boolean isTypeEmbedded(); 439 440 public boolean isTypeLinkToLayout(); 441 442 public boolean isTypePanel(); 443 444 public boolean isTypePortlet(); 445 446 public boolean isTypeSharedPortlet(); 447 448 public boolean isTypeURL(); 449 450 public boolean matches(javax.servlet.http.HttpServletRequest request, 451 java.lang.String friendlyURL); 452 453 public void setLayoutSet(com.liferay.portal.model.LayoutSet layoutSet); 454 455 public void setTypeSettingsProperties( 456 com.liferay.portal.kernel.util.UnicodeProperties typeSettingsProperties); 457 }