public class LayoutImpl extends LayoutBaseImpl
The UI name for a layout is "page." Thus, a layout represents a page in the
portal. A single page is either part of the public or private layout set of a
group (site). Layouts can be organized hierarchically and are summarized in a
LayoutSet.
CLASSNAMEID_COLUMN_BITMASK, CLASSPK_COLUMN_BITMASK, COLUMN_BITMASK_ENABLED, COMPANYID_COLUMN_BITMASK, DATA_SOURCE, ENTITY_CACHE_ENABLED, FINDER_CACHE_ENABLED, FRIENDLYURL_COLUMN_BITMASK, GROUPID_COLUMN_BITMASK, HEAD_COLUMN_BITMASK, HEADID_COLUMN_BITMASK, HIDDEN_COLUMN_BITMASK, ICONIMAGEID_COLUMN_BITMASK, LAYOUTID_COLUMN_BITMASK, LAYOUTPROTOTYPEUUID_COLUMN_BITMASK, LOCK_EXPIRATION_TIME, ORDER_BY_JPQL, ORDER_BY_SQL, PARENTLAYOUTID_COLUMN_BITMASK, PARENTPLID_COLUMN_BITMASK, PRIORITY_COLUMN_BITMASK, PRIVATELAYOUT_COLUMN_BITMASK, SESSION_FACTORY, SOURCEPROTOTYPELAYOUTUUID_COLUMN_BITMASK, TABLE_COLUMNS, TABLE_COLUMNS_MAP, TABLE_NAME, TABLE_SQL_CREATE, TABLE_SQL_DROP, TX_MANAGER, TYPE_COLUMN_BITMASK, UUID_COLUMN_BITMASK| Constructor and Description |
|---|
LayoutImpl() |
| Modifier and Type | Method and Description |
|---|---|
List<com.liferay.portal.kernel.model.Layout> |
getAllChildren()
Returns all layouts that are direct or indirect children of the current
layout.
|
long |
getAncestorLayoutId()
Returns the ID of the topmost parent layout (e.g. n-th parent layout) of
the current layout.
|
long |
getAncestorPlid()
Returns the plid of the topmost parent layout (e.g. n-th parent layout)
of the current layout.
|
List<com.liferay.portal.kernel.model.Layout> |
getAncestors()
Returns all parent layouts of the current layout.
|
List<com.liferay.portal.kernel.model.Layout> |
getChildren()
Returns all child layouts of the current layout, independent of user
access permissions.
|
List<com.liferay.portal.kernel.model.Layout> |
getChildren(com.liferay.portal.kernel.security.permission.PermissionChecker permissionChecker)
Returns all child layouts of the current layout that the user has
permission to access.
|
com.liferay.portal.kernel.model.ColorScheme |
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.
|
String |
getCssText()
Returns the CSS text for the current layout, or for the layout set if no
CSS text is configured in the current layout.
|
String |
getDefaultThemeSetting(String key,
String device,
boolean inheritLookAndFeel) |
List<com.liferay.portal.kernel.model.Portlet> |
getEmbeddedPortlets() |
List<com.liferay.portal.kernel.model.Portlet> |
getEmbeddedPortlets(long groupId) |
String |
getFriendlyURL(Locale locale)
Returns the layout's friendly URL for the given locale.
|
Map<Locale,String> |
getFriendlyURLMap()
Returns the friendly URLs for all configured locales.
|
String |
getFriendlyURLsXML() |
com.liferay.portal.kernel.model.Group |
getGroup()
Returns the current layout's group.
|
String |
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.
|
String |
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.
|
boolean |
getIconImage()
Returns
true if the current layout has a configured icon. |
com.liferay.portal.kernel.model.LayoutSet |
getLayoutSet()
Returns the current layout's
LayoutSet. |
com.liferay.portal.kernel.model.LayoutType |
getLayoutType()
Returns the current layout's
LayoutType. |
com.liferay.portal.kernel.model.Layout |
getLinkedToLayout()
Returns the current layout's linked layout.
|
String |
getRegularURL(javax.servlet.http.HttpServletRequest httpServletRequest) |
String |
getResetLayoutURL(javax.servlet.http.HttpServletRequest httpServletRequest) |
String |
getResetMaxStateURL(javax.servlet.http.HttpServletRequest httpServletRequest) |
com.liferay.portal.kernel.model.Group |
getScopeGroup() |
String |
getTarget() |
com.liferay.portal.kernel.model.Theme |
getTheme()
Returns the current layout's theme, or the layout set's theme if no
layout theme is configured.
|
String |
getThemeSetting(String key,
String device) |
String |
getThemeSetting(String key,
String device,
boolean inheritLookAndFeel) |
String |
getTypeSettings() |
com.liferay.portal.kernel.util.UnicodeProperties |
getTypeSettingsProperties() |
String |
getTypeSettingsProperty(String key) |
String |
getTypeSettingsProperty(String key,
String defaultValue) |
boolean |
hasAncestor(long layoutId)
Returns
true if the given layout ID matches one of the
current layout's hierarchical parents. |
boolean |
hasChildren()
Returns
true if the current layout has child layouts. |
static boolean |
hasFriendlyURLKeyword(String friendlyURL) |
boolean |
hasScopeGroup() |
boolean |
hasSetModifiedDate() |
boolean |
includeLayoutContent(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse) |
boolean |
isChildSelected(boolean selectable,
com.liferay.portal.kernel.model.Layout layout) |
boolean |
isContentDisplayPage()
Returns
true if the current layout can be used as a content
display page. |
boolean |
isCustomizable() |
boolean |
isFirstChild()
Returns
true if the current layout is the first layout in
its parent's hierarchical list of children layouts. |
boolean |
isFirstParent()
Returns
true if the current layout is the topmost parent
layout. |
boolean |
isIconImage() |
boolean |
isInheritLookAndFeel()
Returns
true if the current layout utilizes its LayoutSet's look and feel options (e.g. theme and color scheme). |
boolean |
isLayoutPrototypeLinkActive()
Returns
true if the current layout is built from a layout
template and still maintains an active connection to it. |
boolean |
isPortletEmbedded(String portletId,
long groupId) |
boolean |
isPublicLayout()
Returns
true if the current layout is part of the public
LayoutSet. |
boolean |
isRootLayout()
Returns
true if the current layout is the root layout. |
boolean |
isSelected(boolean selectable,
com.liferay.portal.kernel.model.Layout layout,
long ancestorPlid) |
boolean |
isSupportsEmbeddedPortlets()
Returns
true if the current layout can hold embedded
portlets. |
boolean |
isTypeControlPanel() |
boolean |
isTypeEmbedded() |
boolean |
isTypeLinkToLayout() |
boolean |
isTypePanel() |
boolean |
isTypePortlet() |
boolean |
isTypeSharedPortlet()
Deprecated.
As of Judson (7.1.x), with no direct replacement
|
boolean |
isTypeURL() |
boolean |
matches(javax.servlet.http.HttpServletRequest httpServletRequest,
String friendlyURL) |
void |
setGroupId(long groupId) |
void |
setLayoutSet(com.liferay.portal.kernel.model.LayoutSet layoutSet) |
void |
setPrivateLayout(boolean privateLayout) |
void |
setTypeSettings(String typeSettings) |
void |
setTypeSettingsProperties(com.liferay.portal.kernel.util.UnicodeProperties typeSettingsProperties) |
static int |
validateFriendlyURL(String friendlyURL) |
static int |
validateFriendlyURL(String friendlyURL,
boolean checkMaxLength)
Checks whether the URL is a valid friendly URL.
|
static void |
validateFriendlyURLKeyword(String friendlyURL) |
persistclone, compareTo, equals, getAttributeGetterFunctions, getAttributeSetterBiConsumers, getAvailableLanguageIds, getClassName, getClassNameId, getClassPK, getColorSchemeId, getColumnBitmask, getCompanyId, getCreateDate, getCss, getDefaultLanguageId, getDescription, getDescription, getDescription, getDescription, getDescription, getDescriptionCurrentLanguageId, getDescriptionCurrentValue, getDescriptionMap, getExpandoBridge, getFriendlyURL, getGroupId, getHead, getHeadId, getHidden, getIconImageId, getKeywords, getKeywords, getKeywords, getKeywords, getKeywords, getKeywordsCurrentLanguageId, getKeywordsCurrentValue, getKeywordsMap, getLastPublishDate, getLayoutId, getLayoutPrototypeLinkEnabled, getLayoutPrototypeUuid, getModelAttributes, getModelClass, getModelClassName, getModifiedDate, getMvccVersion, getName, getName, getName, getName, getName, getNameCurrentLanguageId, getNameCurrentValue, getNameMap, getOriginalClassNameId, getOriginalClassPK, getOriginalCompanyId, getOriginalFriendlyURL, getOriginalGroupId, getOriginalHead, getOriginalHeadId, getOriginalHidden, getOriginalIconImageId, getOriginalLayoutId, getOriginalLayoutPrototypeUuid, getOriginalParentLayoutId, getOriginalParentPlid, getOriginalPriority, getOriginalPrivateLayout, getOriginalSourcePrototypeLayoutUuid, getOriginalType, getOriginalUuid, getParentLayoutId, getParentPlid, getPlid, getPrimaryKey, getPrimaryKeyObj, getPriority, getPrivateLayout, getPublishDate, getRobots, getRobots, getRobots, getRobots, getRobots, getRobotsCurrentLanguageId, getRobotsCurrentValue, getRobotsMap, getSourcePrototypeLayoutUuid, getStagedModelType, getSystem, getThemeId, getTitle, getTitle, getTitle, getTitle, getTitle, getTitleCurrentLanguageId, getTitleCurrentValue, getTitleMap, getType, getUserId, getUserName, getUserUuid, getUuid, hashCode, isEntityCacheEnabled, isFinderCacheEnabled, isHead, isHidden, isLayoutPrototypeLinkEnabled, isPrivateLayout, isSystem, populateVersionModel, prepareLocalizedFieldsForImport, prepareLocalizedFieldsForImport, resetOriginalValues, setClassName, setClassNameId, setClassPK, setColorSchemeId, setCompanyId, setCreateDate, setCss, setDescription, setDescription, setDescription, setDescriptionCurrentLanguageId, setDescriptionMap, setDescriptionMap, setExpandoBridgeAttributes, setFriendlyURL, setHead, setHeadId, setHidden, setIconImageId, setKeywords, setKeywords, setKeywords, setKeywordsCurrentLanguageId, setKeywordsMap, setKeywordsMap, setLastPublishDate, setLayoutId, setLayoutPrototypeLinkEnabled, setLayoutPrototypeUuid, setModelAttributes, setModifiedDate, setMvccVersion, setName, setName, setName, setNameCurrentLanguageId, setNameMap, setNameMap, setParentLayoutId, setParentPlid, setPlid, setPrimaryKey, setPrimaryKeyObj, setPriority, setPublishDate, setRobots, setRobots, setRobots, setRobotsCurrentLanguageId, setRobotsMap, setRobotsMap, setSourcePrototypeLayoutUuid, setSystem, setThemeId, setTitle, setTitle, setTitle, setTitleCurrentLanguageId, setTitleMap, setTitleMap, setType, setUserId, setUserName, setUserUuid, setUuid, toCacheModel, toEscapedModel, toModel, toModels, toString, toXmlStringgetLocale, isCachedModel, isEscapedModel, isNew, setCachedModel, setExpandoBridgeAttributes, setExpandoBridgeAttributes, setNew, toUnescapedModelgetAvailableLanguageIds, getClassName, getClassNameId, getClassPK, getColorSchemeId, getCompanyId, getCreateDate, getCss, getDefaultLanguageId, getDescription, getDescription, getDescription, getDescription, getDescription, getDescriptionCurrentLanguageId, getDescriptionCurrentValue, getDescriptionMap, getFriendlyURL, getGroupId, getHeadId, getHidden, getIconImageId, getKeywords, getKeywords, getKeywords, getKeywords, getKeywords, getKeywordsCurrentLanguageId, getKeywordsCurrentValue, getKeywordsMap, getLastPublishDate, getLayoutId, getLayoutPrototypeLinkEnabled, getLayoutPrototypeUuid, 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, getSystem, getThemeId, getTitle, getTitle, getTitle, getTitle, getTitle, getTitleCurrentLanguageId, getTitleCurrentValue, getTitleMap, getType, getUserId, getUserName, getUserUuid, getUuid, isHidden, isLayoutPrototypeLinkEnabled, isPrivateLayout, isSystem, prepareLocalizedFieldsForImport, prepareLocalizedFieldsForImport, setClassName, setClassNameId, setClassPK, setColorSchemeId, setCompanyId, setCreateDate, setCss, setDescription, setDescription, setDescription, setDescriptionCurrentLanguageId, setDescriptionMap, setDescriptionMap, setFriendlyURL, setHeadId, setHidden, setIconImageId, setKeywords, setKeywords, setKeywords, setKeywordsCurrentLanguageId, setKeywordsMap, setKeywordsMap, setLastPublishDate, setLayoutId, setLayoutPrototypeLinkEnabled, setLayoutPrototypeUuid, setModifiedDate, setMvccVersion, setName, setName, setName, setNameCurrentLanguageId, setNameMap, setNameMap, setParentLayoutId, setParentPlid, setPlid, setPrimaryKey, setPriority, setPublishDate, setRobots, setRobots, setRobots, setRobotsCurrentLanguageId, setRobotsMap, setRobotsMap, setSourcePrototypeLayoutUuid, setSystem, setThemeId, setTitle, setTitle, setTitle, setTitleCurrentLanguageId, setTitleMap, setTitleMap, setType, setUserId, setUserName, setUserUuid, setUuidclone, getExpandoBridge, getModelAttributes, getPrimaryKeyObj, isCachedModel, isEntityCacheEnabled, isEscapedModel, isFinderCacheEnabled, isNew, resetOriginalValues, setCachedModel, setExpandoBridgeAttributes, setExpandoBridgeAttributes, setExpandoBridgeAttributes, setModelAttributes, setNew, setPrimaryKeyObj, toCacheModel, toEscapedModel, toUnescapedModel, toXmlStringgetModelClass, getModelClassNamepublic static boolean hasFriendlyURLKeyword(String friendlyURL)
public static int validateFriendlyURL(String friendlyURL)
public static int validateFriendlyURL(String friendlyURL,
boolean checkMaxLength)
friendlyURL - the URL to be checkedcheckMaxLength - whether to check that the URL's length does not
exceed the maximum length-1 if the URL is a valid friendly URL; a LayoutFriendlyURLException constant otherwisepublic static void validateFriendlyURLKeyword(String friendlyURL)
throws com.liferay.portal.kernel.exception.LayoutFriendlyURLException
com.liferay.portal.kernel.exception.LayoutFriendlyURLExceptionpublic List<com.liferay.portal.kernel.model.Layout> getAllChildren()
public long getAncestorLayoutId()
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic long getAncestorPlid()
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic List<com.liferay.portal.kernel.model.Layout> getAncestors()
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic List<com.liferay.portal.kernel.model.Layout> getChildren()
public List<com.liferay.portal.kernel.model.Layout> getChildren(com.liferay.portal.kernel.security.permission.PermissionChecker permissionChecker)
throws com.liferay.portal.kernel.exception.PortalException
permissionChecker - the user-specific context to check permissionscom.liferay.portal.kernel.exception.PortalExceptionpublic com.liferay.portal.kernel.model.ColorScheme getColorScheme()
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic String getCssText()
throws com.liferay.portal.kernel.exception.PortalException
Layouts and layout sets can configure CSS that is applied in addition to the theme's CSS.
com.liferay.portal.kernel.exception.PortalExceptionpublic String getDefaultThemeSetting(String key,
String device,
boolean inheritLookAndFeel)
public List<com.liferay.portal.kernel.model.Portlet> getEmbeddedPortlets()
public List<com.liferay.portal.kernel.model.Portlet> getEmbeddedPortlets(long groupId)
public String getFriendlyURL(Locale locale)
locale - the locale that the friendly URL should be retrieved forpublic Map<Locale,String> getFriendlyURLMap()
public String getFriendlyURLsXML()
public com.liferay.portal.kernel.model.Group getGroup()
Group is Liferay's technical name for a site.
public String getHTMLTitle(Locale locale)
locale - the locale that the HTML title should be retrieved forpublic String getHTMLTitle(String localeLanguageId)
localeLanguageId - the locale that the HTML title should be
retrieved forpublic boolean getIconImage()
true if the current layout has a configured icon.true if the current layout has a configured icon;
false otherwisepublic com.liferay.portal.kernel.model.LayoutSet getLayoutSet()
LayoutSet.public com.liferay.portal.kernel.model.LayoutType getLayoutType()
LayoutType.public com.liferay.portal.kernel.model.Layout getLinkedToLayout()
null if no
linked layout could be foundpublic String getRegularURL(javax.servlet.http.HttpServletRequest httpServletRequest)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic String getResetLayoutURL(javax.servlet.http.HttpServletRequest httpServletRequest)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic String getResetMaxStateURL(javax.servlet.http.HttpServletRequest httpServletRequest)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic com.liferay.portal.kernel.model.Group getScopeGroup()
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic String getTarget()
public com.liferay.portal.kernel.model.Theme getTheme()
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic String getThemeSetting(String key,
String device)
public String getThemeSetting(String key,
String device,
boolean inheritLookAndFeel)
public String getTypeSettings()
getTypeSettings in interface com.liferay.portal.kernel.model.LayoutModelgetTypeSettings in class LayoutModelImplpublic com.liferay.portal.kernel.util.UnicodeProperties getTypeSettingsProperties()
public String getTypeSettingsProperty(String key)
public String getTypeSettingsProperty(String key,
String defaultValue)
public boolean hasAncestor(long layoutId)
throws com.liferay.portal.kernel.exception.PortalException
true if the given layout ID matches one of the
current layout's hierarchical parents.layoutId - the layout ID to search for in the current layout's
parent listtrue if the given layout ID matches one of the
current layout's hierarchical parents; false
otherwisecom.liferay.portal.kernel.exception.PortalExceptionpublic boolean hasChildren()
true if the current layout has child layouts.true if the current layout has child layouts,
false otherwisepublic boolean hasScopeGroup()
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic boolean hasSetModifiedDate()
hasSetModifiedDate in interface com.liferay.portal.kernel.model.LayouthasSetModifiedDate in class LayoutModelImplpublic boolean includeLayoutContent(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse)
throws Exception
Exceptionpublic boolean isChildSelected(boolean selectable,
com.liferay.portal.kernel.model.Layout layout)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic boolean isContentDisplayPage()
true 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.
true if the current layout can be used as a content
display page; false otherwisepublic boolean isCustomizable()
public boolean isFirstChild()
true if the current layout is the first layout in
its parent's hierarchical list of children layouts.true if the current layout is the first layout in
its parent's hierarchical list of children layouts;
false otherwisepublic boolean isFirstParent()
true if the current layout is the topmost parent
layout.true if the current layout is the topmost parent
layout; false otherwisepublic boolean isIconImage()
public boolean isInheritLookAndFeel()
true if the current layout utilizes its LayoutSet's look and feel options (e.g. theme and color scheme).true if the current layout utilizes its layout set's
look and feel options; false otherwisepublic boolean isLayoutPrototypeLinkActive()
true if the current layout is built from a layout
template and still maintains an active connection to it.true if the current layout is built from a layout
template and still maintains an active connection to it;
false otherwisepublic boolean isPortletEmbedded(String portletId,
long groupId)
public boolean isPublicLayout()
true if the current layout is part of the public
LayoutSet.
Note, the returned value reflects the layout's default access options, not its access permissions.
true if the current layout is part of the public
layout set; false otherwisepublic boolean isRootLayout()
true if the current layout is the root layout.true if the current layout is the root layout;
false otherwisepublic boolean isSelected(boolean selectable,
com.liferay.portal.kernel.model.Layout layout,
long ancestorPlid)
public boolean isSupportsEmbeddedPortlets()
true if the current layout can hold embedded
portlets.true if the current layout can hold embedded
portlets; false otherwisepublic boolean isTypeControlPanel()
public boolean isTypeEmbedded()
public boolean isTypeLinkToLayout()
public boolean isTypePanel()
public boolean isTypePortlet()
@Deprecated public boolean isTypeSharedPortlet()
public boolean isTypeURL()
public boolean matches(javax.servlet.http.HttpServletRequest httpServletRequest,
String friendlyURL)
public void setGroupId(long groupId)
setGroupId in interface com.liferay.portal.kernel.model.GroupedModelsetGroupId in interface com.liferay.portal.kernel.model.LayoutModelsetGroupId in class LayoutModelImplpublic void setLayoutSet(com.liferay.portal.kernel.model.LayoutSet layoutSet)
public void setPrivateLayout(boolean privateLayout)
setPrivateLayout in interface com.liferay.portal.kernel.model.LayoutModelsetPrivateLayout in class LayoutModelImplpublic void setTypeSettings(String typeSettings)
setTypeSettings in interface com.liferay.portal.kernel.model.LayoutModelsetTypeSettings in class LayoutModelImplpublic void setTypeSettingsProperties(com.liferay.portal.kernel.util.UnicodeProperties typeSettingsProperties)