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
ConstructorsConstructorDescriptionAbstractTreeNode(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.booleanisLeaf()Get flag that determines if the node is a leaf.Get the children of this node.voidsetArtifactId(String artifactId) Set the artifact id of this node.voidsetGroupId(String groupId) Set the group id of this node.voidsetLeaf(boolean leaf) Set flag that determines if the node is a leaf.voidsetNodeName(String nodeName) Set the name of the node.voidSet the path of the node.voidsetRepositoryId(String repositoryId) Set the repository id that this node is stored in.voidsetType(TreeNode.Type type) Set the type of node.voidsetVersion(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:
getNodeNamein interfaceTreeNode- Returns:
- String
-
setNodeName
Set the name of the node.- Specified by:
setNodeNamein 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:
getGroupIdin interfaceTreeNode- Returns:
- String
-
setGroupId
Set the group id of this node.- Specified by:
setGroupIdin interfaceTreeNode- Parameters:
groupId-
-
getArtifactId
Get the artifact id of this node.- Specified by:
getArtifactIdin interfaceTreeNode- Returns:
- String
-
setArtifactId
Set the artifact id of this node.- Specified by:
setArtifactIdin interfaceTreeNode- Parameters:
artifactId-
-
getVersion
Get the version of this node.- Specified by:
getVersionin interfaceTreeNode- Returns:
- String
-
setVersion
Set the version of this node.- Specified by:
setVersionin interfaceTreeNode- Parameters:
version-
-
getRepositoryId
Get the repository id that this node is stored in.- Specified by:
getRepositoryIdin interfaceTreeNode- Returns:
- String
-
setRepositoryId
Set the repository id that this node is stored in.- Specified by:
setRepositoryIdin 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:
getChildrenin 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:
listChildrenin interfaceTreeNode- Returns:
- List
- Throws:
IOException
-
findChildByPath
Find a TreeNode based upon a path and Type check.- Specified by:
findChildByPathin interfaceTreeNode- Returns:
- TreeNode
- Throws:
IOException
-