org.hippoecm.hst.core.sitemenu
Class AbstractMenuItem

java.lang.Object
  extended by org.hippoecm.hst.core.sitemenu.AbstractMenuItem
All Implemented Interfaces:
CommonMenuItem
Direct Known Subclasses:
EditableMenuItemImpl, HstSiteMenuItemImpl

public abstract class AbstractMenuItem
extends Object
implements CommonMenuItem


Field Summary
protected  int depth
           
protected  boolean expanded
           
protected  String externalLink
           
protected  HstLink hstLink
           
protected  String name
           
protected  Map<String,Object> properties
           
protected  boolean repositoryBased
           
protected  boolean selected
           
 
Constructor Summary
AbstractMenuItem()
           
 
Method Summary
 int getDepth()
           
 String getExternalLink()
          When this method does not return null, then by default will return null even if the sitemenu item has a sitemap reference path defined
 HstLink getHstLink()
           
 String getName()
           
 Map<String,Object> getProperties()
          When developers have customized SiteMenuItem configuration with extra properties, these properties can be accessed through this Map
 boolean isExpanded()
          A sitemenu item is expanded if one of its descendants is selected or if it is selected itself
 boolean isRepositoryBased()
           
 boolean isSelected()
           
 ResolvedSiteMapItem resolveToSiteMapItem(HstRequest request)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

AbstractMenuItem

public AbstractMenuItem()
Method Detail

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.