public abstract class DirectoryUrlConverter extends BlockUrlConverter
BlockUrlConverter.getUrl(java.lang.String, java.util.Map<java.lang.String, ?>, org.mmbase.util.functions.Parameters, boolean, boolean) and BlockUrlConverter.getInternalUrl(java.lang.String, java.util.Map<java.lang.String, ?>, org.mmbase.util.functions.Parameters) you override getNiceDirectoryUrl(java.lang.StringBuilder, org.mmbase.framework.Block, org.mmbase.util.functions.Parameters, org.mmbase.util.functions.Parameters, boolean) and getFilteredInternalDirectoryUrl(java.util.List<java.lang.String>, java.util.Map<java.lang.String, ?>, org.mmbase.util.functions.Parameters).
It is also assumed that the niceness of the URL's is basicly about one block.blocks, components, framework| Constructor and Description |
|---|
DirectoryUrlConverter(BasicFramework fw) |
| Modifier and Type | Method and Description |
|---|---|
int |
getDefaultWeight() |
String |
getDirectory()
The 'directory' used for thie UrlConverter.
|
Pattern |
getDomain()
A regular expression witch must match 'getLocalName' of the request for this UrlConverter to
match.
|
protected abstract Url |
getFilteredInternalDirectoryUrl(List<String> path,
Map<String,?> params,
Parameters frameworkParameters) |
Url |
getFilteredInternalUrl(String pa,
Map<String,?> params,
Parameters frameworkParameters)
When implementing this method you can assume that you don't have to return
Url.NOT. |
protected abstract void |
getNiceDirectoryUrl(StringBuilder b,
Block block,
Parameters parameters,
Parameters frameworkParameters,
boolean action)
This is the method you must implement.
|
protected Url |
getNiceUrl(Block block,
Parameters parameters,
Parameters frameworkParameters,
boolean action)
When implementing this method, you can already assume that the url must be 'nice', iow that we
are actually rendering in the 'realm' of this UrlConverter, and you can straightforwardly,
withough any checking, produce the URL.
|
protected List<String> |
getPath(String pa) |
boolean |
isFilteredMode(Parameters frameworkParameters)
Whether the current request already is in the realm of this URL-converter; the url converter
must implement here how it recognizes itself.
|
static void |
main(String[] argv) |
void |
setDirectory(String d) |
void |
setDomain(String d) |
String |
toString() |
addBlock, addComponent, getBlock, getBlocks, getComponents, getExplicitBlock, getInternalUrl, getParameterDefinition, getProcessUrl, getState, getUrl, getUrlpublic DirectoryUrlConverter(BasicFramework fw)
public void setDirectory(String d)
public void setDomain(String d)
public String getDirectory()
public Pattern getDomain()
public int getDefaultWeight()
getDefaultWeight in interface UrlConvertergetDefaultWeight in class BlockUrlConverterprotected final Url getNiceUrl(Block block, Parameters parameters, Parameters frameworkParameters, boolean action) throws FrameworkException
BlockUrlConvertergetNiceUrl in class BlockUrlConverterblock - Block for which the produce the url forparameters - Parameters to use for this block. The implementation may set parameters
to null which were represented in the returning String.FrameworkExceptionprotected abstract void getNiceDirectoryUrl(StringBuilder b, Block block, Parameters parameters, Parameters frameworkParameters, boolean action) throws FrameworkException
FrameworkExceptionpublic boolean isFilteredMode(Parameters frameworkParameters) throws FrameworkException
BlockUrlConverterisFilteredMode in interface UrlConverterisFilteredMode in class BlockUrlConverterFrameworkExceptionpublic final Url getFilteredInternalUrl(String pa, Map<String,?> params, Parameters frameworkParameters) throws FrameworkException
BlockUrlConverterUrl.NOT. IOW it is certain that the current URL is 'nice' according to this URL
Converter.getFilteredInternalUrl in class BlockUrlConverterFrameworkExceptionprotected abstract Url getFilteredInternalDirectoryUrl(List<String> path, Map<String,?> params, Parameters frameworkParameters) throws FrameworkException
FrameworkExceptionpublic static void main(String[] argv)
MMBase 1.9-SNAPSHOT - ${javadoctimestamp}