public abstract class AbstractAugeasTree extends Object implements AugeasTree
AUGEAS_DATA_PATH, PATH_SEPARATOR| Modifier | Constructor and Description |
|---|---|
protected |
AbstractAugeasTree(net.augeas.Augeas ag,
AugeasModuleConfig moduleConfig) |
| Modifier and Type | Method and Description |
|---|---|
AugeasNode |
createNode(AugeasNode parentNode,
String name,
String value,
int seq)
Creates a new child node under given parent.
|
String |
get(String expr)
Returns a value of the first node matching the expression.
|
protected net.augeas.Augeas |
getAugeas() |
File |
getFile(AugeasNode node) |
protected List<String> |
getIncludeGlobs() |
protected AugeasNode |
getLoadedNode(String path)
Returns the node on given path or null if it wasn't loaded yet.
|
protected AugeasModuleConfig |
getModuleConfig() |
AugeasNode |
getNode(String path)
Checks whether a node exists on given path.
|
protected AugeasNodeBuffer |
getNodeBuffer() |
AugeasNode |
getRootNode() |
List<AugeasNode> |
match(String expression)
Performs a search using Augeas expression on the tree.
|
List<AugeasNode> |
matchRelative(AugeasNode node,
String expression)
Performs a search using Augeas expression on the tree starting at given node.
|
void |
save()
Persists the tree using Augeas to the individual files.
|
void |
setRootNode(AugeasNode node)
Sets the root node.
|
void |
setValue(AugeasNode node,
String value)
Sets the value of the node directly in Augeas, bypassing the in-memory tree representation.
|
String |
summarizeAugeasError() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateNode, removeNodeprotected AbstractAugeasTree(net.augeas.Augeas ag,
AugeasModuleConfig moduleConfig)
protected net.augeas.Augeas getAugeas()
protected AugeasModuleConfig getModuleConfig()
protected AugeasNodeBuffer getNodeBuffer()
public AugeasNode createNode(AugeasNode parentNode, String name, String value, int seq) throws AugeasTreeException
AugeasTreecreateNode in interface AugeasTreeparentNode - the parent nodename - name of the child nodevalue - value of the child nodeseq - the sequence number of the child nodeAugeasTreeExceptionpublic String get(String expr)
AugeasTreeAugeas.get(String).get in interface AugeasTreeexpr - the Augeas expression.public File getFile(AugeasNode node)
getFile in interface AugeasTreepublic AugeasNode getNode(String path) throws AugeasTreeException
AugeasTreegetNode in interface AugeasTreepath - the path to look forAugeasTreeExceptionpublic AugeasNode getRootNode()
getRootNode in interface AugeasTreepublic List<AugeasNode> match(String expression) throws AugeasTreeException
AugeasTreematch in interface AugeasTreeAugeasTreeExceptionpublic List<AugeasNode> matchRelative(AugeasNode node, String expression) throws AugeasTreeException
AugeasTreematchRelative in interface AugeasTreenode - the node to start searching fromexpression - the expressionAugeasTreeExceptionpublic void save()
AugeasTreesave in interface AugeasTreepublic void setRootNode(AugeasNode node)
AugeasTreesetRootNode in interface AugeasTreepublic void setValue(AugeasNode node, String value)
AugeasTreesetValue in interface AugeasTreepublic String summarizeAugeasError()
summarizeAugeasError in interface AugeasTreeprotected AugeasNode getLoadedNode(String path)
path - Copyright © 2008-2013 Red Hat, Inc.. All Rights Reserved.