org.rhq.plugins.apache.augeas
Class ApacheAugeasNode

java.lang.Object
  extended by org.rhq.augeas.node.AugeasNodeBase
      extended by org.rhq.augeas.node.AugeasNodeLazy
          extended by org.rhq.plugins.apache.augeas.ApacheAugeasNode
All Implemented Interfaces:
AugeasNode

public class ApacheAugeasNode
extends AugeasNodeLazy
implements AugeasNode

A specialization of an AugeasNode for purposes of Apache mapping. We need to specialize, because the Augeas tree we are building needs transparently places nodes from different files in appropriate places in the tree where those files are included using the Apache <Include> directive. This node holds a list of all nodes that have been included to it and modifies the get* methods to handle these as well.

Author:
Filip Drabek, Lukas Krejci

Field Summary
 
Fields inherited from class org.rhq.augeas.node.AugeasNodeBase
ag, childNodes, label, parentNode, path, seq, value
 
Constructor Summary
ApacheAugeasNode(AugeasNode parentNode, AugeasTree tree, String fullPath)
           
ApacheAugeasNode(String fullPath, AugeasTree tree)
           
 
Method Summary
 void addChildNode(AugeasNode node)
           
 void addIncludeNodes(AugeasNode includeNode, List<AugeasNode> nodes)
          Adds the provided nodes to the list of the included child nodes.
 List<AugeasNode> getChildNodes()
          Returns the list of child nodes.
 AugeasNode getParentNode()
           
 void setParentNode(AugeasNode node)
           
 void setPath(String path)
           
 void updateFromParent()
           
 
Methods inherited from class org.rhq.augeas.node.AugeasNodeLazy
equals, getChildByLabel, getFullPath, getValue, remove, setValue
 
Methods inherited from class org.rhq.augeas.node.AugeasNodeBase
getLabel, getPath, getSeq, setLabel, setSeq
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.rhq.augeas.node.AugeasNode
equals, getChildByLabel, getFullPath, getLabel, getPath, getSeq, getValue, remove, setLabel, setSeq, setValue
 

Constructor Detail

ApacheAugeasNode

public ApacheAugeasNode(String fullPath,
                        AugeasTree tree)

ApacheAugeasNode

public ApacheAugeasNode(AugeasNode parentNode,
                        AugeasTree tree,
                        String fullPath)
Method Detail

getChildNodes

public List<AugeasNode> getChildNodes()
Returns the list of child nodes. A child node is either a direct child node or a child of an direct child include node. I.e. we are transparently leaving out the Include directives and replacing them with their children.

Specified by:
getChildNodes in interface AugeasNode
Overrides:
getChildNodes in class AugeasNodeLazy
Returns:
the child nodes
See Also:
AugeasNodeLazy.getChildNodes()

addIncludeNodes

public void addIncludeNodes(AugeasNode includeNode,
                            List<AugeasNode> nodes)
Adds the provided nodes to the list of the included child nodes.

Parameters:
nodes -

getParentNode

public AugeasNode getParentNode()
Specified by:
getParentNode in interface AugeasNode
Overrides:
getParentNode in class AugeasNodeLazy

addChildNode

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

setPath

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

updateFromParent

public void updateFromParent()
Specified by:
updateFromParent in interface AugeasNode
Overrides:
updateFromParent in class AugeasNodeLazy

setParentNode

public void setParentNode(AugeasNode node)


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