org.hippoecm.hst.core.sitemenu
Interface HstSiteMenuItem

All Superinterfaces:
CommonMenuItem
All Known Implementing Classes:
HstSiteMenuItemImpl, MockHstSiteMenuItem

public interface HstSiteMenuItem
extends CommonMenuItem

The HstSiteMenuItem's is a tree of HstSiteMenuItem. The root item does not have a parent.


Method Summary
 List<HstSiteMenuItem> getChildMenuItems()
           
 HstSiteMenu getHstSiteMenu()
           
 String getLocalParameter(String name)
          The value of the local (no parameters inherited from ancestor items) parameter with possible property placeholders substituted
 Map<String,String> getLocalParameters()
           
 String getParameter(String name)
          A HstSiteMenuItem can contain a Map of parameters.
 Map<String,String> getParameters()
          Parameters are inherited from ancestor sitemenu items.
 HstSiteMenuItem getParentItem()
           
 
Methods inherited from interface org.hippoecm.hst.core.sitemenu.CommonMenuItem
getDepth, getExternalLink, getHstLink, getName, getProperties, isExpanded, isRepositoryBased, isSelected, resolveToSiteMapItem
 

Method Detail

getChildMenuItems

List<HstSiteMenuItem> getChildMenuItems()
Returns:
all direct child SiteMenuItem's of this item

getParentItem

HstSiteMenuItem getParentItem()
Returns:
parent HstSiteMenuItem or null if it is a root item

getHstSiteMenu

HstSiteMenu getHstSiteMenu()
Returns:
the container HstSiteMenu of this HstSiteMenuItem

getParameter

String getParameter(String name)
A HstSiteMenuItem can contain a Map of parameters. A parameter from this Map can be accessed through this method. If it is not present, null will be returned. The parameters are fetched from the HstSiteMenuItemConfiguration.getParameter(String), but in the value possible property placeholders in the value are replaced by the wildcards from HstSiteMapItem that was matched. When there are property placeholders that can not be resolved, the value is set to null Parameters are inherited from ancestor HstSiteMenuItem's. When this HstSiteMenuItem configures the same parameter as an ancestor, the value from the ancestor is overwritten.

Parameters:
name - the name of the parameter
Returns:
the value of the parameter or null when not present or has unresolved property placeholders

getLocalParameter

String getLocalParameter(String name)
The value of the local (no parameters inherited from ancestor items) parameter with possible property placeholders substituted

Parameters:
name - the name of the parameter
Returns:
the value of the parameter or null when not present or has unresolved property placeholders
See Also:
#getParameter(String)}, only this method returns parameters without inheritance

getParameters

Map<String,String> getParameters()
Parameters are inherited from ancestor sitemenu items. When this sitemenu item configures the same parameter as an ancestor, the value from the ancestor is overwritten.

Returns:
the Map of parameters contained in this HstSiteMenu. If no parameters present, and empty map is returned
See Also:
#getParameter(String)}, only now the entire parameters map is returned.

getLocalParameters

Map<String,String> getLocalParameters()
Returns:
the Map of parameters contained in this HstSiteMapItem. If no parameters present, and empty map is returned
See Also:
#getParameters()}, only this method returns parameters without inheritance


Copyright © 2008-2012 Hippo. All Rights Reserved.