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 Details

    • getResolvedMount

      ResolvedMount getResolvedMount()
      Returns:
      the ResolvedMount for this resolvedSiteMapItem instance
    • getRelativeContentPath

      String getRelativeContentPath()
      This method returns a content path, relative to the Mount.getContentPath(). This value should have resolved property placeholders, like ${1}/${2}. If a property placeholder cannot be resolved, the implementation may return null
      Returns:
      the content path relative to the Mount.getContentPath() or null 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 or null 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 return null. 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)
      See getParameter(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()
      See getParameters() 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 the namedPipeline to be used for the Hst Request Processing. When the backing HstSiteMapItem does not contain one, possibly, when present, it is inherited from its backing Mount. If this one does not have it either, null is returned implying the default pipeline will be called
      Returns:
      the namedPipeline for this ResolvedSiteMapItem or null 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 if getRoles() 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 backing getHstSiteMapItem() of this ResolvedSiteMapItem
    • isExperiencePage

      boolean isExperiencePage()
      Returns:
      true if an Experience Page is being rendered