Package org.hippoecm.hst.core.container
Interface HstContainerURLProvider
-
public interface HstContainerURLProvider
The URL provider for theHstContainerURL
. This is responsible for creating, parsing and stringifying theHstContainerURL
.- Version:
- $Id$
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description HstContainerURL
createURL(Mount mount, HstContainerURL baseURL, String path)
Creates anHstContainerURL
instance for a new pathInfo (without query parameters) based on theMount
and the baseHstContainerURL
instance.HstContainerURL
createURL(HstContainerURL baseContainerURL, String pathInfo)
Creates anHstContainerURL
instance for a new pathInfo (without query parameters) based on the baseHstContainerURL
instanceHstContainerURL
createURL(HstContainerURL baseContainerURL, HstURL hstUrl)
Creates anHstContainerURL
instance by merging the information of hstUrl based on the baseHstContainerURL
instanceString
getParameterNameComponentSeparator()
Returns the parameter name component separator.void
mergeParameters(HstContainerURL containerURL, String referenceNamespace, Map<String,String[]> parameters)
Merges the render parameters into the containerURL.HstContainerURL
parseURL(javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse, ResolvedMount resolvedMount)
Parses the current request and creates anHstContainerURL
instance.HstContainerURL
parseURL(javax.servlet.http.HttpServletRequest request, ResolvedMount mount, String requestPath, Map<String,String[]> queryParams)
Parses a request for a specificResolvedMount
and requestPath and creates anHstContainerURL
instance.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.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.void
setParameterNameComponentSeparator(String parameterNameComponentSeparator)
Sets the parameter name component separator.String
toURLString(HstContainerURL containerURL, HstRequestContext requestContext)
Stringifying the containerURL as a full URL string.String
toURLString(HstContainerURL containerURL, HstRequestContext requestContext, String contextPath)
Stringifying the containerURL as a full URL string.String
toURLString(HstContainerURL containerURL, HstRequestContext requestContext, String contextPath, boolean containerResource)
Stringifying the containerURL as a full URL string.
-
-
-
Method Detail
-
setParameterNameComponentSeparator
void setParameterNameComponentSeparator(String parameterNameComponentSeparator)
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(javax.servlet.http.HttpServletRequest servletRequest, javax.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(javax.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
HstContainerURL createURL(HstContainerURL baseContainerURL, String pathInfo)
Creates anHstContainerURL
instance for a new pathInfo (without query parameters) based on the baseHstContainerURL
instance- Parameters:
baseContainerURL
-pathInfo
-
-
createURL
HstContainerURL createURL(Mount mount, HstContainerURL baseURL, String path)
Creates anHstContainerURL
instance for a new pathInfo (without query parameters) based on theMount
and the baseHstContainerURL
instance.- Parameters:
mount
-baseURL
-path
-
-
createURL
HstContainerURL createURL(HstContainerURL baseContainerURL, HstURL hstUrl)
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
-
-