Class NavuAction
Although the NavuAction
implements NavuNode
the usage of this class only to call the action with given parameters
and it is limited in functionality specifies in NavuNode
.
-
Method Summary
Modifier and TypeMethodDescriptioncall()
Issues an action with empty parameterscall
(ConfXMLParam[] params) Issues an action call with given parametersIssues an action call with given parameterchildren()
Return the children of this node.Returns a reference to a subordinatecontainer
with the hash valuekey
.Returns a reference to a subordinatecontainer
with the namekey
.context()
Returns the currentNavuContext
that this node is attached to.Encodes the sub-tree including the currentNavuNode
as the topmostNavuNode
as aConfXMLParam
array.Encodes the sub-tree including the currentNavuNode
as the topmostNavuNode
as aConfXMLParam
array.boolean
Compares the specified object with thisNavuAction
for equality.boolean
exists()
Generic exists test for Navu navigational elementsgetCdbSession
(CdbDBType dbType) Deprecated.Returns the latest change that thisNavuNode
has been a subject to by a transaction.Since this method cannot return delete changes in a reliable way this method is deprecated.getChanges
(boolean emitSubtree) Since this method cannot return delete changes in a reliable way this method is deprecated.getChanges
(boolean emitSubtree, DiffIterateOperFlag... forOps) Since this method cannot return delete changes in a reliable way this method is deprecated.getChanges
(NavuContext delcontext) Return the descendantNavuNode
's (including this element) that has been affected by changes to theMAAPI
transaction.getChanges
(NavuContext delcontext, boolean emitSubtree) Return the descendantNavuNode
including thisNavuNode
that has been affected by the current MAAPI transaction.getChanges
(NavuContext delContext, boolean emitSubtree, DiffIterateOperFlag... forOps) Return the descendantNavuNode
including thisNavuNode
that has been affected by the current MAAPI transaction.getInfo()
Returns theNaveNodeInfo
regarding this node.Returns the absolute keypath of this node.getName()
Returns the name of this NavuNode.getNavuNode
(ConfPath path) Retrieve a NavuNode based on the given absolute or relativepath
.Returns the parent of the node.Returns the root namespace of the topmost ancestor.getValues
(ConfXMLParam[] param) Invokes or call an action defined in the data model (seetailf_yang_extensions(5)
).Invokes or call an action defined in the data model (seetailf_yang_extensions(5)
).Returns a reference to a subordinateleaf
with the hash valuekey
.Returns a reference to a subordinateleaf
with the namekey
.Returns a reference to a subordinateleaf-list
with the hash valuekey
.Returns a reference to a subordinateleaf-list
with the namekey
.Returns a reference to a subordinatelist
with the hash valuekey
.Returns a reference to a subordinatelist
with the namekey
.void
reset()
Not supported does nothingselect
(ConfObject[] query) Not supported returns only an empty CollectionNot supported returns only an empty CollectionsetChange
(List<ConfObject> kp, DiffIterateOperFlag op, ConfValue oldValue, NavuContext delContext) Sets the change type on a node.void
startCdbSession
(CdbDBType dbtype, EnumSet<CdbLockType> lockflags) Deprecated.void
Closes all CdbSessions for the NavuContainer.toString()
void
valueUpdateInd
(NavuNode child) xPathSelect
(String xPath) Evaluates the XPath path expressionquery
and returns the resulting node set as list ofNavuNode
's.Methods inherited from class com.tailf.navu.NavuNode
container, getChange, getConfPath, getXml, hashCode, leaf, leafList, list, namespace, prepareXMLCall, setValues, setValues, sharedSetValues, sharedSetValues, xPathSelectIterate
-
Method Details
-
getChanges
public List<NavuNode> getChanges(boolean emitSubtree, DiffIterateOperFlag... forOps) throws NavuException Description copied from class:NavuNode
Since this method cannot return delete changes in a reliable way this method is deprecated. Use insteadNavuNode.getChanges(NavuContext, boolean, DiffIterateOperFlag...)
- Overrides:
getChanges
in classNavuNode
- Throws:
NavuException
-
xPathSelect
Description copied from class:NavuNode
Evaluates the XPath path expressionquery
and returns the resulting node set as list ofNavuNode
's.The expression
query
will be evaluated using this node as the context node.Example:
NavuContainer = root.container(myns._somecontainer1) .container(myns._somecontainer2).container(myns._servers); // Retrieve all the entries of the server list "server" servers.xPathSelect("server"); // Retrieve all child nodes of servers with srv-name = www1 servers.xPathSelect("server[srv-name='www1']/*"); // Retrieve all leaf ip nodes of servers with srv-name = www1 servers.xPathSelect("server[srv-name='www1']/ip");
- Overrides:
xPathSelect
in classNavuNode
- Parameters:
xPath
- XPath 1.0 query- Returns:
- a collection a nodes marching the query
- Throws:
NavuException
-
getChanges
Description copied from class:NavuNode
Since this method cannot return delete changes in a reliable way this method is deprecated. Use insteadNavuNode.getChanges(NavuContext)
- Overrides:
getChanges
in classNavuNode
- Throws:
NavuException
-
leaf
Description copied from class:NavuNode
Returns a reference to a subordinateleaf
with the hash valuekey
.- Overrides:
leaf
in classNavuNode
- Parameters:
key
- hashed name of the subordinate leaf- Returns:
- reference to a subordinate container node
- Throws:
NavuException
- if the corresponding subordinate node is not a leaf node or if there is no subordinate node with the hash valuekey
-
leaf
Description copied from class:NavuNode
Returns a reference to a subordinateleaf
with the namekey
.- Overrides:
leaf
in classNavuNode
- Parameters:
leaf
- the name of the subordinate leaf- Returns:
- reference to a subordinate leaf node
- Throws:
NavuException
- if the corresponding subordinate node is not a leaf node or if there is no subordinate node with the namekey
-
leaf
Description copied from class:NavuNode
- Overrides:
leaf
in classNavuNode
- Throws:
NavuException
-
leafList
Description copied from class:NavuNode
Returns a reference to a subordinateleaf-list
with the hash valuekey
.- Overrides:
leafList
in classNavuNode
- Parameters:
key
- hashed name of the subordinate leaf-list- Returns:
- reference to a subordinate leaf-list node
- Throws:
NavuException
- if the corresponding subordinate node is not a leaf-list node or if there is no subordinate node with the hash valuekey
-
leafList
Description copied from class:NavuNode
Returns a reference to a subordinateleaf-list
with the namekey
.- Overrides:
leafList
in classNavuNode
- Parameters:
leafList
- the name of the subordinate leaf-list- Returns:
- reference to a subordinate leaf-list node
- Throws:
NavuException
- if the corresponding subordinate node is not a leaf-list node or if there is no subordinate node with the namekey
-
leafList
Description copied from class:NavuNode
- Overrides:
leafList
in classNavuNode
- Throws:
NavuException
-
list
Description copied from class:NavuNode
Returns a reference to a subordinatelist
with the hash valuekey
.- Overrides:
list
in classNavuNode
- Parameters:
key
- the hashed name of the subordinate list- Returns:
- reference to a subordinate list node
- Throws:
NavuException
- if the corresponding subordinate node is not a list node or if there is no subordinate node with the hash valuekey
-
list
Description copied from class:NavuNode
Returns a reference to a subordinatelist
with the namekey
.- Overrides:
list
in classNavuNode
- Parameters:
key
- the name of the subordinate list- Returns:
- reference to a subordinate list node
- Throws:
NavuException
- if the corresponding subordinate node is not a list node or if there is no subordinate node with the namekey
-
list
Description copied from class:NavuNode
- Overrides:
list
in classNavuNode
- Throws:
NavuException
-
container
Description copied from class:NavuNode
Returns a reference to a subordinatecontainer
with the hash valuekey
. Thecontainer
hash value can be obtained as a constant from a namespace file generated byconfdc
orncsc
, or retrieved with one of the methodsConfNamespace.stringToHash(String)
orMaapiSchemas.stringToHash(String)
. It is also possible to access a container based on its name only, using the overloaded methodNavuNode.container(String)
.- Overrides:
container
in classNavuNode
- Parameters:
key
- hashed name of the container to return- Returns:
- reference to a subordinate container node
- Throws:
NavuException
- if the corresponding subordinate node is not a container or if there is no subordinate node with the hash valuekey
-
container
Description copied from class:NavuNode
Returns a reference to a subordinatecontainer
with the namekey
.- Overrides:
container
in classNavuNode
- Parameters:
key
- the name of the subordinate container- Returns:
- reference to a subordinate container node
- Throws:
NavuException
- if the corresponding subordinate node is not a container node or if there is no subordinate node with the namekey
-
container
Description copied from class:NavuNode
- Overrides:
container
in classNavuNode
- Throws:
NavuException
-
getChanges
Description copied from class:NavuNode
Since this method cannot return delete changes in a reliable way this method is deprecated. Use insteadNavuNode.getChanges(NavuContext, boolean)
- Overrides:
getChanges
in classNavuNode
- Throws:
NavuException
-
encodeXML
Description copied from class:NavuNode
Encodes the sub-tree including the currentNavuNode
as the topmostNavuNode
as aConfXMLParam
array.The returned
ConfXMLParam
array contains no values except for list keys. The leaf elements are encoded asConfXMLParamLeaf
. Therefore, the returning array can be used as a the input parameter toNavuNode.getValues(ConfXMLParam[])
on the current node's parent.NavuNode node = ...; ConfXMLParam[] cxa = node.encodeXML().toArray(new ConfXMLParam[0]); // cxa contains a structure that does not contain values except for // keys in list elements NavuNode parent = node.getParent(); ConfXMLParam[] cxb = parent.getValues(cxa); // cxb contains the same sub-tree with all the values
- Specified by:
encodeXML
in classNavuNode
- Returns:
- A list of
ConfXMLParam
objects corresponding to the sub-tree of this node, with no values except list keys. - Throws:
NavuException
- See Also:
-
encodeValues
Description copied from class:NavuNode
Encodes the sub-tree including the currentNavuNode
as the topmostNavuNode
as aConfXMLParam
array.As opposed to
NavuNode.encodeXML()
, the returnedConfXMLParam
array does contain values in the form ofConfXMLParamValue
- Specified by:
encodeValues
in classNavuNode
- Returns:
- A list of
ConfXMLParam
objects corresponding to the sub-tree of this node, including all values. - Throws:
NavuException
- See Also:
-
getChangeFlag
Returns the latest change that thisNavuNode
has been a subject to by a transaction.- Overrides:
getChangeFlag
in classNavuNode
- Returns:
- Flag for the latest change
- See Also:
-
getInfo
Description copied from class:NavuNode
Returns theNaveNodeInfo
regarding this node.A
NavuNodeInfo
is an object which further information could be retrieved from the current node. -
getKeyPath
Description copied from class:NavuNode
Returns the absolute keypath of this node.- Overrides:
getKeyPath
in classNavuNode
- Returns:
- A String representing the absolute keypath that this
NavuNode
-
getName
Description copied from class:NavuNode
Returns the name of this NavuNode. -
startCdbSession
Deprecated.This method has been deprecated This method is a no op the internal session pool handles the session start- Overrides:
startCdbSession
in classNavuNode
-
stopCdbSession
public void stopCdbSession()Description copied from class:NavuNode
Closes all CdbSessions for the NavuContainer. This is only necessary the case if the the NavuContainer was created with a constructor for CDB access. In such cases it is important to call this method as soon as the NavuContainer has been used. The reason for this is to release any locks on the CDB database as soon as possible. Calling this method several times under the life-cycle of the NavuContainer object is supported.- Overrides:
stopCdbSession
in classNavuNode
-
getParent
Description copied from class:NavuNode
Returns the parent of the node. -
reset
public void reset()Not supported does nothing -
select
Not supported returns only an empty Collection- Specified by:
select
in classNavuNode
- Parameters:
query
- a list of regular expression.- Returns:
- a collection a nodes marching the query
- Throws:
NavuException
-
select
Not supported returns only an empty Collection- Specified by:
select
in classNavuNode
- Parameters:
query
- a "/" separated regular expression.- Returns:
- a collection a nodes marching the query
- Throws:
NavuException
-
select
- Specified by:
select
in classNavuNode
- Parameters:
query
-- Returns:
- a collection a nodes matching a Regular Expression query
- Throws:
NavuException
-
getValues
Invokes or call an action defined in the data model (seetailf_yang_extensions(5)
).The XML input value to this action is the eqvivalent
ConfXMLParam[]
structure.The retrn uarrays are the parameters for and results from the action, respectively, and use the
ConfXMLParam
.- Overrides:
getValues
in classNavuNode
- Parameters:
xml
- XML string representation as the input values to thisaction
- Throws:
NavuException
- See Also:
-
getValues
Invokes or call an action defined in the data model (seetailf_yang_extensions(5)
). The params and values arrays are the parameters for and results from the action, respectively, and use theConfXMLParam
.- Overrides:
getValues
in classNavuNode
- Parameters:
param
- pre-populated array ofConfXMLParam
- Returns:
- Array of
ConfXMLParam
whereConfXMLParamLeaf
is replaced withConfXMLParamValue
- Throws:
NavuException
- If the input parameter does not conform to the current data model or an error occurs during the read.
-
children
Return the children of this node.- Overrides:
children
in classNavuNode
- Returns:
- children of this node
- Throws:
NavuException
-
getCdbSession
Deprecated.This method is deprecated. Use one ofNavuContextBase.getReadConfSession()
,NavuContextBase.getReadConfSession()
orNavuContextBase.getWriteOperSession()
instead. Returns the current cdbSession.- Overrides:
getCdbSession
in classNavuNode
- Returns:
- current cdbSession().
-
context
Returns the currentNavuContext
that this node is attached to. -
getRootNS
Returns the root namespace of the topmost ancestor. -
call
Issues an action with empty parameters- Returns:
- result from this action call
- Throws:
NavuException
-
call
Issues an action call with given parameters- Parameters:
params
- parameters to the action call- Throws:
NavuException
- if the NavuContext is not created with Maapi
-
call
Issues an action call with given parameter- Parameters:
xml
- parameters as corresponding xml string data- Throws:
NavuException
-
toString
-
equals
Compares the specified object with thisNavuAction
for equality. Returnstrue
if the given object is also aNavuAction
and it has the sameConfPath
as thisNavuAction
. -
exists
Description copied from class:NavuNode
Generic exists test for Navu navigational elements- Specified by:
exists
in classNavuNode
- Returns:
- boolean
- Throws:
NavuException
-