public interface Navigation
Modifier and Type | Method and Description |
---|---|
Node |
getNode(NodePath nodePath)
Returns a node represented by the node path or null if the node was not found.
|
Node |
getNode(NodePath nodePath,
NodeVisitor visitor)
Returns a node represented by the node path or null if the node was not found.
|
Node |
getNode(String... nodePath)
Returns a node represented by the node path or null if the node was not found.
|
int |
getPriority()
The priority of the navigation.
|
Node |
getRootNode(NodeVisitor visitor)
Returns the root node of the navigation with nodes loaded dependent on the
NodeVisitor |
SiteId |
getSiteId()
The
SiteId of the navigation |
void |
refreshNode(Node node)
Will refresh the node with latest from storage.
|
void |
refreshNode(Node node,
NodeVisitor visitor)
Will refresh the node with latest from storage.
|
boolean |
removeNode(NodePath nodePath)
Removes a node, represented by the node path
|
void |
saveNode(Node node)
Saves a node.
|
void |
setPriority(int integer)
Saves the priority for this navigation.
|
SiteId getSiteId()
SiteId
of the navigationint getPriority()
SiteType
appear in a navigation menu.void setPriority(int integer)
integer
- the priority to saveApiException
- if something prevented this operation to succeedNode getNode(String... nodePath)
nodePath
- the path to the nodeIllegalArgumentException
- if nodePath is null or emptyApiException
- if something prevented this operation to succeedNode getNode(NodePath nodePath)
nodePath
- the path to the nodeIllegalArgumentException
- if nodePath is nullApiException
- if something prevented this operation to succeedNode getNode(NodePath nodePath, NodeVisitor visitor)
For example if you want to retrieve the node /foo/bar but also want to load it's children you can pass in
Nodes.visitChildren()
as the visitor to load the children of /foo/bar.
nodePath
- the path to the nodevisitor
- the visitor used to determine further loading of nodes. The visitor is relative to the node represented by
the node path.IllegalArgumentException
- if nodePath or visitor is nullApiException
- if something prevented this operation to succeedNode getRootNode(NodeVisitor visitor)
NodeVisitor
visitor
- the visitor to determine how many nodes to load.IllegalArgumentException
- if visitor is nullApiException
- if something prevented this operation to succeedvoid refreshNode(Node node)
node
- the node to refreshIllegalArgumentException
- if node is nullApiException
- if something prevented this operation to succeedvoid refreshNode(Node node, NodeVisitor visitor)
node
- the node to refreshvisitor
- the visitor which can load more nodes.IllegalArgumentException
- if node or visitor is nullApiException
- if something prevented this operation to succeedboolean removeNode(NodePath nodePath)
nodePath
- the path to the nodeIllegalArgumentException
- if nodePath is nullEntityNotFoundException
- if the node could not be found.ApiException
- if something prevented this operation to succeedvoid saveNode(Node node)
node
- the node to saveIllegalArgumentException
- if node is nullApiException
- if something prevented this operation to succeedCopyright © 2013 JBoss by Red Hat. All Rights Reserved.