public interface AugeasTree
| Modifier and Type | Field and Description |
|---|---|
static String |
AUGEAS_DATA_PATH
All the paths to nodes representing configuration data in Augeas are
prefixed by this.
|
static char |
PATH_SEPARATOR
Path separator in the Augeas expressions.
|
| Modifier and Type | Method and Description |
|---|---|
AugeasNode |
createNode(AugeasNode parentNode,
String name,
String value,
int seq)
Creates a new child node under given parent.
|
AugeasNode |
createNode(String fullPath)
Creates a new node on given path.
|
String |
get(String expr)
Returns a value of the first node matching the expression.
|
File |
getFile(AugeasNode node) |
AugeasNode |
getNode(String path)
Checks whether a node exists on given path.
|
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 |
removeNode(AugeasNode node,
boolean updateSeq)
Removes the node from the tree optionally updating the sequence numbers
of its siblings.
|
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() |
static final char PATH_SEPARATOR
static final String AUGEAS_DATA_PATH
void save()
AugeasNode getNode(String path) throws AugeasTreeException
path - the path to look forAugeasTreeExceptionList<AugeasNode> match(String expression) throws AugeasTreeException
expression - AugeasTreeExceptionList<AugeasNode> matchRelative(AugeasNode node, String expression) throws AugeasTreeException
node - the node to start searching fromexpression - the expressionAugeasTreeExceptionAugeasNode createNode(String fullPath) throws AugeasTreeException
fullPath - AugeasTreeExceptionAugeasNode createNode(AugeasNode parentNode, String name, String value, int seq) throws AugeasTreeException
parentNode - the parent nodename - name of the child nodevalue - value of the child nodeseq - the sequence number of the child nodeAugeasTreeExceptionString get(String expr)
Augeas.get(String).expr - the Augeas expression.AugeasNode getRootNode()
void removeNode(AugeasNode node, boolean updateSeq) throws AugeasTreeException
node - the node to removeupdateSeq - whether to update sequence numbers or not.AugeasTreeExceptionvoid setValue(AugeasNode node, String value)
node - value - File getFile(AugeasNode node)
node - String summarizeAugeasError()
void setRootNode(AugeasNode node)
node - Copyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.