Interface NavigationService
public interface NavigationService
-
Method Summary
Modifier and TypeMethodDescriptionNodeData[]createNode(Long parentId, Long previousId, String name, NodeState state) Create a navigation nodevoiddeleteNode(Long nodeId) Delete a navigation node with a given node idbooleandestroyNavigation(NavigationContext navigation) Delete a navigation for a given sitebooleandestroyNavigation(SiteKey siteKey) Delete a navigation for a given sitegetNodeById(Long nodeId) Get a navigation node with a given node idloadNavigation(SiteKey key) Find and returns a navigation, if no such site exist, null is returned instead.<N> NodeContext<N> loadNode(NodeModel<N> model, NavigationContext navigation, Scope scope, NodeChangeListener<NodeContext<N>> listener) Load a navigation node from a specified navigation.<N> NodeContext<NodeContext<N>> Loads root node of a designated Site<N> NodeContext<NodeContext<N>> Loads a specific node of a Site identitifed by its relative URI (from root node until node)default <N> NodeContext<N> loadNodeById(NodeModel<N> model, String nodeId, Scope scope, NodeChangeListener<NodeContext<N>> listener) Load a navigation node from a specified navigation by its idvoidMove the given navigation node<N> voidrebaseNode(NodeContext<N> context, Scope scope, NodeChangeListener<NodeContext<N>> listener) Rebase the specifiedcontextargument with the most recent state.voidsaveNavigation(NavigationContext navigation) Create, update a navigation.voidsaveNavigationFromTemplate(SiteKey sourceSiteTemplate, SiteKey targetSiteKey) <N> voidsaveNode(NodeContext<N> context, NodeChangeListener<NodeContext<N>> listener) Save the specified context state to the persistent storage.voidupdateNode(Long nodeId, NodeState state) Update a navigation node<N> voidupdateNode(NodeContext<N> context, Scope scope, NodeChangeListener<NodeContext<N>> listener) Update the specifiedcontextargument with the most recent state.
-
Method Details
-
loadNode
Loads root node of a designated Site- Type Parameters:
N- the node generic type- Parameters:
siteKey-SiteKey- Returns:
- the loaded node
-
loadNode
Loads a specific node of a Site identitifed by its relative URI (from root node until node)- Type Parameters:
N- the node generic type- Parameters:
siteKey-navUri-- Returns:
- the loaded node
-
deleteNode
Delete a navigation node with a given node id- Parameters:
nodeId- the node id to be deleted
-
getNodeById
Get a navigation node with a given node id- Parameters:
nodeId- the node id
-
moveNode
Move the given navigation node- Parameters:
targetId- the node idfromId- the parent node idtoId- destination parent node idpreviousId- the previous node id