Constructor and Description |
---|
NavTreeImpl() |
NavTreeImpl(NavGroup root) |
Modifier and Type | Method and Description |
---|---|
void |
accept(NavItemVisitor visitor)
Entry point for visitor interfaces
|
NavDivider |
addDivider(String parentId,
boolean modifiable)
Creates and register a brand new
NavDivider item. |
NavGroup |
addGroup(String id,
String name,
String description,
String parentId,
boolean modifiable)
Creates and register a brand new
NavGroup item. |
NavItem |
addItem(String id,
String name,
String description,
String parentId,
boolean modifiable,
String context)
Creates and register a brand new
NavItem item. |
void |
changePosition(String id,
boolean up,
Integer npositions) |
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
|
List<NavItem> |
searchItems(NavItemContext ctx,
List<NavItem> navItemList) |
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
|
public NavTreeImpl()
public NavTreeImpl(NavGroup root)
public List<NavItem> getRootItems()
NavTree
getRootItems
in interface NavTree
NavItem
instancespublic NavItem getItemById(String id)
NavTree
getItemById
in interface NavTree
id
- The unique identifier of the itempublic NavTree getItemAsTree(String id)
NavTree
getItemAsTree
in interface NavTree
id
- The unique identifier of the itempublic List<NavItem> searchItems(NavItemContext ctx)
NavTree
searchItems
in interface NavTree
ctx
- The context to search forpublic List<NavItem> searchItems(NavItemContext ctx, List<NavItem> navItemList)
public NavGroup addGroup(String id, String name, String description, String parentId, boolean modifiable)
NavTree
NavGroup
item.addGroup
in interface NavTree
id
- The unique id of the itemname
- The item's namedescription
- A brief description of the itemparentId
- 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 addedpublic NavItem addItem(String id, String name, String description, String parentId, boolean modifiable, String context)
NavTree
NavItem
item.addItem
in interface NavTree
id
- The unique id of the itemname
- The item's namedescription
- A brief description of the itemparentId
- 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.public NavDivider addDivider(String parentId, boolean modifiable)
NavTree
NavDivider
item.addDivider
in interface NavTree
parentId
- 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 addedpublic NavItem deleteItem(String id)
NavTree
deleteItem
in interface NavTree
id
- The unique identifier of the itempublic NavItem setItemName(String id, String name)
NavTree
setItemName
in interface NavTree
id
- The unique id of the itemname
- A brief description of the itempublic NavItem setItemDescription(String id, String description)
NavTree
setItemDescription
in interface NavTree
id
- The unique id of the itemdescription
- A brief description of the itempublic NavItem setItemModifiable(String id, boolean modifiable)
NavTree
setItemModifiable
in interface NavTree
id
- The unique id of the itemmodifiable
- Flag indicating if the item can be modifiedpublic NavItem setItemContext(String id, String context)
NavTree
setItemContext
in interface NavTree
id
- The unique id of the itemcontext
- The item's contextpublic NavItem moveItem(String id, String newParentId)
NavTree
public void moveItemFirst(String id)
NavTree
moveItemFirst
in interface NavTree
id
- The unique id of the itempublic void moveItemLast(String id)
NavTree
moveItemLast
in interface NavTree
id
- The unique id of the itempublic void moveItemUp(String id)
NavTree
moveItemUp
in interface NavTree
id
- The unique id of the itempublic void moveItemDown(String id)
NavTree
moveItemDown
in interface NavTree
id
- The unique id of the itempublic void accept(NavItemVisitor visitor)
NavTree
Copyright © 2012–2019 JBoss by Red Hat. All rights reserved.