Package org.apache.maven.index.treeview
Class AbstractTreeNode
java.lang.Object
org.apache.maven.index.treeview.AbstractTreeNode
- All Implemented Interfaces:
TreeNode
- Direct Known Subclasses:
DefaultTreeNode
Base set of functionality for the TreeNode that all implementations will need.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.maven.index.treeview.TreeNode
TreeNode.Type
-
Constructor Summary
ConstructorDescriptionAbstractTreeNode
(IndexTreeView tview, TreeViewRequest request) Constructor that takes an IndexTreeView implementation and a TreeNodeFactory implementation; -
Method Summary
Modifier and TypeMethodDescriptionfindChildByPath
(String path, TreeNode.Type type) Find a TreeNode based upon a path and Type check.Get the artifact id of this node.Get the children of this node.Get the group id of this node.Get the name of the node.getPath()
Get the path of the node.Get the repository id that this node is stored in.getType()
Get the type of node.Get the version of this node.boolean
isLeaf()
Get flag that determines if the node is a leaf.Get the children of this node.void
setArtifactId
(String artifactId) Set the artifact id of this node.void
setGroupId
(String groupId) Set the group id of this node.void
setLeaf
(boolean leaf) Set flag that determines if the node is a leaf.void
setNodeName
(String nodeName) Set the name of the node.void
Set the path of the node.void
setRepositoryId
(String repositoryId) Set the repository id that this node is stored in.void
setType
(TreeNode.Type type) Set the type of node.void
setVersion
(String version) Set the version of this node.
-
Constructor Details
-
AbstractTreeNode
Constructor that takes an IndexTreeView implementation and a TreeNodeFactory implementation;- Parameters:
tview
-request
-
-
-
Method Details
-
getType
Get the type of node. -
setType
Set the type of node. -
isLeaf
public boolean isLeaf()Get flag that determines if the node is a leaf. -
setLeaf
public void setLeaf(boolean leaf) Set flag that determines if the node is a leaf. -
getNodeName
Get the name of the node.- Specified by:
getNodeName
in interfaceTreeNode
- Returns:
- String
-
setNodeName
Set the name of the node.- Specified by:
setNodeName
in interfaceTreeNode
- Parameters:
nodeName
-
-
getPath
Get the path of the node. -
setPath
Set the path of the node. -
getGroupId
Get the group id of this node.- Specified by:
getGroupId
in interfaceTreeNode
- Returns:
- String
-
setGroupId
Set the group id of this node.- Specified by:
setGroupId
in interfaceTreeNode
- Parameters:
groupId
-
-
getArtifactId
Get the artifact id of this node.- Specified by:
getArtifactId
in interfaceTreeNode
- Returns:
- String
-
setArtifactId
Set the artifact id of this node.- Specified by:
setArtifactId
in interfaceTreeNode
- Parameters:
artifactId
-
-
getVersion
Get the version of this node.- Specified by:
getVersion
in interfaceTreeNode
- Returns:
- String
-
setVersion
Set the version of this node.- Specified by:
setVersion
in interfaceTreeNode
- Parameters:
version
-
-
getRepositoryId
Get the repository id that this node is stored in.- Specified by:
getRepositoryId
in interfaceTreeNode
- Returns:
- String
-
setRepositoryId
Set the repository id that this node is stored in.- Specified by:
setRepositoryId
in interfaceTreeNode
- Parameters:
repositoryId
-
-
getChildren
Get the children of this node. If this is a leaf node, null will be returned. This will NOT perform any actions on the index to retrieve the children, will only return children that have already been loaded via the listChildren method.- Specified by:
getChildren
in interfaceTreeNode
- Returns:
- List
-
listChildren
Get the children of this node. If this is a leaf node, null will be returned. This will use the index to retrieve the list of child nodes.- Specified by:
listChildren
in interfaceTreeNode
- Returns:
- List
- Throws:
IOException
-
findChildByPath
Find a TreeNode based upon a path and Type check.- Specified by:
findChildByPath
in interfaceTreeNode
- Returns:
- TreeNode
- Throws:
IOException
-