public class ChainedUrlConverter extends Object implements UrlConverter
null its result is returned. The
question remains whether we want UrlConverters to be realy chained so that the
outcome of a converter can be added to the outcome of its preceder.| Modifier and Type | Field and Description |
|---|---|
static String |
URLCONVERTER |
static Parameter<Class> |
URLCONVERTER_PARAM |
| Constructor and Description |
|---|
ChainedUrlConverter() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(UrlConverter u)
Adds the UrlConverters to the list.
|
boolean |
contains(UrlConverter u) |
int |
getDefaultWeight()
The default weight of the UrlConverters.
|
Url |
getInternalUrl(String path,
Map<String,?> params,
Parameters frameworkParameters)
The 'technical' url.
|
Parameter<?>[] |
getParameterDefinition()
An URLConverter can add parameters to it's parent Framework.
|
Url |
getProcessUrl(String path,
Map<String,?> params,
Parameters frameworkParameters,
boolean escapeAmps)
Basically the same as
getUrl(java.lang.String, java.util.Map<java.lang.String, ?>, org.mmbase.util.functions.Parameters, boolean) but for a Processor url. |
protected Url |
getProposal(Url u,
Parameters frameworkParameters)
Upon examining the user request an 'nice' URL is proposed by an UrlConverter to resolve the request.
|
Url |
getUrl(String path,
Map<String,?> params,
Parameters frameworkParameters,
boolean escapeAmps)
The URL to be printed in a page, the 'nice' url.
|
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
|
String |
toString() |
public static String URLCONVERTER
public void add(UrlConverter u)
public boolean contains(UrlConverter u)
public Parameter<?>[] getParameterDefinition()
UrlConvertergetParameterDefinition in interface UrlConverterpublic int getDefaultWeight()
getDefaultWeight in interface UrlConverterpublic boolean isFilteredMode(Parameters frameworkParameters) throws FrameworkException
UrlConverterisFilteredMode in interface UrlConverterFrameworkExceptionprotected Url getProposal(Url u, Parameters frameworkParameters)
public Url getUrl(String path, Map<String,?> params, Parameters frameworkParameters, boolean escapeAmps) throws FrameworkException
getProposal(org.mmbase.framework.basic.Url, org.mmbase.util.functions.Parameters) and decides upon their weight which one prevails.getUrl in interface UrlConverterpath - The path (generally a relative URL) to create an URL for.params - 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 Frameworkpublic Url getProcessUrl(String path, Map<String,?> params, Parameters frameworkParameters, boolean escapeAmps) throws FrameworkException
getUrl(java.lang.String, java.util.Map<java.lang.String, ?>, org.mmbase.util.functions.Parameters, boolean) but for a Processor url.getProcessUrl in interface UrlConverternullFrameworkExceptionpublic Url getInternalUrl(String path, Map<String,?> params, Parameters frameworkParameters) throws FrameworkException
getInternalUrl in interface UrlConverterpath - 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}