public interface UrlConverter extends Serializable
BasicFramework.
You should implement UrlConverter if you want to create and resolve your own
user-friendly links within BasicFramework.
You can configure several UrlConverters in 'config/framework.xml'. They will be
chained one after another.| Modifier and Type | Method and Description |
|---|---|
int |
getDefaultWeight() |
Url |
getInternalUrl(String path,
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) |
Url |
getUrl(String path,
Map<String,?> parameters,
Parameters frameworkParameters,
boolean escapeAmps)
|
boolean |
isFilteredMode(Parameters frameworkParameters)
The state of rendering will be determined (request.getRequestUri) and we will return if the
current URL is managed by this UrlConverter
|
Parameter<?>[] getParameterDefinition()
boolean isFilteredMode(Parameters frameworkParameters) throws FrameworkException
FrameworkExceptionint getDefaultWeight()
Url getUrl(String path, Map<String,?> parameters, Parameters frameworkParameters, boolean escapeAmps) throws FrameworkException
Framework.getUrl(String, Map, Parameters, boolean).
But it can also return null which mean, 'I don't know.'path - 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.FrameworkException - thrown when something goes wrong in the FrameworkUrl getProcessUrl(String path, Map<String,?> parameters, Parameters frameworkParameters, boolean escapeAmps) throws FrameworkException
nullFrameworkExceptionUrl getInternalUrl(String path, Map<String,?> params, Parameters frameworkParameters) throws FrameworkException
path - 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).FrameworkException - thrown when something goes wrong in the FrameworkMMBase 1.9-SNAPSHOT - ${javadoctimestamp}