|
Liferay 7.0-ce-b4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.liferay.portal.model.impl.BaseModelImpl<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.model.Layout |
|---|
LAYOUT_ID_ACCESSOR, PLID_ACCESSOR |
| Constructor Summary | |
|---|---|
LayoutImpl()
|
|
| Method Summary | |
|---|---|
List<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<Layout> |
getAncestors()
Returns all parent layouts of the current layout. |
List<Layout> |
getChildren()
Returns all child layouts of the current layout, independent of user access permissions. |
List<Layout> |
getChildren(PermissionChecker permissionChecker)
Returns all child layouts of the current layout that the user has permission to access. |
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<Portlet> |
getEmbeddedPortlets()
|
List<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()
|
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. |
LayoutSet |
getLayoutSet()
Returns the current layout's LayoutSet. |
LayoutType |
getLayoutType()
Returns the current layout's LayoutType. |
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)
|
Group |
getScopeGroup()
|
String |
getTarget()
|
Theme |
getTheme()
Returns the current layout's theme, or the layout set's theme if no layout theme is configured. |
protected Theme |
getTheme(String device)
|
String |
getThemeSetting(String key,
String device)
|
String |
getThemeSetting(String key,
String device,
boolean inheritLookAndFeel)
|
String |
getTypeSettings()
Returns the type settings of this layout. |
UnicodeProperties |
getTypeSettingsProperties()
|
String |
getTypeSettingsProperty(String key)
|
String |
getTypeSettingsProperty(String key,
String defaultValue)
|
ColorScheme |
getWapColorScheme()
|
Theme |
getWapTheme()
|
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,
Layout layout)
|
boolean |
isContentDisplayPage()
Returns true if the current layout can be used as a content
display page. |
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 |
isInheritWapLookAndFeel()
|
boolean |
isLayoutPrototypeLinkActive()
Returns true if the current layout is built from a layout
template and still maintains an active connection to it. |
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,
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)
Sets the group ID of this layout. |
void |
setLayoutSet(LayoutSet layoutSet)
|
void |
setPrivateLayout(boolean privateLayout)
Sets whether this layout is private layout. |
void |
setTypeSettings(String typeSettings)
Sets the type settings of this layout. |
void |
setTypeSettingsProperties(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.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.model.BaseModel |
|---|
getModelAttributes, isEntityCacheEnabled, isFinderCacheEnabled, resetOriginalValues, setModelAttributes |
| Methods inherited from interface com.liferay.portal.model.ClassedModel |
|---|
getModelClass, getModelClassName |
| Methods inherited from interface com.liferay.portal.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 LayoutFriendlyURLException
LayoutFriendlyURLExceptionpublic List<Layout> getAllChildren()
public long getAncestorLayoutId()
throws PortalException
PortalException
public long getAncestorPlid()
throws PortalException
PortalException
public List<Layout> getAncestors()
throws PortalException
PortalExceptionpublic List<Layout> getChildren()
public List<Layout> getChildren(PermissionChecker permissionChecker)
throws PortalException
permissionChecker - the user-specific context to check permissions
PortalException
public ColorScheme getColorScheme()
throws PortalException
PortalException
public String getCssText()
throws PortalException
Layouts and layout sets can configure CSS that is applied in addition to the theme's CSS.
PortalException
public String getDefaultThemeSetting(String key,
String device,
boolean inheritLookAndFeel)
public List<Portlet> getEmbeddedPortlets()
public List<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 Group getGroup()
throws PortalException
Group is Liferay's technical name for a site.
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 LayoutSet getLayoutSet()
throws PortalException
LayoutSet.
PortalExceptionpublic LayoutType getLayoutType()
LayoutType.
public Layout getLinkedToLayout()
null if no
linked layout could be found
public long getParentPlid()
throws PortalException
0 if the
current layout is the topmost parent layout
PortalException
public String getRegularURL(javax.servlet.http.HttpServletRequest request)
throws PortalException
PortalException
public String getResetLayoutURL(javax.servlet.http.HttpServletRequest request)
throws PortalException
PortalException
public String getResetMaxStateURL(javax.servlet.http.HttpServletRequest request)
throws PortalException
PortalException
public Group getScopeGroup()
throws PortalException
PortalExceptionpublic String getTarget()
public Theme getTheme()
throws PortalException
PortalException
public String getThemeSetting(String key,
String device)
public String getThemeSetting(String key,
String device,
boolean inheritLookAndFeel)
public String getTypeSettings()
LayoutModel
getTypeSettings in interface LayoutModelgetTypeSettings in class LayoutModelImplpublic UnicodeProperties getTypeSettingsProperties()
public String getTypeSettingsProperty(String key)
public String getTypeSettingsProperty(String key,
String defaultValue)
public ColorScheme getWapColorScheme()
throws PortalException
PortalException
public Theme getWapTheme()
throws PortalException
PortalException
public boolean hasAncestor(long layoutId)
throws 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
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 PortalException
PortalExceptionpublic boolean hasSetModifiedDate()
hasSetModifiedDate in interface 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,
Layout layout)
throws PortalException
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 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 isInheritWapLookAndFeel()
public 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 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,
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)
LayoutModel
setGroupId in interface GroupedModelsetGroupId in interface LayoutModelsetGroupId in class LayoutModelImplgroupId - the group ID of this layoutpublic void setLayoutSet(LayoutSet layoutSet)
public void setPrivateLayout(boolean privateLayout)
LayoutModel
setPrivateLayout in interface LayoutModelsetPrivateLayout in class LayoutModelImplprivateLayout - the private layout of this layoutpublic void setTypeSettings(String typeSettings)
LayoutModel
setTypeSettings in interface LayoutModelsetTypeSettings in class LayoutModelImpltypeSettings - the type settings of this layoutpublic void setTypeSettingsProperties(UnicodeProperties typeSettingsProperties)
protected Theme getTheme(String device)
throws PortalException
PortalException
|
Liferay 7.0-ce-b4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||