public interface NavTree
NavItem
instance.Modifier and Type | Method and Description |
---|---|
void |
accept(NavItemVisitor visitor)
Entry point for visitor interfaces
|
NavDivider |
addDivider(String groupId,
boolean modifiable)
Creates and register a brand new
NavDivider item. |
NavGroup |
addGroup(String id,
String name,
String description,
String groupId,
boolean modifiable)
Creates and register a brand new
NavGroup item. |
NavItem |
addItem(String id,
String name,
String description,
String groupId,
boolean modifiable,
String context)
Creates and register a brand new
NavItem item. |
NavTree |
cloneTree()
Creates a brand new copy of this tree
|
NavItem |
deleteItem(String id)
Delete an existing item including all its children.
|
NavTree |
getItemAsTree(String id)
Given an existing item, it creates a brand new subtree where the item (or its children in case of groups)
is taken as the root node.
|
NavItem |
getItemById(String id)
Get an item given its id.
|
List<NavItem> |
getRootItems()
The list of items belonging to the first tree level
|
NavItem |
moveItem(String id,
String newParentId)
Changes the location of an item in the tree
|
void |
moveItemDown(String id)
Move an item one position down in its parent's children list
|
void |
moveItemFirst(String id)
Move the specified item to the first position within its parent's children list
|
void |
moveItemLast(String id)
Move the specified item to the last position within its parent's children list
|
void |
moveItemUp(String id)
Move an item one position up in its parent's children list
|
List<NavItem> |
searchItems(NavItemContext ctx)
Get the items that match the given context
|
NavItem |
setItemContext(String id,
String context)
Updates the perspective attached to an existing perspective link
|
NavItem |
setItemDescription(String id,
String description)
Updates the description attribute of an existing item
|
NavItem |
setItemModifiable(String id,
boolean modifiable)
Updates the modifiable flag attribute of an existing item
|
NavItem |
setItemName(String id,
String name)
Updates the name attribute of an existing item
|
List<NavItem> getRootItems()
NavItem
instancesNavItem getItemById(String id)
id
- The unique identifier of the itemNavTree getItemAsTree(String id)
id
- The unique identifier of the itemList<NavItem> searchItems(NavItemContext ctx)
ctx
- The context to search forNavGroup addGroup(String id, String name, String description, String groupId, boolean modifiable)
NavGroup
item.id
- The unique id of the itemname
- The item's namedescription
- A brief description of the itemgroupId
- The identifier of an existing node in the tree where to append the newly created item as a childmodifiable
- Flag indicating if the item can be modified once addedNavItem addItem(String id, String name, String description, String groupId, boolean modifiable, String context)
NavItem
item.id
- The unique id of the itemname
- The item's namedescription
- A brief description of the itemgroupId
- The identifier of an existing node in the tree where to append the newly created item as a childmodifiable
- Flag indicating if the item can be modified once addedcontext
- An string that contains item related information, like an external reference for instance.NavDivider addDivider(String groupId, boolean modifiable)
NavDivider
item.groupId
- The identifier of an existing node in the tree where to append the newly created item as a childmodifiable
- Flag indicating if the item can be modified once addedNavItem deleteItem(String id)
id
- The unique identifier of the itemNavItem setItemName(String id, String name)
id
- The unique id of the itemname
- A brief description of the itemNavItem setItemDescription(String id, String description)
id
- The unique id of the itemdescription
- A brief description of the itemNavItem setItemModifiable(String id, boolean modifiable)
id
- The unique id of the itemmodifiable
- Flag indicating if the item can be modifiedNavItem setItemContext(String id, String context)
id
- The unique id of the itemcontext
- The item's contextNavItem moveItem(String id, String newParentId)
id
- The unique id of the itemnewParentId
- The identifier of an existing node in the tree where to move the itemvoid moveItemFirst(String id)
id
- The unique id of the itemvoid moveItemLast(String id)
id
- The unique id of the itemvoid moveItemUp(String id)
id
- The unique id of the itemvoid moveItemDown(String id)
id
- The unique id of the itemvoid accept(NavItemVisitor visitor)
NavTree cloneTree()
Copyright © 2012–2019 JBoss by Red Hat. All rights reserved.