|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.augeas.Augeas
public class Augeas
Public Augeas API.
Field Summary | |
---|---|
protected AugPointer |
aug
Pointert to he active augeas instance. |
protected Aug |
AugLib
The augeas library handle |
protected int |
lastReturn
The result of the last augeas call. |
static int |
NO_LOAD
Do not load the tree from AUG_INIT |
static int |
NO_MODL_AUTOLOAD
|
static int |
NO_STDINC
Do not use the builtin load path for modules |
static int |
NONE
Flags to use |
protected boolean |
raiseExceptions
If a invalid augeas call (lastReturn = -1) should result in an exception |
static int |
SAVE_BACKUP
Keep the original file with a .augsave extension |
static int |
SAVE_NEWFILE
Save changes into a file with extension .augnew, and do not overwrite the original file. |
static int |
SAVE_NOOP
Make save a no-op process, just record what would have changed |
static int |
TYPE_CHECK
Typecheck lenses; since it can be very expensive it is not done by default |
Constructor Summary | |
---|---|
Augeas()
Default constructor that defaults to root and no load path |
|
Augeas(int flags)
New Augeas instance with only the flags. |
|
Augeas(java.lang.String root,
java.lang.String loadpath,
int flags)
Constructs a new Augeas connection |
Method Summary | |
---|---|
protected void |
check()
|
int |
clear(java.lang.String path)
Clear the PATH, i.e. |
int |
clearTransforms()
Clear all transforms under /augeas/load. |
int |
close()
Write all pending changes to disk |
int |
defineNode(java.lang.String name,
java.lang.String expr,
java.lang.String value)
Define a variable NAME whose value is the result of evaluating EXPR, which must be non-NULL and evaluate to a nodeset. |
int |
defineVariable(java.lang.String name,
java.lang.String expr)
Define a variable NAME whose value is the result of evaluating EXPR. |
boolean |
exists(java.lang.String path)
Returns true if the path exists |
java.lang.String |
get(java.lang.String path)
Lookup the value associated eith PATH |
int |
getLastReturn()
Return the result from the last augeas call. |
boolean |
getRaiseExceptions()
if exceptions should be raised |
int |
insert(java.lang.String path,
java.lang.String label,
boolean before)
Create a new sibling LABEL for PATH by inserting into the tree just before PATH if BEFORE == 1 or just after PATH if BEFORE == 0. |
int |
load()
Load files into the tree |
java.util.List<java.lang.String> |
match(java.lang.String path)
Return a list of the nodes which match the path string |
int |
move(java.lang.String source,
java.lang.String dest)
Move the node SRC to DST. |
protected void |
processLastCall(java.lang.String message)
If the user has opted to throw exceptions on failure, this method will do so based on a return code of -1 |
int |
remove(java.lang.String path)
|
int |
rm(java.lang.String path)
Remove path and all its children. |
int |
save()
Write all pending changes to disk |
int |
set(java.lang.String path,
java.lang.String value)
Set the value associated with PATH to VALUE. |
void |
setRaiseExceptions(boolean value)
sets if exceptions should be raised |
int |
transform(java.lang.String lens,
java.lang.String name,
java.util.List<java.lang.String> incl,
java.util.List<java.lang.String> excl)
Add a transform under /augeas/load |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int NONE
public static int SAVE_BACKUP
public static int SAVE_NEWFILE
public static int TYPE_CHECK
public static int NO_STDINC
public static int SAVE_NOOP
public static int NO_LOAD
public static int NO_MODL_AUTOLOAD
protected AugPointer aug
protected Aug AugLib
protected int lastReturn
protected boolean raiseExceptions
Constructor Detail |
---|
public Augeas()
public Augeas(int flags)
flags
- public Augeas(java.lang.String root, java.lang.String loadpath, int flags)
root
- or all file lookupsloadpath
- path for finding new schemasflags
- any flags to useMethod Detail |
---|
protected void check()
public boolean getRaiseExceptions()
public void setRaiseExceptions(boolean value)
public int clear(java.lang.String path)
public int clearTransforms()
public int close()
public int defineNode(java.lang.String name, java.lang.String expr, java.lang.String value)
public int defineVariable(java.lang.String name, java.lang.String expr)
public boolean exists(java.lang.String path)
public java.lang.String get(java.lang.String path)
public int getLastReturn()
public int insert(java.lang.String path, java.lang.String label, boolean before)
public int load()
public java.util.List<java.lang.String> match(java.lang.String path)
path
-
public int move(java.lang.String source, java.lang.String dest)
public int remove(java.lang.String path)
rm
public int rm(java.lang.String path)
public int save()
public int set(java.lang.String path, java.lang.String value)
public int transform(java.lang.String lens, java.lang.String name, java.util.List<java.lang.String> incl, java.util.List<java.lang.String> excl)
lens
- the lens to usename
- a unique name (optional)incl
- a list of glob patterns to transformexcl
- a list of glob patterns to remove
protected void processLastCall(java.lang.String message)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |