public interface FilteredNode extends Node
Node.filter()
and provides a mechanism for only showing specified nodes. Each method
will add an additional filter that reduces the number of nodes returned. For example by invoking
node.filter().showHasAccess(user).showVisible()
only nodes that the specified user has access to that are also
visible are returned. The filtering applies to all methods that operate on the children of the node. For example
Node.indexOf(String)
can return a different index for a specified name than the Node
the filtered node is
operating on.Modifier and Type | Method and Description |
---|---|
FilteredNode |
show(Filter<Node> filter)
Adds a the specified filter to this node
|
FilteredNode |
showAll()
Shows all nodes
|
FilteredNode |
showDefault()
Adds a filter to this node that accepts default nodes (equivalent to
showVisible().showHasAccess(PortalRequest.getInstance().getUser()) ). |
FilteredNode |
showHasAccess(User user)
Adds a filter to this node that accepts nodes the specified user has permissions to access
|
FilteredNode |
showHasEdit(User user)
Adds a filter to this node that accepts nodes the specified user has permissions to edit
|
FilteredNode |
showVisible()
Adds a filter to this node that accepts visible nodes
|
addChild, addChild, filter, getChild, getChild, getChildCount, getIconName, getName, getNode, getNode, getNodePath, getPageId, getParent, getURI, getVisibility, hasChild, indexOf, isChildrenLoaded, isRoot, isVisible, moveTo, moveTo, moveTo, removeChild, setIconName, setName, setPageId, setVisibility, setVisibility, setVisibility, sort
getDisplayNames, setDisplayNames
getDisplayName, setDisplayName
FilteredNode showAll()
FilteredNode showDefault()
showVisible().showHasAccess(PortalRequest.getInstance().getUser())
). Default nodes are nodes that are
visible and that the current user has permissions to access.FilteredNode showVisible()
FilteredNode showHasAccess(User user)
user
- the userFilteredNode showHasEdit(User user)
user
- the userFilteredNode show(Filter<Node> filter)
filter
- the filterCopyright © 2013 JBoss by Red Hat. All Rights Reserved.