org.mmbase.mynews
Class MyNewsUrlConverter
java.lang.Object
org.mmbase.framework.basic.BlockUrlConverter
org.mmbase.framework.basic.DirectoryUrlConverter
org.mmbase.mynews.MyNewsUrlConverter
- All Implemented Interfaces:
- Serializable, UrlConverter
public class MyNewsUrlConverter
- extends DirectoryUrlConverter
The UrlConverter that can filter and create urls for the MyNews example application.
Links start with '/magazine/' (or another directory, which can be set with 'setDir')
Links to articles have the form /magazine[/[/[/]]]/|
How many of the date-parts are generated, and wether the title or the number of the articles are
produced, is controlled by 'setDateDepth' and 'setUseTitle'.
These properties can be set by tags in framework.xml.
- Since:
- MMBase-1.9
- Version:
- $Id: MyNewsUrlConverter.java 43015 2010-07-29 13:50:02Z michiel $
- Author:
- Michiel Meeuwissen
- See Also:
- Serialized Form
|
Method Summary |
int |
getDefaultWeight()
|
Url |
getFilteredInternalDirectoryUrl(List<String> path,
Map<String,?> params,
Parameters frameworkParameters)
Translates the result of DirectoryUrlConverter.getNiceUrl(org.mmbase.framework.Block, org.mmbase.util.functions.Parameters, org.mmbase.util.functions.Parameters, boolean) back to an actual JSP which can render the block |
protected void |
getNiceDirectoryUrl(StringBuilder b,
Block block,
Parameters parameters,
Parameters frameworkParameters,
boolean action)
Generates a nice url for 'mynews'. |
void |
setDateDepth(int d)
|
void |
setMmweb(boolean w)
|
void |
setRenderJsp(String s)
|
void |
setUseTitle(boolean t)
|
| Methods inherited from class org.mmbase.framework.basic.BlockUrlConverter |
addBlock, addComponent, getBlock, getBlocks, getComponents, getExplicitBlock, getInternalUrl, getParameterDefinition, getProcessUrl, getState, getUrl, getUrl |
MyNewsUrlConverter
public MyNewsUrlConverter(BasicFramework fw)
setUseTitle
public void setUseTitle(boolean t)
setDateDepth
public void setDateDepth(int d)
setRenderJsp
public void setRenderJsp(String s)
setMmweb
public void setMmweb(boolean w)
getDefaultWeight
public int getDefaultWeight()
- Specified by:
getDefaultWeight in interface UrlConverter- Overrides:
getDefaultWeight in class DirectoryUrlConverter
getNiceDirectoryUrl
protected void getNiceDirectoryUrl(StringBuilder b,
Block block,
Parameters parameters,
Parameters frameworkParameters,
boolean action)
throws FrameworkException
- Generates a nice url for 'mynews'. This basicly looks like
<directory>/[<year>[/<month>[<day of month>]]][/<identifier of
news article (number or title)>]
How many elements of the 'date' are produces depends on the 'date depth', and can be 0, 1, 2
or 3.
- Specified by:
getNiceDirectoryUrl in class DirectoryUrlConverter
- Throws:
FrameworkException
getFilteredInternalDirectoryUrl
public Url getFilteredInternalDirectoryUrl(List<String> path,
Map<String,?> params,
Parameters frameworkParameters)
throws FrameworkException
- Translates the result of
DirectoryUrlConverter.getNiceUrl(org.mmbase.framework.Block, org.mmbase.util.functions.Parameters, org.mmbase.util.functions.Parameters, boolean) back to an actual JSP which can render the block
- Specified by:
getFilteredInternalDirectoryUrl in class DirectoryUrlConverter
- Throws:
FrameworkException
MMBase 2.0-SNAPSHOT - null