public class NavItem
extends java.lang.Object
implements java.io.Serializable
portal-normal.vm.| Constructor and Description |
|---|
NavItem(javax.servlet.http.HttpServletRequest request,
Layout layout,
java.util.Map<java.lang.String,java.lang.Object> contextObjects) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
static java.util.List<NavItem> |
fromLayouts(javax.servlet.http.HttpServletRequest request,
java.util.List<Layout> layouts,
java.util.Map<java.lang.String,java.lang.Object> contextObjects)
Creates a single level of navigation items from the layouts.
|
java.util.List<NavItem> |
getBrowsableChildren()
Returns all of the browsable child layouts that the current user has
permission to access from this navigation item's layout.
|
java.util.List<NavItem> |
getChildren()
Returns all of child layouts that the current user has permission to
access from this navigation item's layout.
|
Layout |
getLayout()
Returns the navigation item's layout.
|
long |
getLayoutId()
Returns the ID of the navigation item's layout.
|
java.lang.String |
getName()
Returns the HTML-escaped name of the navigation item's layout.
|
java.lang.String |
getRegularFullURL()
Returns the full, absolute URL (including the portal's URL) of the
navigation item's layout.
|
java.lang.String |
getRegularURL()
Returns the regular URL of the navigation item's layout.
|
java.lang.String |
getResetLayoutURL() |
java.lang.String |
getResetMaxStateURL() |
java.lang.String |
getTarget()
Returns the target of the navigation item's layout.
|
java.lang.String |
getTitle()
Returns the title of the navigation item's layout in the current
request's locale.
|
java.lang.String |
getUnescapedName()
Returns the unescaped name of the navigation item's layout in the current
request's locale.
|
java.lang.String |
getURL()
Returns the URL of the navigation item's layout, in a format that makes
it safe to use the URL as an HREF attribute value
|
boolean |
hasBrowsableChildren()
Returns
true if the navigation item's layout has browsable
child layouts. |
boolean |
hasChildren()
Returns
true if the navigation item's layout has child
layouts. |
int |
hashCode() |
void |
icon() |
boolean |
isBrowsable() |
boolean |
isChildSelected() |
boolean |
isInNavigation(java.util.List<NavItem> navItems) |
boolean |
isSelected() |
public NavItem(javax.servlet.http.HttpServletRequest request,
Layout layout,
java.util.Map<java.lang.String,java.lang.Object> contextObjects)
public static java.util.List<NavItem> fromLayouts(javax.servlet.http.HttpServletRequest request, java.util.List<Layout> layouts, java.util.Map<java.lang.String,java.lang.Object> contextObjects)
No permission checks are performed in this method. Permissions of child
layouts are honored when accessing them via getChildren().
request - the currently served HttpServletRequestlayouts - the layouts from which to create the navigation itemsnull if the collection of layouts was
null.public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.util.List<NavItem> getBrowsableChildren() throws java.lang.Exception
java.lang.Exception - if an exception occurredpublic java.util.List<NavItem> getChildren() throws java.lang.Exception
java.lang.Exception - if an exception occurredpublic Layout getLayout()
public long getLayoutId()
public java.lang.String getName()
public java.lang.String getRegularFullURL()
throws java.lang.Exception
java.lang.Exception - if an exception occurredpublic java.lang.String getRegularURL()
throws java.lang.Exception
java.lang.Exception - if an exception occurredpublic java.lang.String getResetLayoutURL()
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String getResetMaxStateURL()
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String getTarget()
public java.lang.String getTitle()
public java.lang.String getUnescapedName()
public java.lang.String getURL()
throws java.lang.Exception
java.lang.Exception - if an exception occurredpublic boolean hasBrowsableChildren()
throws java.lang.Exception
true if the navigation item's layout has browsable
child layouts.true if the navigation item's layout has browsable
child layouts; false otherwisejava.lang.Exception - if an exception occurredpublic boolean hasChildren()
throws java.lang.Exception
true if the navigation item's layout has child
layouts.true if the navigation item's layout has child
layouts; false otherwisejava.lang.Exception - if an exception occurredpublic int hashCode()
hashCode in class java.lang.Objectpublic void icon()
throws java.lang.Exception
java.lang.Exceptionpublic boolean isBrowsable()
public boolean isChildSelected()
throws PortalException
PortalExceptionpublic boolean isInNavigation(java.util.List<NavItem> navItems)
public boolean isSelected()
throws java.lang.Exception
java.lang.Exception