public class ContentAutoNav<C extends AbstractContent> extends HierarchyTypeAutoNav<C>
filterNodesWithNames, filterPredicate
Constructor and Description |
---|
ContentAutoNav() |
Modifier and Type | Method and Description |
---|---|
protected MenuItem |
addNode(MenuItem parent,
C node,
List<MenuItem> children)
Add Leaf nodes
|
ContentService |
getContentService() |
MenuItem |
getGeneratedMenuItem(Object... params)
Generate a Menu based on context, logic and some optional/additional params
|
Map<String,String[]> |
getReferenceToPathMapping(Object... params)
A
MenuItem.getRefId() points to the raw resource that the menu points to (like classpath name). |
protected String |
getRefId(C content)
An implementation of the reference to a node
|
TemplateService |
getTemplateService() |
protected boolean |
isNodeNavigable(C content) |
void |
setContentService(ContentService contentService) |
void |
setTemplateService(TemplateService templateService) |
add, assignRootLevel, getFilterNodesWithNames, getGeneratedPageMenuMap, getId, setFilterNodesWithNames, setId, toString, transform
protected MenuItem addNode(MenuItem parent, C node, List<MenuItem> children)
HierarchyTypeAutoNav
addNode
in class HierarchyTypeAutoNav<C extends AbstractContent>
parent
- as MenuItem
as the node to add children undernode
- as type IHierarchialReference
children
- as List of MenuItem
protected String getRefId(C content)
HierarchyTypeAutoNav
getRefId
in class HierarchyTypeAutoNav<C extends AbstractContent>
String
protected boolean isNodeNavigable(C content)
isNodeNavigable
in class HierarchyTypeAutoNav<C extends AbstractContent>
MenuItem.isNavigable()
public MenuItem getGeneratedMenuItem(Object... params)
IMenuGenerator
getGeneratedMenuItem
in interface IMenuGenerator
getGeneratedMenuItem
in class HierarchyTypeAutoNav<C extends AbstractContent>
params
- optionalMenuItem
public Map<String,String[]> getReferenceToPathMapping(Object... params)
IMenuPathMapper
MenuItem.getRefId()
points to the raw resource that the menu points to (like classpath name).
To generate the Page Menu Map when the refId is not same as app path we require the additional mapping(s).
Note, a reference can have multiple path aliases.Map
of String to String arraypublic ContentService getContentService()
public void setContentService(ContentService contentService)
public TemplateService getTemplateService()
public void setTemplateService(TemplateService templateService)
Copyright © 2018. All rights reserved.