Modifier and Type | Field and Description |
---|---|
static String |
HTTP_PROTOCOL |
static String |
HTTPS_PROTOCOL |
AMP, DEFAULT_HTTP_PORT, DEFAULT_HTTPS_PORT
Constructor and Description |
---|
DefaultUrlHelper() |
Modifier and Type | Method and Description |
---|---|
void |
buildParametersString(Map<String,Object> params,
StringBuilder link,
String paramSeparator) |
void |
buildParametersString(Map<String,Object> params,
StringBuilder link,
String paramSeparator,
boolean encode) |
String |
buildUrl(String action,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Map<String,Object> params) |
String |
buildUrl(String action,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Map<String,Object> params,
String scheme,
boolean includeContext,
boolean encodeResult) |
String |
buildUrl(String action,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Map<String,Object> params,
String scheme,
boolean includeContext,
boolean encodeResult,
boolean forceAddSchemeHostAndPort) |
String |
buildUrl(String action,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Map<String,Object> params,
String urlScheme,
boolean includeContext,
boolean encodeResult,
boolean forceAddSchemeHostAndPort,
boolean escapeAmp) |
String |
decode(String input)
Decodes the URL using
URLDecoderUtil.decode(String, String) with the encoding specified in the configuration. |
String |
decode(String input,
boolean isQueryString)
Decodes the URL using
URLDecoderUtil.decode(String, String, boolean) with the encoding specified in the configuration. |
String |
encode(String input)
Encodes the URL using
URLEncoder.encode(java.lang.String) with the encoding specified in the configuration. |
protected boolean |
isValidScheme(String scheme) |
Map<String,Object> |
parseQueryString(String queryString,
boolean forceValueArray) |
void |
setEncoding(String encoding) |
void |
setHttpPort(String httpPort) |
void |
setHttpsPort(String httpsPort) |
public static final String HTTP_PROTOCOL
public static final String HTTPS_PROTOCOL
public void setEncoding(String encoding)
public void setHttpPort(String httpPort)
public void setHttpsPort(String httpsPort)
public String buildUrl(String action, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Map<String,Object> params)
public String buildUrl(String action, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Map<String,Object> params, String scheme, boolean includeContext, boolean encodeResult)
public String buildUrl(String action, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Map<String,Object> params, String scheme, boolean includeContext, boolean encodeResult, boolean forceAddSchemeHostAndPort)
public String buildUrl(String action, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Map<String,Object> params, String urlScheme, boolean includeContext, boolean encodeResult, boolean forceAddSchemeHostAndPort, boolean escapeAmp)
public void buildParametersString(Map<String,Object> params, StringBuilder link, String paramSeparator)
buildParametersString
in interface UrlHelper
public void buildParametersString(Map<String,Object> params, StringBuilder link, String paramSeparator, boolean encode)
protected boolean isValidScheme(String scheme)
public String encode(String input)
URLEncoder.encode(java.lang.String)
with the encoding specified in the configuration.input
- the input to encodepublic String decode(String input)
URLDecoderUtil.decode(String, String)
with the encoding specified in the configuration.input
- the input to decodepublic String decode(String input, boolean isQueryString)
URLDecoderUtil.decode(String, String, boolean)
with the encoding specified in the configuration.input
- the input to decodeisQueryString
- whether input is a query string. If true
other decoding rules apply.Copyright © 2000–2020 Apache Software Foundation. All rights reserved.