public final class BasicUrlConverter extends Object implements UrlConverter
| Constructor and Description |
|---|
BasicUrlConverter(BasicFramework fw) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
Block |
getBlock(String path,
Parameters frameworkParameters)
The BasicUrlConverter is unable to explicitely define a block and hence returns
null. |
int |
getDefaultWeight() |
Url |
getInternalUrl(String page,
Map<String,?> params,
Parameters frameworkParameters)
|
Parameter<?>[] |
getParameterDefinition()
An URLConverter can add parameters to it's parent Framework.
|
Url |
getProcessUrl(String path,
Map<String,?> parameters,
Parameters frameworkParameters,
boolean escapeAmps) |
static String |
getUrl(String page,
Map<? extends CharSequence,?> params,
javax.servlet.http.HttpServletRequest req,
boolean escapeamp)
General utility function to create an Url
|
Url |
getUrl(String path,
Map<String,?> parameters,
Parameters frameworkParameters,
boolean escapeAmps)
|
protected String |
getUrl(String path,
Map<String,?> parameters,
Parameters frameworkParameters,
boolean escapeAmps,
boolean action) |
static javax.servlet.http.HttpServletRequest |
getUserRequest(javax.servlet.http.HttpServletRequest req)
Entirely unwraps the request.
|
int |
hashCode() |
boolean |
isFilteredMode(Parameters frameworkParameters)
This URLConverter can work on any url, so is wlays in 'filtered' mode'.
|
String |
toString() |
public BasicUrlConverter(BasicFramework fw)
public static String getUrl(String page, Map<? extends CharSequence,?> params, javax.servlet.http.HttpServletRequest req, boolean escapeamp)
page - servletPathparams - The query to be addedreq - A request object is needed to determine context-paths and so on.escapeamp - Whether ampersands must be XML-escaped. Typically needed if the URL is used
in (X)HTML.public boolean isFilteredMode(Parameters frameworkParameters) throws FrameworkException
isFilteredMode in interface UrlConverterFrameworkExceptionpublic int getDefaultWeight()
getDefaultWeight in interface UrlConverterpublic Block getBlock(String path, Parameters frameworkParameters)
null.public Parameter<?>[] getParameterDefinition()
UrlConvertergetParameterDefinition in interface UrlConverterpublic static javax.servlet.http.HttpServletRequest getUserRequest(javax.servlet.http.HttpServletRequest req)
protected String getUrl(String path, Map<String,?> parameters, Parameters frameworkParameters, boolean escapeAmps, boolean action)
public Url getUrl(String path, Map<String,?> parameters, Parameters frameworkParameters, boolean escapeAmps)
UrlConverterFramework.getUrl(String, Map, Parameters, boolean).
But it can also return null which mean, 'I don't know.'getUrl in interface UrlConverterpath - The path (generally a relative URL) to create an URL for.parameters - Parameters The parameters to be passed to the page, as specified e.g. with mm:param -tagsframeworkParameters - The parameters that are required by the frameworkescapeAmps - true if parameters should be added with an escaped & (&).
You should escape & when a URL is exposed (i.e. in HTML), but not if the url is
for some reason called directly.Url.NOT if not determinable.public Url getProcessUrl(String path, Map<String,?> parameters, Parameters frameworkParameters, boolean escapeAmps)
getProcessUrl in interface UrlConverternullpublic Url getInternalUrl(String page, Map<String,?> params, Parameters frameworkParameters)
UrlConvertergetInternalUrl in interface UrlConverterpage - The page (e.g. image/css) provided by the component to create an URL forparams - Extra parameters for that pathframeworkParameters - The parameters that are required by the framework, such as the
'request' and 'cloud' objectsUrl.NOT if nothing framework specific could be
determined (this would make it possible to 'chain' frameworks).MMBase 1.9-SNAPSHOT - ${javadoctimestamp}