public abstract class URLEncoder extends Object
Constructor and Description |
---|
URLEncoder() |
Modifier and Type | Method and Description |
---|---|
abstract String |
encodeActionURL(String url)
This function should be the same as the
ExternalContext.encodeActionURL(String)
method. |
String |
encodeBookmarkableURL(String url,
Map<String,List<String>> params)
The purpose of this method is to generate a query string from the collection of Parameter
objects provided by the parameters argument and append that query string to the baseUrl.
|
abstract String |
encodeInProtocolResourceURL(String url)
Encodes a url to a resource such that it is inProtocol.
|
abstract String |
encodePartialActionURL(String url)
This encodes a URL so that it can be used to make a PPR request in all containers.
|
abstract String |
encodeRedirectURL(String url)
Encodes a url to be explicitly used for a redirect.
|
String |
encodeRedirectURL(String url,
Map<String,List<String>> parameters)
Encodes a url to be explicitly used for a redirect.
|
abstract String |
encodeResourceURL(String url)
Encodes a url as a resource.
|
abstract String |
encodeSkinResourceURL(String url)
Encodes a resource URL that is mapped to a skinning resources.
|
public abstract String encodeActionURL(String url)
ExternalContext.encodeActionURL(String)
method. By default it call the code in the ExternalContext. The reason its
provided here is that certain URLEncoderUtility instances may wish to override
the default functionality and have the ExternalContext pull its default encoding
from here.public abstract String encodePartialActionURL(String url)
url
- the unencoded urlIllegalArgumentException
- if the URL cannot be encodedpublic abstract String encodeRedirectURL(String url)
#encodeRedirectURL(String,Map>)
with an empty parameter map.url
- the unencoded urlIllegalArgumentException
- if the URL cannot be encodedpublic String encodeRedirectURL(String url, Map<String,List<String>> parameters)
url
- the unencoded urlIllegalArgumentException
- if the URL cannot be encodedUnsupportedOperationException
- if the implementation of the URLEncoder is not implemented.ExternalContext.encodeRedirectURL(java.lang.String, java.util.Map<java.lang.String, java.util.List<java.lang.String>>)
public abstract String encodeResourceURL(String url)
ExternalContext.encodeResourceURL(String)
. The url returned from this
method is NOT guarenteed to be in-protocol (meaning that it MAY not have access
to session information). The advantage of encoding something in this fashion
is that in certain types of containers, like portals, the URL generated may
have faster access and will generally work better for the purposes of caching
do to its RESTful state.url
- the unencoded urlIllegalArgumentException
- if the URL cannot be encodedpublic abstract String encodeInProtocolResourceURL(String url)
url
- the unencoded urlIllegalArgumentException
- if the URL cannot be encodedpublic abstract String encodeSkinResourceURL(String url)
url
- public String encodeBookmarkableURL(String url, Map<String,List<String>> params)
url
- the base urlparams
- a map of parametersUnsupportedOperationException
- if the default implementation does not support encoding
of bookmarkable urls.Copyright © 2001-2017 The Apache Software Foundation. All Rights Reserved.