org.rhq.augeas.node
Class AugeasRootNode

java.lang.Object
  extended by org.rhq.augeas.node.AugeasNodeBase
      extended by org.rhq.augeas.node.AugeasRootNode
All Implemented Interfaces:
AugeasNode

public class AugeasRootNode
extends AugeasNodeBase
implements AugeasNode

Represents the root node of the augeas tree.

Author:
Filip Drabek

Field Summary
 
Fields inherited from class org.rhq.augeas.node.AugeasNodeBase
ag, childNodes, label, parentNode, path, seq, value
 
Constructor Summary
AugeasRootNode()
           
AugeasRootNode(List<AugeasNode> nodes)
           
 
Method Summary
 void addChildNode(AugeasNode node)
           
 List<AugeasNode> getChildByLabel(String labelName)
           
 List<AugeasNode> getChildNodes()
           
 String getFullPath()
           
 String getLabel()
           
 AugeasNode getParentNode()
           
 String getPath()
           
 void remove(boolean updateSeq)
          Removes the node from its parent children optionally updating the sequence numbers of the sibling nodes with the same label.
 void setPath(String path)
           
 void updateFromParent()
          Updates the settings of this node according to the data in the parent.
 
Methods inherited from class org.rhq.augeas.node.AugeasNodeBase
getSeq, getValue, setLabel, setSeq, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.rhq.augeas.node.AugeasNode
equals, getSeq, getValue, setLabel, setSeq, setValue
 

Constructor Detail

AugeasRootNode

public AugeasRootNode(List<AugeasNode> nodes)

AugeasRootNode

public AugeasRootNode()
Method Detail

addChildNode

public void addChildNode(AugeasNode node)
Specified by:
addChildNode in interface AugeasNode

getChildNodes

public List<AugeasNode> getChildNodes()
Specified by:
getChildNodes in interface AugeasNode
Overrides:
getChildNodes in class AugeasNodeBase
Returns:
the child nodes in the tree

getFullPath

public String getFullPath()
Specified by:
getFullPath in interface AugeasNode
Returns:
the full path of the node including its label and sequence number

getLabel

public String getLabel()
Specified by:
getLabel in interface AugeasNode
Overrides:
getLabel in class AugeasNodeBase
Returns:
the label of the node

getParentNode

public AugeasNode getParentNode()
Specified by:
getParentNode in interface AugeasNode
Overrides:
getParentNode in class AugeasNodeBase
Returns:
the parent node in the tree

getPath

public String getPath()
Specified by:
getPath in interface AugeasNode
Overrides:
getPath in class AugeasNodeBase
Returns:
returns the path to the node in the Augeas tree, excluding the node itself.

getChildByLabel

public List<AugeasNode> getChildByLabel(String labelName)
Specified by:
getChildByLabel in interface AugeasNode

remove

public void remove(boolean updateSeq)
            throws AugeasTreeException
Description copied from interface: AugeasNode
Removes the node from its parent children optionally updating the sequence numbers of the sibling nodes with the same label.

Specified by:
remove in interface AugeasNode
Parameters:
updateSeq - whether to update the siblings' sequence numbers
Throws:
AugeasTreeException

setPath

public void setPath(String path)
             throws AugeasTreeException
Specified by:
setPath in interface AugeasNode
Throws:
AugeasTreeException

updateFromParent

public void updateFromParent()
Description copied from interface: AugeasNode
Updates the settings of this node according to the data in the parent. This method should work recursively.

Specified by:
updateFromParent in interface AugeasNode


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.