org.rhq.plugins.apache.augeas
Class ApacheAugeasTree

java.lang.Object
  extended by org.rhq.augeas.tree.impl.AbstractAugeasTree
      extended by org.rhq.augeas.tree.impl.AugeasTreeLazy
          extended by org.rhq.plugins.apache.augeas.ApacheAugeasTree
All Implemented Interfaces:
AugeasTree

public class ApacheAugeasTree
extends AugeasTreeLazy

For Apache, we need our own implementation of the tree because we need to build the tree such that it transparently handles the include directives (i.e. the call to match(String) or matchRelative(AugeasNode, String) should return nodes as if the Include directive was replaced by the contents of the included file.

Author:
Lukas Krejci, Filip Drabek

Field Summary
 
Fields inherited from interface org.rhq.augeas.tree.AugeasTree
AUGEAS_DATA_PATH, PATH_SEPARATOR
 
Constructor Summary
ApacheAugeasTree(String serverRootPath, net.augeas.Augeas ag, AugeasModuleConfig moduleConfig)
           
 
Method Summary
protected  List<String> getIncludeGlobs()
           
 Map<AugeasNode,List<String>> getIncludes()
           
protected  AugeasNode instantiateNode(String fullPath)
           
 List<AugeasNode> match(String expression)
           
 List<AugeasNode> matchRelative(AugeasNode node, String expression)
           
 void setIncludes(Map<AugeasNode,List<String>> includes)
           
 
Methods inherited from class org.rhq.augeas.tree.impl.AugeasTreeLazy
createNode, removeNode
 
Methods inherited from class org.rhq.augeas.tree.impl.AbstractAugeasTree
createNode, get, getAugeas, getFile, getLoadedNode, getModuleConfig, getNode, getNodeBuffer, getRootNode, save, setRootNode, setValue, summarizeAugeasError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApacheAugeasTree

public ApacheAugeasTree(String serverRootPath,
                        net.augeas.Augeas ag,
                        AugeasModuleConfig moduleConfig)
Method Detail

instantiateNode

protected AugeasNode instantiateNode(String fullPath)
Overrides:
instantiateNode in class AugeasTreeLazy

getIncludes

public Map<AugeasNode,List<String>> getIncludes()

setIncludes

public void setIncludes(Map<AugeasNode,List<String>> includes)

match

public List<AugeasNode> match(String expression)
                       throws AugeasTreeException
Specified by:
match in interface AugeasTree
Overrides:
match in class AbstractAugeasTree
Throws:
AugeasTreeException

matchRelative

public List<AugeasNode> matchRelative(AugeasNode node,
                                      String expression)
                               throws AugeasTreeException
Specified by:
matchRelative in interface AugeasTree
Overrides:
matchRelative in class AbstractAugeasTree
Throws:
AugeasTreeException

getIncludeGlobs

protected List<String> getIncludeGlobs()
Overrides:
getIncludeGlobs in class AbstractAugeasTree


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