org.apache.beehive.netui.pageflow.internal
Class DefaultTemplatedURLFormatter
Object
TemplatedURLFormatter
DefaultTemplatedURLFormatter
public class DefaultTemplatedURLFormatter
- extends TemplatedURLFormatter
Default implementation of TemplatedURLFormatter for formatting URLs
based on templates from a URL template config file.
Used by URLRewriterService to apply any relevant templates to a URL,
after all other rewriting has been done on the URL.
Method Summary |
String |
getTemplatedURL(ServletContext servletContext,
ServletRequest request,
MutableURI uri,
String key,
URIContext uriContext)
Format the given URL using a URL template, if defined in a URL
template config file. |
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultTemplatedURLFormatter
public DefaultTemplatedURLFormatter()
getTemplatedURL
public String getTemplatedURL(ServletContext servletContext,
ServletRequest request,
MutableURI uri,
String key,
URIContext uriContext)
- Format the given URL using a URL template, if defined in a URL
template config file. The
URIContext
encapsulates some additional data needed to write out the string form.
E.g. It defines if the "&" entity or the
'&' character should be used to separate quary parameters.
- Specified by:
getTemplatedURL
in class TemplatedURLFormatter
- Parameters:
servletContext
- the current ServletContext.request
- the current ServletRequest.uri
- the MutableURI to be formatted into a String.key
- key for the URL template type to use for formatting the URIuriContext
- data required to write out the string form.
- Returns:
- the URL as a
String