Package com.hybris.backoffice.navigation
Interface NavigationNode
-
- All Superinterfaces:
ActionDefinition,java.io.Serializable
- All Known Implementing Classes:
DynamicNode,NavigationNodeDecorator,SimpleNode,TypeNode
public interface NavigationNode extends ActionDefinition
Definition of explorer tree node. The typical implementation could be a simple POJO.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidaddChild(NavigationNode child)Adds the given node as a child of this node.java.util.List<NavigationNode>getChildren()Returns all children nodes.default CockpitContextgetContext()Returns node contextjava.lang.ObjectgetData()Returns data associated with the node.intgetLevel()Returns the level of this node.NavigationNodegetParent()Returns the parent node of this node.booleanisDirectory()Returnstrueif this node can have children.booleanisExpandedByDefault()Returns true if this node should be expanded by default when the tree is created.voidsetChildren(java.util.List<NavigationNode> children)Sets the given list to be child nodes of this node.default voidsetContext(CockpitContext cockpitContext)Sets node contextvoidsetParent(NavigationNode parent)Sets the parent of this node to the given node.-
Methods inherited from interface com.hybris.backoffice.actionbar.ActionDefinition
getDescription, getDescriptionLocKey, getGroup, getIconUri, getIconUriLocKey, getId, getName, getNameLocKey
-
-
-
-
Method Detail
-
getData
java.lang.Object getData()
Returns data associated with the node. If no data are associated with the node it returnsnull.- Returns:
- data associated with the node or
nullif no data are associated with the node
-
getParent
NavigationNode getParent()
Returns the parent node of this node.- Returns:
- parent node of this node or
nullif this is a root node
-
getChildren
java.util.List<NavigationNode> getChildren()
Returns all children nodes.- Returns:
- all children nodes
-
setChildren
void setChildren(java.util.List<NavigationNode> children)
Sets the given list to be child nodes of this node.- Parameters:
children- list of nodes to become children of this node
-
addChild
void addChild(NavigationNode child)
Adds the given node as a child of this node.- Parameters:
child- a node to become a child of this node
-
setParent
void setParent(NavigationNode parent)
Sets the parent of this node to the given node.- Parameters:
parent- a node to become a parent of this node
-
getLevel
int getLevel()
Returns the level of this node. A root node has level = 0.- Returns:
- level of this node
-
isDirectory
boolean isDirectory()
Returnstrueif this node can have children.- Returns:
trueif this node can have children andfalseotherwise
-
isExpandedByDefault
boolean isExpandedByDefault()
Returns true if this node should be expanded by default when the tree is created.- Returns:
- true if this node should be expanded by default; false otherwise
-
getContext
default CockpitContext getContext()
Returns node context- Returns:
- new DefaultCockpitContext by default
-
setContext
default void setContext(CockpitContext cockpitContext)
Sets node context- Parameters:
cockpitContext-
-
-