Package org.hippoecm.hst.core.container
Interface HstContainerURLProvider
public interface HstContainerURLProvider
The URL provider for the
HstContainerURL
.
This is responsible for creating, parsing and stringifying the HstContainerURL
.- Version:
- $Id$
-
Method Summary
Modifier and TypeMethodDescriptioncreateURL
(Mount mount, HstContainerURL baseURL, String path) Creates anHstContainerURL
instance for a new pathInfo (without query parameters) based on theMount
and the baseHstContainerURL
instance.createURL
(HstContainerURL baseContainerURL, String pathInfo) Creates anHstContainerURL
instance for a new pathInfo (without query parameters) based on the baseHstContainerURL
instancecreateURL
(HstContainerURL baseContainerURL, HstURL hstUrl) Creates anHstContainerURL
instance by merging the information of hstUrl based on the baseHstContainerURL
instanceReturns the parameter name component separator.void
mergeParameters
(HstContainerURL containerURL, String referenceNamespace, Map<String, String[]> parameters) Merges the render parameters into the containerURL.parseURL
(jakarta.servlet.http.HttpServletRequest servletRequest, jakarta.servlet.http.HttpServletResponse servletResponse, ResolvedMount resolvedMount) Parses the current request and creates anHstContainerURL
instance.parseURL
(jakarta.servlet.http.HttpServletRequest request, ResolvedMount mount, String requestPath, Map<String, String[]> queryParams) Parses a request for a specificResolvedMount
and requestPath and creates anHstContainerURL
instance.parseURL
(HstRequestContext requestContext, ResolvedMount mount, String requestPath, Map<String, String[]> queryParams) Parses a specified requestPath with the currentHstRequestContext
for a newResolvedMount
and requestPath and creates anHstContainerURL
instance.parseURL
(ResolvedMount mount, String contextPath, String requestPath, Map<String, String[]> queryParams, String requestCharacterEncoding, String requestURIEncoding) Parses a request for a specificResolvedMount
, contextPath, requestPath and request character and uri encoding and creates anHstContainerURL
instance.void
setParameterNameComponentSeparator
(String parameterNameComponentSeparator) Sets the parameter name component separator.toURLString
(HstContainerURL containerURL, HstRequestContext requestContext) Stringifying the containerURL as a full URL string.toURLString
(HstContainerURL containerURL, HstRequestContext requestContext, String contextPath) Stringifying the containerURL as a full URL string.toURLString
(HstContainerURL containerURL, HstRequestContext requestContext, String contextPath, boolean containerResource) Stringifying the containerURL as a full URL string.
-
Method Details
-
setParameterNameComponentSeparator
Sets the parameter name component separator. If this is set to ':' and the parameter name is 'p1' with value 'v1', then the parameter pair for the HstComponent having the reference namespace 'a' should be 'a:p1=v1'.- Parameters:
parameterNameComponentSeparator
-
-
getParameterNameComponentSeparator
String getParameterNameComponentSeparator()Returns the parameter name component separator.- Returns:
- the parameter name component separator.
-
parseURL
HstContainerURL parseURL(jakarta.servlet.http.HttpServletRequest servletRequest, jakarta.servlet.http.HttpServletResponse servletResponse, ResolvedMount resolvedMount) Parses the current request and creates anHstContainerURL
instance.- Parameters:
servletRequest
-servletResponse
-resolvedMount
-
-
parseURL
HstContainerURL parseURL(HstRequestContext requestContext, ResolvedMount mount, String requestPath, Map<String, String[]> queryParams) Parses a specified requestPath with the currentHstRequestContext
for a newResolvedMount
and requestPath and creates anHstContainerURL
instance.- Parameters:
requestContext
-mount
-requestPath
-queryParams
-
-
parseURL
HstContainerURL parseURL(jakarta.servlet.http.HttpServletRequest request, ResolvedMount mount, String requestPath, Map<String, String[]> queryParams) Parses a request for a specificResolvedMount
and requestPath and creates anHstContainerURL
instance.- Parameters:
request
-mount
-requestPath
-queryParams
-
-
parseURL
HstContainerURL parseURL(ResolvedMount mount, String contextPath, String requestPath, Map<String, String[]> queryParams, String requestCharacterEncoding, String requestURIEncoding) Parses a request for a specificResolvedMount
, contextPath, requestPath and request character and uri encoding and creates anHstContainerURL
instance. This operation doesn't depend on HttpServletRequest.- Parameters:
mount
-contextPath
-requestPath
-queryParams
-requestCharacterEncoding
-requestURIEncoding
-
-
createURL
Creates anHstContainerURL
instance for a new pathInfo (without query parameters) based on the baseHstContainerURL
instance- Parameters:
baseContainerURL
-pathInfo
-
-
createURL
Creates anHstContainerURL
instance for a new pathInfo (without query parameters) based on theMount
and the baseHstContainerURL
instance.- Parameters:
mount
-baseURL
-path
-
-
createURL
Creates anHstContainerURL
instance by merging the information of hstUrl based on the baseHstContainerURL
instance- Parameters:
baseContainerURL
-hstUrl
-
-
mergeParameters
void mergeParameters(HstContainerURL containerURL, String referenceNamespace, Map<String, String[]> parameters) Merges the render parameters into the containerURL.- Parameters:
containerURL
-referenceNamespace
-parameters
-
-
toURLString
String toURLString(HstContainerURL containerURL, HstRequestContext requestContext) throws UnsupportedEncodingException, ContainerException Stringifying the containerURL as a full URL string.- Parameters:
containerURL
-requestContext
-- Throws:
UnsupportedEncodingException
ContainerException
-
toURLString
String toURLString(HstContainerURL containerURL, HstRequestContext requestContext, String contextPath) throws UnsupportedEncodingException, ContainerException Stringifying the containerURL as a full URL string.By this method, you can specify the context path such as '/mycontext'.
- Parameters:
containerURL
-requestContext
-contextPath
-- Throws:
UnsupportedEncodingException
ContainerException
-
toURLString
String toURLString(HstContainerURL containerURL, HstRequestContext requestContext, String contextPath, boolean containerResource) throws UnsupportedEncodingException, ContainerException Stringifying the containerURL as a full URL string.By this method, you can specify the context path such as '/mycontext'.
- Parameters:
containerURL
-requestContext
-contextPath
-containerResource
-true
if the toURLString is meant for a container resource (like a binary)- Throws:
UnsupportedEncodingException
ContainerException
-