public class CatalogAutoNav extends HierarchyTypeAutoNav<ProductReference>
| Modifier and Type | Class and Description |
|---|---|
static class |
CatalogAutoNav.CatalogMenuItem |
filterNodesWithNames, filterPredicate| Constructor and Description |
|---|
CatalogAutoNav() |
| Modifier and Type | Method and Description |
|---|---|
protected MenuItem |
addNode(MenuItem parent,
ProductReference node,
List<MenuItem> children)
Add Leaf nodes
|
MenuItem |
getGeneratedMenuItem(Object... params)
Generate a Menu based on context, logic and some optional/additional params
|
org.apache.commons.collections.Transformer |
getProductPagePathLookup()
Allows for an algorithm to determine the path of the product page
The Transformer is expected to take in ProductReference as input and give the path as String |
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(ProductReference prodReference)
Override this method and customize it to App Page specific path
Default it will only return the product name suffixed to productPagePathLookup |
protected boolean |
isNodeNavigable(ProductReference prodReference) |
void |
setProductPagePathLookup(org.apache.commons.collections.Transformer productPagePathLookup)
Allows for an algorithm to determine the path of the product page
The Transformer is expected to take in ProductReference as input and give the path as String |
add, assignRootLevel, getFilterNodesWithNames, getGeneratedPageMenuMap, getId, setFilterNodesWithNames, setId, toString, transformprotected MenuItem addNode(MenuItem parent, ProductReference node, List<MenuItem> children)
HierarchyTypeAutoNavaddNode in class HierarchyTypeAutoNav<ProductReference>parent - as MenuItem as the node to add children undernode - as type IHierarchialReferencechildren - as List of MenuItemprotected String getRefId(ProductReference prodReference)
productPagePathLookupgetRefId in class HierarchyTypeAutoNav<ProductReference>Stringprotected boolean isNodeNavigable(ProductReference prodReference)
isNodeNavigable in class HierarchyTypeAutoNav<ProductReference>MenuItem.isNavigable()public MenuItem getGeneratedMenuItem(Object... params)
IMenuGeneratorgetGeneratedMenuItem in interface IMenuGeneratorgetGeneratedMenuItem in class HierarchyTypeAutoNav<ProductReference>params - optionalMenuItempublic Map<String,String[]> getReferenceToPathMapping(Object... params)
IMenuPathMapperMenuItem.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 org.apache.commons.collections.Transformer getProductPagePathLookup()
Transformer is expected to take in ProductReference as input and give the path as StringProductPagePathTransformerpublic void setProductPagePathLookup(org.apache.commons.collections.Transformer productPagePathLookup)
Transformer is expected to take in ProductReference as input and give the path as StringProductPagePathTransformerCopyright © 2018. All rights reserved.