Package org.javlo.navigation
Class LabelAndSectionURLCreator
- java.lang.Object
-
- org.javlo.navigation.AbstractURLFactory
-
- org.javlo.navigation.LabelAndSectionURLCreator
-
- All Implemented Interfaces:
IURLFactory
- Direct Known Subclasses:
LabelAndSectionURLCreatorNoExt
,LabelAndSubSectionURLCreator
,LabelAndSubSubSectionURLCreator
public class LabelAndSectionURLCreator extends AbstractURLFactory
create url based on the title of the page.- Author:
- Patrick Vandermaesen
-
-
Constructor Summary
Constructors Constructor Description LabelAndSectionURLCreator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
createURL(ContentContext ctx, MenuElement currentPage)
create url to a page.String
createURLKey(String url)
transform url to a unic string represent information (sp. : without extension).protected String
createURLWithoutExt(ContentContext ctx, MenuElement currentPage)
protected String
getExtension(ContentContext ctx)
protected MenuElement
getSectionPage(MenuElement page)
return the name of the first level page active.protected boolean
isWithId()
static void
main(String[] args)
-
Methods inherited from class org.javlo.navigation.AbstractURLFactory
addAndCheckExistURL, cleanString, getFormat, staticCleanString
-
-
-
-
Method Detail
-
getSectionPage
protected MenuElement getSectionPage(MenuElement page)
return the name of the first level page active. "root" if current page in root.- Returns:
- Throws:
Exception
-
isWithId
protected boolean isWithId()
-
createURLWithoutExt
protected String createURLWithoutExt(ContentContext ctx, MenuElement currentPage) throws Exception
- Throws:
Exception
-
getExtension
protected String getExtension(ContentContext ctx)
-
createURL
public String createURL(ContentContext ctx, MenuElement currentPage) throws Exception
Description copied from interface:IURLFactory
create url to a page.- Parameters:
ctx
- content contextcurrentPage
- page in content- Returns:
- a URL
- Throws:
Exception
-
createURLKey
public String createURLKey(String url)
Description copied from interface:IURLFactory
transform url to a unic string represent information (sp. : without extension).- Specified by:
createURLKey
in interfaceIURLFactory
- Overrides:
createURLKey
in classAbstractURLFactory
- Returns:
-
main
public static void main(String[] args)
-
-