Package com.liferay.portal.kernel.model
Interface Layout
- All Superinterfaces:
AttachedModel
,AuditedModel
,BaseModel<Layout>
,ClassedModel
,Cloneable
,Comparable<Layout>
,CTModel<Layout>
,ExternalReferenceCodeModel
,GroupedModel
,LayoutModel
,LocalizedModel
,MVCCModel
,PersistedModel
,Serializable
,ShardedModel
,StagedGroupedModel
,StagedModel
,TypedModel
,WorkflowedModel
- All Known Implementing Classes:
LayoutWrapper
,VirtualLayout
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.
- Author:
- Brian Wing Shun Chan
- See Also:
- {$generated.description}
-
Field Summary
FieldsModifier and TypeFieldDescription -
Method Summary
Modifier and TypeMethodDescriptionReturns all layouts that are direct or indirect children of the current layout.long
Returns the ID of the topmost parent layout (e.g. n-th parent layout) of the current layout.long
Returns the plid of the topmost parent layout (e.g. n-th parent layout) of the current layout.Returns all parent layouts of the current layout.getBreadcrumb
(Locale locale) Returns all child layouts of the current layout, independent of user access permissions.getChildren
(PermissionChecker permissionChecker) Returns all child layouts of the current layout that the user has permission to access.Returns the color scheme that is configured for the current layout, or the color scheme of the layout set that contains the current layout if no color scheme is configured.Returns the CSS text for the current layout, or for the layout set if no CSS text is configured in the current layout.getDefaultThemeSetting
(String key, String device, boolean inheritLookAndFeel) getEmbeddedPortlets
(long groupId) getFriendlyURL
(Locale locale) Returns the layout's friendly URL for the given locale.Returns the friendly URLs for all configured locales.getGroup()
Returns the current layout's group.getHTMLTitle
(String localeLanguageId) Returns the current layout's HTML title for the given locale language ID, or the current layout's name if no HTML title is configured.getHTMLTitle
(Locale locale) Returns the current layout's HTML title for the given locale, or the current layout's name for the given locale if no HTML title is configured.getIcon()
boolean
Returnstrue
if the current layout has a configured icon.Returns the current layout'sLayoutSet
.Returns the current layout'sLayoutType
.Returns the current layout's linked layout.getRegularURL
(javax.servlet.http.HttpServletRequest httpServletRequest) getResetLayoutURL
(javax.servlet.http.HttpServletRequest httpServletRequest) getResetMaxStateURL
(javax.servlet.http.HttpServletRequest httpServletRequest) getTheme()
Returns the current layout's theme, or the layout set's theme if no layout theme is configured.getThemeSetting
(String key, String device) getThemeSetting
(String key, String device, boolean inheritLookAndFeel) getTypeSettingsProperty
(String key, String defaultValue) boolean
hasAncestor
(long layoutId) Returnstrue
if the given layout ID matches one of the current layout's hierarchical parents.boolean
Returnstrue
if the current layout has child layouts.boolean
boolean
boolean
includeLayoutContent
(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) boolean
isChildSelected
(boolean selectable, Layout layout) boolean
Returnstrue
if the current layout can be used as a content display page.boolean
boolean
boolean
boolean
Returnstrue
if the current layout is the first layout in its parent's hierarchical list of children layouts.boolean
Returnstrue
if the current layout is the topmost parent layout.boolean
boolean
Returnstrue
if the current layout utilizes itsLayoutSet
's look and feel options (e.g. theme and color scheme).boolean
boolean
Returnstrue
if the current layout is built from a layout template and still maintains an active connection to it.boolean
boolean
boolean
isPortletEmbedded
(String portletId, long groupId) boolean
Returnstrue
if the current layout is part of the publicLayoutSet
.boolean
boolean
Returnstrue
if the current layout is the root layout.boolean
isSelected
(boolean selectable, Layout layout, long ancestorPlid) boolean
Returnstrue
if the current layout can hold embedded portlets.boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
isUnlocked
(String mode, long userId) boolean
void
setLayoutSet
(LayoutSet layoutSet) void
setTypeSettingsProperties
(UnicodeProperties typeSettingsUnicodeProperties) Methods inherited from interface com.liferay.portal.kernel.model.BaseModel
clone, getAttributeGetterFunctions, getAttributeSetterBiConsumers, getExpandoBridge, getModelAttributes, getPrimaryKeyObj, isCachedModel, isEntityCacheEnabled, isEscapedModel, isFinderCacheEnabled, isNew, resetOriginalValues, setCachedModel, setExpandoBridgeAttributes, setExpandoBridgeAttributes, setExpandoBridgeAttributes, setModelAttributes, setNew, setPrimaryKeyObj, toCacheModel, toEscapedModel, toUnescapedModel
Methods inherited from interface com.liferay.portal.kernel.model.ClassedModel
getModelClass, getModelClassName
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface com.liferay.portal.kernel.model.LayoutModel
cloneWithOriginalValues, getAvailableLanguageIds, getClassName, getClassNameId, getClassPK, getColorSchemeId, getCompanyId, getCreateDate, getCss, getCtCollectionId, getDefaultLanguageId, getDescription, getDescription, getDescription, getDescription, getDescription, getDescriptionCurrentLanguageId, getDescriptionCurrentValue, getDescriptionMap, getExternalReferenceCode, getFaviconFileEntryId, getFriendlyURL, getGroupId, getHidden, getIconImageId, getKeywords, getKeywords, getKeywords, getKeywords, getKeywords, getKeywordsCurrentLanguageId, getKeywordsCurrentValue, getKeywordsMap, getLastPublishDate, getLayoutId, getLayoutPrototypeLinkEnabled, getLayoutPrototypeUuid, getMasterLayoutPlid, getModifiedDate, getMvccVersion, getName, getName, getName, getName, getName, getNameCurrentLanguageId, getNameCurrentValue, getNameMap, getParentLayoutId, getParentPlid, getPlid, getPrimaryKey, getPriority, getPrivateLayout, getPublishDate, getRobots, getRobots, getRobots, getRobots, getRobots, getRobotsCurrentLanguageId, getRobotsCurrentValue, getRobotsMap, getSourcePrototypeLayoutUuid, getStatus, getStatusByUserId, getStatusByUserName, getStatusByUserUuid, getStatusDate, getStyleBookEntryId, getSystem, getThemeId, getTitle, getTitle, getTitle, getTitle, getTitle, getTitleCurrentLanguageId, getTitleCurrentValue, getTitleMap, getType, getTypeSettings, getUserId, getUserName, getUserUuid, getUuid, isApproved, isDenied, isDraft, isExpired, isHidden, isInactive, isIncomplete, isLayoutPrototypeLinkEnabled, isPending, isPrivateLayout, isScheduled, isSystem, prepareLocalizedFieldsForImport, prepareLocalizedFieldsForImport, setClassName, setClassNameId, setClassPK, setColorSchemeId, setCompanyId, setCreateDate, setCss, setCtCollectionId, setDescription, setDescription, setDescription, setDescriptionCurrentLanguageId, setDescriptionMap, setDescriptionMap, setExternalReferenceCode, setFaviconFileEntryId, setFriendlyURL, setGroupId, setHidden, setIconImageId, setKeywords, setKeywords, setKeywords, setKeywordsCurrentLanguageId, setKeywordsMap, setKeywordsMap, setLastPublishDate, setLayoutId, setLayoutPrototypeLinkEnabled, setLayoutPrototypeUuid, setMasterLayoutPlid, setModifiedDate, setMvccVersion, setName, setName, setName, setNameCurrentLanguageId, setNameMap, setNameMap, setParentLayoutId, setParentPlid, setPlid, setPrimaryKey, setPriority, setPrivateLayout, setPublishDate, setRobots, setRobots, setRobots, setRobotsCurrentLanguageId, setRobotsMap, setRobotsMap, setSourcePrototypeLayoutUuid, setStatus, setStatusByUserId, setStatusByUserName, setStatusByUserUuid, setStatusDate, setStyleBookEntryId, setSystem, setThemeId, setTitle, setTitle, setTitle, setTitleCurrentLanguageId, setTitleMap, setTitleMap, setType, setTypeSettings, setUserId, setUserName, setUserUuid, setUuid, toXmlString
Methods inherited from interface com.liferay.portal.kernel.model.PersistedModel
persist
Methods inherited from interface com.liferay.portal.kernel.model.StagedModel
clone, getStagedModelType
-
Field Details
-
PLID_ACCESSOR
-
LAYOUT_ID_ACCESSOR
-
-
Method Details
-
fetchDraftLayout
Layout fetchDraftLayout() -
getAllChildren
Returns all layouts that are direct or indirect children of the current layout.- Returns:
- the layouts that are direct or indirect children of the current layout
-
getAncestorLayoutId
Returns the ID of the topmost parent layout (e.g. n-th parent layout) of the current layout.- Returns:
- the ID of the topmost parent layout of the current layout
- Throws:
PortalException
-
getAncestorPlid
Returns the plid of the topmost parent layout (e.g. n-th parent layout) of the current layout.- Returns:
- the plid of the topmost parent layout of the current layout
- Throws:
PortalException
-
getAncestors
Returns all parent layouts of the current layout. The list is retrieved recursively with the direct parent layout listed first, and most distant parent listed last.- Returns:
- the current layout's list of parent layouts
- Throws:
PortalException
-
getBreadcrumb
- Throws:
PortalException
-
getChildren
Returns all child layouts of the current layout, independent of user access permissions.- Returns:
- the list of all child layouts
-
getChildren
Returns all child layouts of the current layout that the user has permission to access.- Parameters:
permissionChecker
- the user-specific context to check permissions- Returns:
- the list of all child layouts that the user has permission to access
- Throws:
PortalException
-
getColorScheme
Returns the color scheme that is configured for the current layout, or the color scheme of the layout set that contains the current layout if no color scheme is configured.- Returns:
- the color scheme that is configured for the current layout, or the color scheme of the layout set that contains the current layout if no color scheme is configured
- Throws:
PortalException
-
getCssText
Returns the CSS text for the current layout, or for the layout set if no CSS text is configured in the current layout.Layouts and layout sets can configure CSS that is applied in addition to the theme's CSS.
- Returns:
- the CSS text for the current layout, or for the layout set if no CSS text is configured in the current layout
- Throws:
PortalException
-
getDefaultThemeSetting
-
getEmbeddedPortlets
-
getEmbeddedPortlets
-
getFaviconURL
String getFaviconURL() -
getFriendlyURL
Returns the layout's friendly URL for the given locale.- Parameters:
locale
- the locale that the friendly URL should be retrieved for- Returns:
- the layout's friendly URL for the given locale
-
getFriendlyURLMap
Returns the friendly URLs for all configured locales.- Returns:
- the friendly URLs for all configured locales
-
getFriendlyURLsXML
String getFriendlyURLsXML() -
getGroup
Group getGroup()Returns the current layout's group.Group is Liferay's technical name for a site.
- Returns:
- the current layout's group
-
getHTMLTitle
Returns the current layout's HTML title for the given locale, or the current layout's name for the given locale if no HTML title is configured.- Parameters:
locale
- the locale that the HTML title should be retrieved for- Returns:
- the current layout's HTML title for the given locale, or the current layout's name for the given locale if no HTML title is configured
-
getHTMLTitle
Returns the current layout's HTML title for the given locale language ID, or the current layout's name if no HTML title is configured.- Parameters:
localeLanguageId
- the locale that the HTML title should be retrieved for- Returns:
- the current layout's HTML title for the given locale language ID, or the current layout's name if no HTML title is configured
-
getIcon
String getIcon() -
getIconImage
boolean getIconImage()Returnstrue
if the current layout has a configured icon.- Returns:
true
if the current layout has a configured icon;false
otherwise
-
getLayoutSet
LayoutSet getLayoutSet()Returns the current layout'sLayoutSet
.- Returns:
- the current layout's layout set
-
getLayoutSetPrototypeLayout
Layout getLayoutSetPrototypeLayout() -
getLayoutType
LayoutType getLayoutType()Returns the current layout'sLayoutType
.- Returns:
- the current layout's layout type
-
getLinkedToLayout
Layout getLinkedToLayout()Returns the current layout's linked layout.- Returns:
- the current layout's linked layout, or
null
if no linked layout could be found
-
getRegularURL
String getRegularURL(javax.servlet.http.HttpServletRequest httpServletRequest) throws PortalException - Throws:
PortalException
-
getResetLayoutURL
String getResetLayoutURL(javax.servlet.http.HttpServletRequest httpServletRequest) throws PortalException - Throws:
PortalException
-
getResetMaxStateURL
String getResetMaxStateURL(javax.servlet.http.HttpServletRequest httpServletRequest) throws PortalException - Throws:
PortalException
-
getScopeGroup
- Throws:
PortalException
-
getTarget
String getTarget() -
getTheme
Returns the current layout's theme, or the layout set's theme if no layout theme is configured.- Returns:
- the current layout's theme, or the layout set's theme if no layout theme is configured
- Throws:
PortalException
-
getThemeSetting
-
getThemeSetting
-
getTypeSettingsProperties
UnicodeProperties getTypeSettingsProperties() -
getTypeSettingsProperty
-
getTypeSettingsProperty
-
hasAncestor
Returnstrue
if the given layout ID matches one of the current layout's hierarchical parents.- Parameters:
layoutId
- the layout ID to search for in the current layout's parent list- Returns:
true
if the given layout ID matches one of the current layout's hierarchical parents;false
otherwise- Throws:
PortalException
-
hasChildren
boolean hasChildren()Returnstrue
if the current layout has child layouts.- Returns:
true
if the current layout has child layouts,false
otherwise
-
hasScopeGroup
- Throws:
PortalException
-
hasSetModifiedDate
boolean hasSetModifiedDate() -
includeLayoutContent
boolean includeLayoutContent(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) throws Exception - Throws:
Exception
-
isChildSelected
- Throws:
PortalException
-
isContentDisplayPage
boolean isContentDisplayPage()Returnstrue
if the current layout can be used as a content display page.A content display page must have an Asset Publisher portlet that is configured as the default Asset Publisher for the layout.
- Returns:
true
if the current layout can be used as a content display page;false
otherwise
-
isCustomizable
boolean isCustomizable() -
isDraftLayout
boolean isDraftLayout() -
isEmbeddedPersonalApplication
boolean isEmbeddedPersonalApplication() -
isFirstChild
boolean isFirstChild()Returnstrue
if the current layout is the first layout in its parent's hierarchical list of children layouts.- Returns:
true
if the current layout is the first layout in its parent's hierarchical list of children layouts;false
otherwise
-
isFirstParent
boolean isFirstParent()Returnstrue
if the current layout is the topmost parent layout.- Returns:
true
if the current layout is the topmost parent layout;false
otherwise
-
isIconImage
boolean isIconImage() -
isInheritLookAndFeel
boolean isInheritLookAndFeel()Returnstrue
if the current layout utilizes itsLayoutSet
's look and feel options (e.g. theme and color scheme).- Returns:
true
if the current layout utilizes its layout set's look and feel options;false
otherwise
-
isLayoutDeleteable
boolean isLayoutDeleteable() -
isLayoutPrototypeLinkActive
boolean isLayoutPrototypeLinkActive()Returnstrue
if the current layout is built from a layout template and still maintains an active connection to it.- Returns:
true
if the current layout is built from a layout template and still maintains an active connection to it;false
otherwise
-
isLayoutSortable
boolean isLayoutSortable() -
isLayoutUpdateable
boolean isLayoutUpdateable() -
isPortletEmbedded
-
isPublicLayout
boolean isPublicLayout()Returnstrue
if the current layout is part of the publicLayoutSet
.Note, the returned value reflects the layout's default access options, not its access permissions.
- Returns:
true
if the current layout is part of the public layout set;false
otherwise
-
isPublished
boolean isPublished() -
isRootLayout
boolean isRootLayout()Returnstrue
if the current layout is the root layout.- Returns:
true
if the current layout is the root layout;false
otherwise
-
isSelected
-
isSupportsEmbeddedPortlets
boolean isSupportsEmbeddedPortlets()Returnstrue
if the current layout can hold embedded portlets.- Returns:
true
if the current layout can hold embedded portlets;false
otherwise
-
isTypeAssetDisplay
boolean isTypeAssetDisplay() -
isTypeContent
boolean isTypeContent() -
isTypeControlPanel
boolean isTypeControlPanel() -
isTypeEmbedded
boolean isTypeEmbedded() -
isTypeLinkToLayout
boolean isTypeLinkToLayout() -
isTypePanel
boolean isTypePanel() -
isTypePortlet
boolean isTypePortlet() -
isTypeURL
boolean isTypeURL() -
isTypeUtility
boolean isTypeUtility() -
isUnlocked
-
matches
-
setLayoutSet
-
setTypeSettingsProperties
-