Package org.hippoecm.hst.core.request
Interface ResolvedSiteMapItem
-
public interface ResolvedSiteMapItem
An instance of the implementation of this interface will be available on the
. It has a reference to theHstRequestContext
that matched the request, and a reference to the correspondingHstSiteMapItem
. Just as theHstComponentConfiguration
, this interface has the same methodsHstSiteMapItem
andgetParameters()
. A ResolvedSiteMapItem implementation though does not have to return a unmodifiable map forgetParameter(String)
as opposed to the one fromgetParameters()
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 theHstSiteMapItem
that was used to create thisResolvedSiteMapItem
instance, had a property placeholder in a parameter like :foo = ${1}
, then theResolvedSiteMapItem
instance might have replaced${1}
with something from the pathInfo. TheResolvedSiteMapItem
is allowed to returnnull
values for parameters that do exist.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getErrorCode()
HstComponentConfiguration
getHstComponentConfiguration()
HstSiteMapItem
getHstSiteMapItem()
String
getLocalParameter(String name)
SeegetParameter(String)
only without inheritance of ancestor itemsProperties
getLocalParameters()
SeegetParameters()
only without inheritance of ancestor itemsString
getNamedPipeline()
Returns thenamedPipeline
to be used for the Hst Request Processing.String
getPageTitle()
String
getParameter(String name)
Returns a property from the HstSiteMapItem configuration but should have replaced possible property placeholders.Properties
getParameters()
Return the parameter map from the HstSiteMapItem configuration, but all values containing property placeholders should be resolved.String
getPathInfo()
Returns a relative path from hst request path to the SiteMapItem that was matched.String
getRelativeContentPath()
This method returns a content path, relative to theMount.getContentPath()
.ResolvedMount
getResolvedMount()
Set<String>
getRoles()
int
getStatusCode()
Set<String>
getUsers()
boolean
isAuthenticated()
boolean
isExperiencePage()
-
-
-
Method Detail
-
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
String getParameter(String name)
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
String getLocalParameter(String name)
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
Set<String> 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
Set<String> 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
-
-