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 StringcreateURL(ContentContext ctx, MenuElement currentPage)create url to a page.StringcreateURLKey(String url)transform url to a unic string represent information (sp. : without extension).protected StringcreateURLWithoutExt(ContentContext ctx, MenuElement currentPage)protected StringgetExtension(ContentContext ctx)protected MenuElementgetSectionPage(MenuElement page)return the name of the first level page active.protected booleanisWithId()static voidmain(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:IURLFactorycreate 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:IURLFactorytransform url to a unic string represent information (sp. : without extension).- Specified by:
createURLKeyin interfaceIURLFactory- Overrides:
createURLKeyin classAbstractURLFactory- Returns:
-
main
public static void main(String[] args)
-
-