org.hippoecm.hst.core.sitemenu
Class AbstractMenuItem
java.lang.Object
org.hippoecm.hst.core.sitemenu.AbstractMenuItem
- All Implemented Interfaces:
- CommonMenuItem
- Direct Known Subclasses:
- EditableMenuItemImpl, HstSiteMenuItemImpl
public abstract class AbstractMenuItem
- extends Object
- implements CommonMenuItem
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
depth
protected int depth
repositoryBased
protected boolean repositoryBased
properties
protected Map<String,Object> properties
hstLink
protected HstLink hstLink
externalLink
protected String externalLink
name
protected String name
expanded
protected boolean expanded
selected
protected boolean selected
AbstractMenuItem
public AbstractMenuItem()
getDepth
public int getDepth()
- Specified by:
getDepth
in interface CommonMenuItem
- Returns:
- the depth of repository based items in case of repository based navigation
isRepositoryBased
public boolean isRepositoryBased()
- Specified by:
isRepositoryBased
in interface CommonMenuItem
- Returns:
true
when below this sitemenu item repository based navigation is expected
getProperties
public Map<String,Object> getProperties()
- Description copied from interface:
CommonMenuItem
- When developers have customized SiteMenuItem configuration with extra properties, these properties can be
accessed through this Map
- Specified by:
getProperties
in interface CommonMenuItem
- Returns:
- a Map containing the value for every property in the backing content provider for this SiteMenuItem
getHstLink
public HstLink getHstLink()
- Specified by:
getHstLink
in interface CommonMenuItem
- Returns:
- a HstLink that contains a link for this SiteMenuItem
getExternalLink
public String getExternalLink()
- Description copied from interface:
CommonMenuItem
- When this method does not return null, then by default will return
null
even if the sitemenu item
has a sitemap reference path defined
- Specified by:
getExternalLink
in interface CommonMenuItem
- Returns:
- an external (http/https etc) link or
null
if no external link is defined
getName
public String getName()
- Specified by:
getName
in interface CommonMenuItem
- Returns:
- the name of this SiteMenuItem
isExpanded
public boolean isExpanded()
- Description copied from interface:
CommonMenuItem
- A sitemenu item is expanded if one of its descendants is selected or if it is selected itself
- Specified by:
isExpanded
in interface CommonMenuItem
- Returns:
true
if the SiteMenuItem is expanded
isSelected
public boolean isSelected()
- Specified by:
isSelected
in interface CommonMenuItem
- Returns:
true
is the SiteMenuItem is selected
resolveToSiteMapItem
public ResolvedSiteMapItem resolveToSiteMapItem(HstRequest request)
- Specified by:
resolveToSiteMapItem
in interface CommonMenuItem
- Returns:
- the
ResolvedSiteMapItem
belonging to this SiteMenuItem or null
if it cannot be resolved
in the HstSiteMap
Copyright © 2008-2012 Hippo. All Rights Reserved.