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