public class RoleNodeMaker extends AbstractNodeMaker
NodeMaker
that adds role toggle links.
This can be invoked using configuration parameters
or called directly by SUNodeMaker
under control of a Feature
Constructor and Description |
---|
RoleNodeMaker(AppContext conn) |
Modifier and Type | Method and Description |
---|---|
void |
addChildren(Node parent,
java.lang.String name,
FilteredProperties props)
Add additional child nodes specific to the
NodeMaker . |
Node |
makeNode(java.lang.String name,
FilteredProperties props)
Create a
Node for a named menu item. |
getContext, getLogger
public RoleNodeMaker(AppContext conn)
conn
- public Node makeNode(java.lang.String name, FilteredProperties props)
NodeMaker
Node
for a named menu item.
This is allowed to return null to indicate that nodes of this type are disabled/empty and should be
suppressed. The NavigationMenuService
can be configured to substitute a different node
in this case (for example to host child nodes added by the configuration).
Automatic child nodes can be added in this method and will appear first. Followed by nodes from the configuration
then nodes from NodeMaker.addChildren(Node, String, FilteredProperties)
name
- name of the nodeprops
- FilteredProperties
containing the navigation menu configurationNode
public void addChildren(Node parent, java.lang.String name, FilteredProperties props)
NodeMaker
NodeMaker
.
This is intended for Node
s based on the current user or their roles.
It is a separate method so the dynamically generated nodes are added after any
specified in the configuration. Dynamic nodes that should appear first can be
added directly in NodeMaker.makeNode(String, FilteredProperties)
addChildren
in interface NodeMaker
addChildren
in class AbstractNodeMaker