public class NavItem
extends Object
implements Serializable
portal-normal.vm
.Constructor and Description |
---|
NavItem(javax.servlet.http.HttpServletRequest request,
Layout layout,
Map<String,Object> contextObjects) |
NavItem(javax.servlet.http.HttpServletRequest request,
ThemeDisplay themeDisplay,
Layout layout,
Map<String,Object> contextObjects) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
static List<NavItem> |
fromLayouts(javax.servlet.http.HttpServletRequest request,
List<Layout> layouts,
Map<String,Object> contextObjects)
Deprecated.
As of Judson (7.1.x), replaced by
fromLayouts(HttpServletRequest, ThemeDisplay, Map) |
static List<NavItem> |
fromLayouts(javax.servlet.http.HttpServletRequest request,
ThemeDisplay themeDisplay,
Map<String,Object> contextObjects) |
List<NavItem> |
getBrowsableChildren()
Returns all of the browsable child layouts that the current user has
permission to access from this navigation item's layout.
|
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.
|
String |
getName()
Returns the HTML-escaped name of the navigation item's layout.
|
String |
getRegularFullURL()
Returns the full, absolute URL (including the portal's URL) of the
navigation item's layout.
|
String |
getRegularURL()
Returns the regular URL of the navigation item's layout.
|
String |
getResetLayoutURL() |
String |
getResetMaxStateURL() |
String |
getTarget()
Returns the target of the navigation item's layout.
|
String |
getTitle()
Returns the title of the navigation item's layout in the current
request's locale.
|
String |
getUnescapedName()
Returns the unescaped name of the navigation item's layout in the current
request's locale.
|
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() |
String |
iconURL() |
boolean |
isBrowsable() |
boolean |
isChildSelected() |
boolean |
isInNavigation(List<NavItem> navItems) |
boolean |
isSelected() |
public NavItem(javax.servlet.http.HttpServletRequest request, Layout layout, Map<String,Object> contextObjects)
public NavItem(javax.servlet.http.HttpServletRequest request, ThemeDisplay themeDisplay, Layout layout, Map<String,Object> contextObjects)
@Deprecated public static List<NavItem> fromLayouts(javax.servlet.http.HttpServletRequest request, List<Layout> layouts, Map<String,Object> contextObjects)
fromLayouts(HttpServletRequest, ThemeDisplay, Map)
No permission checks are performed in this method. Permissions of child
layouts are honored when accessing them via getChildren()
.
request
- the currently served HttpServletRequest
layouts
- the layouts from which to create the navigation itemsnull
if the collection of layouts was
null
.public static List<NavItem> fromLayouts(javax.servlet.http.HttpServletRequest request, ThemeDisplay themeDisplay, Map<String,Object> contextObjects) throws PortalException
PortalException
public boolean equals(Object obj)
equals
in class Object
public List<NavItem> getBrowsableChildren() throws Exception
Exception
- if an exception occurredpublic List<NavItem> getChildren() throws Exception
Exception
- if an exception occurredpublic Layout getLayout()
public long getLayoutId()
public String getName()
public String getRegularFullURL() throws Exception
Exception
- if an exception occurredpublic String getRegularURL() throws Exception
Exception
- if an exception occurredpublic String getResetLayoutURL() throws Exception
Exception
public String getResetMaxStateURL() throws Exception
Exception
public String getTarget()
public String getTitle()
public String getUnescapedName()
public String getURL() throws Exception
Exception
- if an exception occurredpublic boolean hasBrowsableChildren() throws Exception
true
if the navigation item's layout has browsable
child layouts.true
if the navigation item's layout has browsable
child layouts; false
otherwiseException
- if an exception occurredpublic boolean hasChildren() throws Exception
true
if the navigation item's layout has child
layouts.true
if the navigation item's layout has child
layouts; false
otherwiseException
- if an exception occurredpublic int hashCode()
hashCode
in class Object
public String iconURL() throws Exception
Exception
public boolean isBrowsable()
public boolean isChildSelected() throws PortalException
PortalException
public boolean isInNavigation(List<NavItem> navItems)
public boolean isSelected() throws Exception
Exception