public interface Navigation extends WorkspaceObject
A navigation denotes a visual item that display a link to a referenced entity like a page. A navigation is expressed as a tree where each navigation node owns an ordered list of named children.
A navigation node
owns an optional link to a Link that denotes the entity shown visually by
the navigation node.
| Modifier and Type | Method and Description |
|---|---|
Navigation |
addChild(Integer index,
String name)
Adds a child navigation that will be added to the specified position among the ordered children list.
|
Navigation |
addChild(String name)
Adds a child navigation that will be added to the last position among the ordered children list.
|
void |
destroy()
Destroys this navigation.
|
Navigation |
getChild(String name)
Returns a specified navigation.
|
List<Navigation> |
getChildren()
Returns the child navigations.
|
int |
getIndex()
Returns the index of this navigation.
|
Link |
getLink()
Returns the current link related to this navitation object.
|
String |
getName()
Returns the navigation name.
|
ObjectType<? extends Navigation> |
getObjectType()
Extends the object type to navigation.
|
Navigation |
getParent()
Return the navigation parent or null if it is a root.
|
Site |
getSite()
Returns the site this navigation belongs to
|
Templatized |
getTemplatized()
Returns the templatized aspect of this navigation when it exists.
|
<L extends Link> |
linkTo(ObjectType<L> linkType)
Link the navigation to a specifed type and returns the corresponding link subclass that
allows the configuration of the link.
|
void |
setName(String name)
Update the navigation name.
|
getAttributes, getObjectIdadapt, isAdapted, removeAdapterString getName()
void setName(String name)
name - the new navigation nameint getIndex()
ObjectType<? extends Navigation> getObjectType()
getObjectType in interface WorkspaceObjectSite getSite()
Navigation getParent()
List<Navigation> getChildren()
Navigation getChild(String name)
name - the navigation nameNavigation addChild(String name) throws NullPointerException, IllegalArgumentException
name - the child nameNullPointerException - when a null name is providedIllegalArgumentException - when an illegal name is providedNavigation addChild(Integer index, String name) throws NullPointerException, IndexOutOfBoundsException, IllegalArgumentException
index - the child indexname - the child nameNullPointerException - when a null name is providedIndexOutOfBoundsException - if the index is out of boundsIllegalArgumentException - when an illegal name is providedvoid destroy()
Link getLink()
<L extends Link> L linkTo(ObjectType<L> linkType)
L - the link type parameterlinkType - the link typeTemplatized getTemplatized()
Copyright © 2025 JBoss by Red Hat. All Rights Reserved.