Interface HstSiteMenuItemConfiguration
-
public interface HstSiteMenuItemConfiguration
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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 itemsMap<String,String>
getLocalParameters()
String
getMountAlias()
If notnull
the mount belonging to this alias is used for creating the sitemenu item linkString
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 MapSet<String>
getRoles()
Returns the roles that are allowed to view thisHstSiteMenuItemConfiguration
.String
getSiteMapItemPath()
The sitemapitem path can point to a sitemap item that contains wildcards.boolean
isRepositoryBased()
-
-
-
Method Detail
-
getName
String getName()
- Returns:
- the name of this SiteMenuItem
-
getSiteMapItemPath
String getSiteMapItemPath()
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/'*'/'*''- Returns:
- the sitemap path that should be able to resolve the link for this sitemenu configuration item
-
getExternalLink
String getExternalLink()
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, thegetSiteMapItemPath()
is ignored- Returns:
- the configured external link or
null
if non is configured
-
getHstSiteMenuConfiguration
HstSiteMenuConfiguration getHstSiteMenuConfiguration()
- Returns:
- the container
HstSiteMenuConfiguration
of thisHstSiteMenuItemConfiguration
-
getChildItemConfigurations
List<HstSiteMenuItemConfiguration> getChildItemConfigurations()
- Returns:
- all direct child
SiteMenuItemConfiguration
's of this item
-
getParentItemConfiguration
HstSiteMenuItemConfiguration getParentItemConfiguration()
- Returns:
- the parent
HstSiteMenuItemConfiguration
andnull
is none exists (ie, it is a root)
-
getProperties
Map<String,Object> getProperties()
When developers have customized SiteMenuItem configuration with extra properties, these properties can be accessed through this Map- Returns:
- a Map containing the value for every property in the backing content provider for this SiteMenuItem
-
isRepositoryBased
boolean isRepositoryBased()
- Returns:
true
when below this sitemenu item repository based navigation is expected
-
getDepth
int getDepth()
- Returns:
- the depth of repository based items in case of repository based navigation
-
getParameter
String getParameter(String name)
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 exampleCollections.UnmodifiableMap
to avoid client code changing configurationn- Parameters:
name
- the name of the parameter- Returns:
- the value of the parameter or
null
when not present
-
getLocalParameter
String getLocalParameter(String name)
The value of the local parameter, where there are no parameters inherited from ancestor items- Parameters:
name
- the name of the parameter- Returns:
- the value of the parameter or
null
when not present - See Also:
, only this method returns parameters without inheritance
-
getParameters
Map<String,String> getParameters()
Parameters are inherited from ancestor HstSiteMenuItemConfiguration's. When this HstSiteMenuItemConfiguration 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:
, only now the entire parameters map is returned.
-
getLocalParameters
Map<String,String> getLocalParameters()
- Returns:
- the Map of parameters contained in this
HstSiteMenuItemConfiguration
. If no parameters present, and empty map is returned - See Also:
, only this method returns parameters (unmodifiable map) without inheritance
-
getMountAlias
String getMountAlias()
If notnull
the mount belonging to this alias is used for creating the sitemenu item link- Returns:
- the alias of the
Mount
to create the link for andnull
if the mount from theHstRequestContext
can be used
-
getRoles
Set<String> getRoles()
Returns the roles that are allowed to view this
HstSiteMenuItemConfiguration
. If a request is not in the right role (HttpServletRequest.isUserInRole(String)
}), the sitemenu item won't be visible. If the sitemeniitem does not have any roles defined by itself, it inherits them from the parent. If it defines roles by itself, the roles from any ancestor are ignored.An empty list of roles (property exists but no values) means nobody can view the sitemenuitem!. A missing property for roles means everybody can view the sitemenu item.
- Returns:
- The set of roles that are allowed to view this sitemenu item. When no property roles defined, the roles from the parent
item are inherited. If no-one is allowed to view this item, an Empty list of roles should be returned. If everyone
is allowed to view this item,
null
must be returned
-
-