org.hippoecm.hst.configuration.sitemenu
Class HstSiteMenuItemConfigurationService

java.lang.Object
  extended by org.hippoecm.hst.configuration.sitemenu.HstSiteMenuItemConfigurationService
All Implemented Interfaces:
HstSiteMenuItemConfiguration

public class HstSiteMenuItemConfigurationService
extends Object
implements HstSiteMenuItemConfiguration


Constructor Summary
HstSiteMenuItemConfigurationService(HstNode siteMenuItem, HstSiteMenuItemConfiguration parent, HstSiteMenuConfiguration hstSiteMenuConfiguration)
           
 
Method Summary
 List<HstSiteMenuItemConfiguration> getChildItemConfigurations()
           
 int getDepth()
           
 String getExternalLink()
          When a sitemenu item has an external link (http://...) configured, it is retrieved by this method.
 HstSiteMenuConfiguration getHstSiteMenuConfiguration()
           
 String getLocalParameter(String name)
          The value of the local parameter, where there are no parameters inherited from ancestor items
 Map<String,String> getLocalParameters()
           
 String getMountAlias()
          If not null the mount belonging to this alias is used for creating the sitemenu item link
 String getName()
           
 String getParameter(String name)
          A HstSiteMenuItemConfiguration can contain a Map of parameters.
 Map<String,String> getParameters()
          Parameters are inherited from ancestor HstSiteMenuItemConfiguration's.
 HstSiteMenuItemConfiguration getParentItemConfiguration()
           
 Map<String,Object> getProperties()
          When developers have customized SiteMenuItem configuration with extra properties, these properties can be accessed through this Map
 String getSiteMapItemPath()
          The sitemapitem path can point to a sitemap item that contains wildcards.
 boolean isRepositoryBased()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HstSiteMenuItemConfigurationService

public HstSiteMenuItemConfigurationService(HstNode siteMenuItem,
                                           HstSiteMenuItemConfiguration parent,
                                           HstSiteMenuConfiguration hstSiteMenuConfiguration)
                                    throws ServiceException
Throws:
ServiceException
Method Detail

getChildItemConfigurations

public List<HstSiteMenuItemConfiguration> getChildItemConfigurations()
Specified by:
getChildItemConfigurations in interface HstSiteMenuItemConfiguration
Returns:
all direct child SiteMenuItemConfiguration's of this item

getName

public String getName()
Specified by:
getName in interface HstSiteMenuItemConfiguration
Returns:
the name of this SiteMenuItem

getParentItemConfiguration

public HstSiteMenuItemConfiguration getParentItemConfiguration()
Specified by:
getParentItemConfiguration in interface HstSiteMenuItemConfiguration
Returns:
the parent HstSiteMenuItemConfiguration and null is none exists (ie, it is a root)

getHstSiteMenuConfiguration

public HstSiteMenuConfiguration getHstSiteMenuConfiguration()
Specified by:
getHstSiteMenuConfiguration in interface HstSiteMenuItemConfiguration
Returns:
the container HstSiteMenuConfiguration of this HstSiteMenuItemConfiguration

getSiteMapItemPath

public String getSiteMapItemPath()
Description copied from interface: HstSiteMenuItemConfiguration
The sitemapitem path can point to a sitemap item that contains wildcards. The sitemapitem path can be for example 'news/2009/may', and the sitemap item which is resolved as the link to this sitemenu item might be 'news/'*'/'*''

Specified by:
getSiteMapItemPath in interface HstSiteMenuItemConfiguration
Returns:
the sitemap path that should be able to resolve the link for this sitemenu configuration item

getExternalLink

public String getExternalLink()
Description copied from interface: HstSiteMenuItemConfiguration
When a sitemenu item has an external link (http://...) configured, it is retrieved by this method. When no external link is configured, null is returned. When an external link is configured, the is ignored

Specified by:
getExternalLink in interface HstSiteMenuItemConfiguration
Returns:
the configured external link or null if non is configured

getDepth

public int getDepth()
Specified by:
getDepth in interface HstSiteMenuItemConfiguration
Returns:
the depth of repository based items in case of repository based navigation

isRepositoryBased

public boolean isRepositoryBased()
Specified by:
isRepositoryBased in interface HstSiteMenuItemConfiguration
Returns:
true when below this sitemenu item repository based navigation is expected

getParameter

public String getParameter(String name)
Description copied from interface: HstSiteMenuItemConfiguration
A HstSiteMenuItemConfiguration 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. Parameters are inherited from ancestor HstSiteMenuItemConfiguration's. When this HstSiteMenuItemConfiguration configures the same parameter as an ancestor, the value from the ancestor is overwritten. Implementations should return an unmodifiable map, for example Collections.UnmodifiableMap to avoid client code changing configurationn

Specified by:
getParameter in interface HstSiteMenuItemConfiguration
Parameters:
name - the name of the parameter
Returns:
the value of the parameter or null when not present

getParameters

public Map<String,String> getParameters()
Description copied from interface: HstSiteMenuItemConfiguration
Parameters are inherited from ancestor HstSiteMenuItemConfiguration's. When this HstSiteMenuItemConfiguration configures the same parameter as an ancestor, the value from the ancestor is overwritten.

Specified by:
getParameters in interface HstSiteMenuItemConfiguration
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.

getLocalParameter

public String getLocalParameter(String name)
Description copied from interface: HstSiteMenuItemConfiguration
The value of the local parameter, where there are no parameters inherited from ancestor items

Specified by:
getLocalParameter in interface HstSiteMenuItemConfiguration
Parameters:
name - the name of the parameter
Returns:
the value of the parameter or null when not present
See Also:
#getParameter(String)}, only this method returns parameters without inheritance

getLocalParameters

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

getProperties

public Map<String,Object> getProperties()
Description copied from interface: HstSiteMenuItemConfiguration
When developers have customized SiteMenuItem configuration with extra properties, these properties can be accessed through this Map

Specified by:
getProperties in interface HstSiteMenuItemConfiguration
Returns:
a Map containing the value for every property in the backing content provider for this SiteMenuItem

getMountAlias

public String getMountAlias()
Description copied from interface: HstSiteMenuItemConfiguration
If not null the mount belonging to this alias is used for creating the sitemenu item link

Specified by:
getMountAlias in interface HstSiteMenuItemConfiguration
Returns:
the alias of the Mount to create the link for and null if the mount from the HstRequestContext can be used


Copyright © 2008-2012 Hippo. All Rights Reserved.