Interface HstURL


  • public interface HstURL
    The HstURL interface represents a URL that reference the HstComponent itself.

    An HstURL is created through the HstResponse. Parameters can be added to HstURL objects.

    There are four types of HstURLs:

    The string representation of a HstURL does not need to be a valid URL at the time the HstComponent is generating its content. It may contain special tokens that will be converted to a valid URL by the container before the content is returned to the client.

    Version:
    $Id$
    • Method Detail

      • getType

        String getType()
        Returns the url type: render, action or resource
      • getReferenceNamespace

        String getReferenceNamespace()
        Returns the reference namespace
        Returns:
        String
      • setParameter

        void setParameter​(String name,
                          String value)
        Sets a parameter of this url.
        Parameters:
        name -
        value -
      • setParameter

        void setParameter​(String name,
                          String[] values)
        Sets a parameter array of this url.
        Parameters:
        name -
        values -
      • setParameters

        void setParameters​(Map<String,​String[]> parameters)
        Sets parameter map of this url
        Parameters:
        parameters -
      • toString

        String toString()
        Returns string representation of this url.
        Overrides:
        toString in class Object
      • toString

        String toString​(boolean containerResource)
        Returns String representation of url, possibly depending on whether containerResource is true or false : Container resources in specific cases need to return a different url. For example the URL for a container resource in case of the PageModelAPI should never include ResolvedMount.getMatchingIgnoredPrefix() : typically this value in the preview CM is _cmsinternal, but for PageModelApi responses this should never be included for container resources
      • getParameterMap

        Map<String,​String[]> getParameterMap()
        Returns the parameter map of this url.
      • write

        void write​(Writer out,
                   boolean escapeXML)
            throws IOException
        Writes the string representation of this url, as xml-escaped.
        Parameters:
        out -
        escapeXML -
        Throws:
        IOException
      • setResourceID

        void setResourceID​(String resourceID)
        Allows setting a resource ID that can be retrieved when serving the resource through HstRequest.getResourceID() method in a HstComponent instance.
        Parameters:
        resourceID -
      • getResourceID

        String getResourceID()
        Returns the resource ID
        Returns:
        the resource ID