|
Liferay 7.0-ga1 portal-impl | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.liferay.portal.kernel.model.impl.BaseModelImpl<com.liferay.portal.kernel.model.Layout>
com.liferay.portal.model.impl.LayoutModelImpl
com.liferay.portal.model.impl.LayoutBaseImpl
com.liferay.portal.model.impl.LayoutImpl
public class LayoutImpl
Represents a portal layout, providing access to the layout's URLs, parent layouts, child layouts, theme settings, type settings, and more.
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.
| Field Summary |
|---|
| Fields inherited from interface com.liferay.portal.kernel.model.Layout |
|---|
LAYOUT_ID_ACCESSOR, PLID_ACCESSOR |
| Constructor Summary | |
|---|---|
LayoutImpl()
|
|
| Method Summary | |
|---|---|
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. |
long |
getParentPlid()
Returns the current layout's parent plid. |
String |
getRegularURL(javax.servlet.http.HttpServletRequest request)
|
String |
getResetLayoutURL(javax.servlet.http.HttpServletRequest request)
|
String |
getResetMaxStateURL(javax.servlet.http.HttpServletRequest request)
|
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 request,
javax.servlet.http.HttpServletResponse response)
|
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 |
isTypeArticle()
Deprecated. As of 7.0.0, with no direct replacement |
boolean |
isTypeControlPanel()
|
boolean |
isTypeEmbedded()
|
boolean |
isTypeLinkToLayout()
|
boolean |
isTypePanel()
|
boolean |
isTypePortlet()
|
boolean |
isTypeSharedPortlet()
|
boolean |
isTypeURL()
|
boolean |
matches(javax.servlet.http.HttpServletRequest request,
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)
|
| Methods inherited from class com.liferay.portal.model.impl.LayoutBaseImpl |
|---|
persist |
| Methods inherited from class com.liferay.portal.kernel.model.impl.BaseModelImpl |
|---|
getLocale, isCachedModel, isEscapedModel, isNew, setCachedModel, setExpandoBridgeAttributes, setExpandoBridgeAttributes, setNew, toUnescapedModel |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.liferay.portal.kernel.model.LayoutModel |
|---|
clone, compareTo, getAvailableLanguageIds, getColorSchemeId, getCompanyId, getCreateDate, getCss, getDefaultLanguageId, getDescription, getDescription, getDescription, getDescription, getDescription, getDescriptionCurrentLanguageId, getDescriptionCurrentValue, getDescriptionMap, getExpandoBridge, getFriendlyURL, getGroupId, 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, getPlid, getPrimaryKey, getPrimaryKeyObj, getPriority, getPrivateLayout, getRobots, getRobots, getRobots, getRobots, getRobots, getRobotsCurrentLanguageId, getRobotsCurrentValue, getRobotsMap, getSourcePrototypeLayoutUuid, getThemeId, getTitle, getTitle, getTitle, getTitle, getTitle, getTitleCurrentLanguageId, getTitleCurrentValue, getTitleMap, getType, getUserId, getUserName, getUserUuid, getUuid, hashCode, isCachedModel, isEscapedModel, isHidden, isLayoutPrototypeLinkEnabled, isNew, isPrivateLayout, prepareLocalizedFieldsForImport, prepareLocalizedFieldsForImport, setCachedModel, setColorSchemeId, setCompanyId, setCreateDate, setCss, setDescription, setDescription, setDescription, setDescriptionCurrentLanguageId, setDescriptionMap, setDescriptionMap, setExpandoBridgeAttributes, setExpandoBridgeAttributes, setExpandoBridgeAttributes, setFriendlyURL, setHidden, setIconImageId, setKeywords, setKeywords, setKeywords, setKeywordsCurrentLanguageId, setKeywordsMap, setKeywordsMap, setLastPublishDate, setLayoutId, setLayoutPrototypeLinkEnabled, setLayoutPrototypeUuid, setModifiedDate, setMvccVersion, setName, setName, setName, setNameCurrentLanguageId, setNameMap, setNameMap, setNew, setParentLayoutId, setPlid, setPrimaryKey, setPrimaryKeyObj, setPriority, setRobots, setRobots, setRobots, setRobotsCurrentLanguageId, setRobotsMap, setRobotsMap, setSourcePrototypeLayoutUuid, setThemeId, setTitle, setTitle, setTitle, setTitleCurrentLanguageId, setTitleMap, setTitleMap, setType, setUserId, setUserName, setUserUuid, setUuid, toCacheModel, toEscapedModel, toString, toUnescapedModel, toXmlString |
| Methods inherited from interface com.liferay.portal.kernel.model.BaseModel |
|---|
getModelAttributes, isEntityCacheEnabled, isFinderCacheEnabled, resetOriginalValues, setModelAttributes |
| Methods inherited from interface com.liferay.portal.kernel.model.ClassedModel |
|---|
getModelClass, getModelClassName |
| Methods inherited from interface com.liferay.portal.kernel.model.StagedModel |
|---|
getStagedModelType |
| Constructor Detail |
|---|
public LayoutImpl()
| Method Detail |
|---|
public 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 otherwise
public 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.PortalException
public long getAncestorPlid()
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public 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 permissions
com.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.model.ColorScheme getColorScheme()
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public 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.PortalException
public 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 for
public Map<Locale,String> getFriendlyURLMap()
public String getFriendlyURLsXML()
public com.liferay.portal.kernel.model.Group getGroup()
throws com.liferay.portal.kernel.exception.PortalException
Group is Liferay's technical name for a site.
com.liferay.portal.kernel.exception.PortalExceptionpublic String getHTMLTitle(Locale locale)
locale - the locale that the HTML title should be retrieved for
public String getHTMLTitle(String localeLanguageId)
localeLanguageId - the locale that the HTML title should be
retrieved for
public boolean getIconImage()
true if the current layout has a configured icon.
true if the current layout has a configured icon;
false otherwise
public com.liferay.portal.kernel.model.LayoutSet getLayoutSet()
throws com.liferay.portal.kernel.exception.PortalException
LayoutSet.
com.liferay.portal.kernel.exception.PortalExceptionpublic com.liferay.portal.kernel.model.LayoutType getLayoutType()
LayoutType.
public com.liferay.portal.kernel.model.Layout getLinkedToLayout()
null if no
linked layout could be found
public long getParentPlid()
throws com.liferay.portal.kernel.exception.PortalException
0 if the
current layout is the topmost parent layout
com.liferay.portal.kernel.exception.PortalException
public String getRegularURL(javax.servlet.http.HttpServletRequest request)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public String getResetLayoutURL(javax.servlet.http.HttpServletRequest request)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public String getResetMaxStateURL(javax.servlet.http.HttpServletRequest request)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public 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.PortalException
public 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 list
true if the given layout ID matches one of the
current layout's hierarchical parents; false
otherwise
com.liferay.portal.kernel.exception.PortalExceptionpublic boolean hasChildren()
true if the current layout has child layouts.
true if the current layout has child layouts,
false otherwise
public 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 LayoutModelImpl
public boolean includeLayoutContent(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws Exception
Exception
public 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 otherwise
public 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 otherwise
public 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 otherwise@Deprecated public boolean isTypeArticle()
public boolean isTypeControlPanel()
public boolean isTypeEmbedded()
public boolean isTypeLinkToLayout()
public boolean isTypePanel()
public boolean isTypePortlet()
public boolean isTypeSharedPortlet()
public boolean isTypeURL()
public boolean matches(javax.servlet.http.HttpServletRequest request,
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)
|
Liferay 7.0-ga1 portal-impl | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||