Package org.hippoecm.hst.core.request
Interface ResolvedSiteMapItem
public interface ResolvedSiteMapItem
An instance of the implementation of this interface will be available on the
HstRequestContext
. It has a reference
to the HstSiteMapItem
that matched the request, and a reference to the corresponding HstComponentConfiguration
.
Just as the HstSiteMapItem
, this interface has the same methods getParameters()
and getParameter(String)
.
A ResolvedSiteMapItem implementation though does not have to return a unmodifiable map for getParameters()
as opposed to
the one from HstSiteMapItem.getParameters()
. Furthermore, typically a ResolvedSiteMapItem implementation returns the same
parameters as where on the HstSiteMapItem available, but resolves any property placeholders.
For example, if the HstSiteMapItem
that was used to create this ResolvedSiteMapItem
instance, had a property placeholder
in a parameter like : foo = ${1}
, then the ResolvedSiteMapItem
instance might have replaced ${1}
with something
from the pathInfo. The ResolvedSiteMapItem
is allowed to return null
values for parameters that do exist.-
Method Summary
Modifier and TypeMethodDescriptionint
getLocalParameter
(String name) SeegetParameter(String)
only without inheritance of ancestor itemsSeegetParameters()
only without inheritance of ancestor itemsReturns thenamedPipeline
to be used for the Hst Request Processing.getParameter
(String name) Returns a property from the HstSiteMapItem configuration but should have replaced possible property placeholders.Return the parameter map from the HstSiteMapItem configuration, but all values containing property placeholders should be resolved.Returns a relative path from hst request path to the SiteMapItem that was matched.This method returns a content path, relative to theMount.getContentPath()
.getRoles()
int
getUsers()
boolean
boolean
-
Method Details
-
getResolvedMount
ResolvedMount getResolvedMount()- Returns:
- the
ResolvedMount
for this resolvedSiteMapItem instance
-
getRelativeContentPath
String getRelativeContentPath()This method returns a content path, relative to theMount.getContentPath()
. This value should have resolved property placeholders, like ${1}/${2}. If a property placeholder cannot be resolved, the implementation may returnnull
- Returns:
- the content path relative to the
Mount.getContentPath()
ornull
if not present or has unresolvable property placeholders
-
getPathInfo
String getPathInfo()Returns a relative path from hst request path to the SiteMapItem that was matched. This path never starts with a "/".- Returns:
- the matched path to this
ResolvedSiteMapItem
, relative to the mount path
-
getPageTitle
String getPageTitle()- Returns:
- the page title for this
ResolvedSiteMapItem
ornull
if not configured or configured incorrect: An incorrect configuration is the case when there are property placeholders used for wildcards that cannot be resolved.
-
getParameter
Returns a property from the HstSiteMapItem configuration but should have replaced possible property placeholders. If a property placeholder cannot be resolved, the implementation can returnnull
. Parameters are inherited from ancestor items, but in case of the same name, ancestor items have a lower precedence- Parameters:
name
- the name of the parameter- Returns:
- the value of the parameter and
null
if the parameter is not there or a property placeholder cannot be resolved
-
getLocalParameter
SeegetParameter(String)
only without inheritance of ancestor items- Parameters:
name
- the name of the parameter- Returns:
- the value of the parameter and
null
if the parameter is not there or a property placeholder cannot be resolved
-
getParameters
Properties getParameters()Return the parameter map from the HstSiteMapItem configuration, but all values containing property placeholders should be resolved. Parameters are inherited from ancestor items, but in case of the same name, ancestor items have a lower precedence- Returns:
- the all the parameters as a Properties map, and an empty Properties object when no parameters defined or inherited, or the parameter values cannot be resolved
-
getLocalParameters
Properties getLocalParameters()SeegetParameters()
only without inheritance of ancestor items- Returns:
- the all the parameters as a Properties map, and an empty Properties object when no parameters defined, or the parameter values cannot be resolved
-
getHstSiteMapItem
HstSiteMapItem getHstSiteMapItem()- Returns:
- the
HstSiteMapItem
that is matched for this request
-
getNamedPipeline
String getNamedPipeline()Returns thenamedPipeline
to be used for the Hst Request Processing. When the backingHstSiteMapItem
does not contain one, possibly, when present, it is inherited from its backingMount
. If this one does not have it either,null
is returned implying the default pipeline will be called- Returns:
- the
namedPipeline
for this ResolvedSiteMapItem ornull
implying the default should be used
-
getStatusCode
int getStatusCode()- Returns:
- the statusCode specified by
HstSiteMapItem.getStatusCode()
-
getErrorCode
int getErrorCode()- Returns:
- the errorCode specified by
HstSiteMapItem.getErrorCode()
-
isAuthenticated
boolean isAuthenticated()- Returns:
true
ifgetRoles()
should be applied to this ResolvedSiteMap item
-
getRoles
- Returns:
- the roles that are allowed to proceed the request with this resolved sitemap item. If no roles present, and empty list is returned
-
getUsers
- Returns:
- the users that are allowed to proceed the request with this resolved sitemap item. If no users present, and empty list is returned
-
getHstComponentConfiguration
HstComponentConfiguration getHstComponentConfiguration()- Returns:
- the root
HstComponentConfiguration
that is configured on the backinggetHstSiteMapItem()
of this ResolvedSiteMapItem
-
isExperiencePage
boolean isExperiencePage()- Returns:
true
if an Experience Page is being rendered
-