Package com.tailf.navu
Class PreparedXMLStatement
Object
com.tailf.navu.PreparedXMLStatement
This class represents a parsed XML-string, optionally with parameterized
values. The string "?" denotes a value that is unknown at the
time when the XML-string is parsed. The "?"-strings
can be replaced by actual values at a later time.
The put()
method is used to replace a "?" parameter
with its actual ConfValue
. The parameter index is zero-based.
When all "?" parameters have been replaced,
setValues()
can be issued which will insert or replace
(if values already exist) the configuration tree specified by the
XML-string at the location where prepareXMLCall
was
called.
If a parameter is not replaced by a value before a setValues()
occurs, the value is treated as a ConfDefault
.
No validation of data types occurs when put()
is called, but
setValues()
will fail if a parameter is set to a type other
than the one mandated by the YANG-model.
module mtest { namespace "http://tail-f.com/test/mtest/1.0"; prefix mtest; import ietf-inet-types { prefix inet; } container mtest { container servers { list server { key name; max-elements 64; leaf name { type string; } leaf ip { type inet:host; mandatory true; } leaf port { type inet:port-number; default 80; } list interface { key name; max-elements 8; leaf name { type string; } leaf mtu { type int64; default 1500; } } } } } }PreparedXMLStatement xmlst = serversNavuNode.prepareXMLCall("<server>" + "<name>?</name>" + "<ip>?</ip>" + "<port>?</port>" + "</server>"); xmlst.put(0, "www1"); xmlst.put(1, new ConfIPv4("192.168.10.12")); xmlst.put(2, new ConfUInt16(80)); xmlst.setValues();
-
Constructor Summary
ConstructorDescriptionPreparedXMLStatement
(ConfXMLParam[] params, Map<Integer, Object[]> paramInfoMap, NavuNode node) -
Method Summary
Modifier and TypeMethodDescriptionvoid
put
(int index, ConfObject val) Populate the parameterized value at positionindex
with the valueval
.void
Populate the parameterized value at positionindex
with the valuestrval
.void
reset()
void
set()
Deprecated.void
set
(NavuContext context) Deprecated.void
Deprecated.void
setBinary
(int index, ConfBinary val) Deprecated.void
Deprecated.void
Deprecated.void
setBool
(int index, boolean val) Deprecated.void
Deprecated.void
Deprecated.void
Deprecated.void
setConfDouble
(int index, ConfDouble val) Deprecated.void
setConfFloat
(int index, ConfFloat val) Deprecated.void
setConfHexList
(int index, ConfHexList val) Deprecated.void
setConfIdentityRef
(int index, ConfIdentityRef val) Deprecated.void
setConfKey
(int index, ConfKey key) Deprecated.void
setConfObjectRef
(int index, ConfObjectRef val) Deprecated.void
Deprecated.void
setDatetime
(int index, ConfDatetime val) Deprecated.void
setDecimal64
(int index, ConfDecimal64 val) Deprecated.void
setDuration
(int index, ConfDuration val) Deprecated.void
setEnumeration
(int index, ConfEnumeration val) Deprecated.void
setHexList
(int index, ConfHexList val) Deprecated.void
Deprecated.void
Deprecated.void
Deprecated.void
Deprecated.void
Deprecated.void
setIPv4Prefix
(int index, ConfIPv4Prefix val) Deprecated.void
Deprecated.void
setIPv6Prefix
(int index, ConfIPv6Prefix val) Deprecated.void
setUInt16
(int index, ConfUInt16 val) Deprecated.void
setUInt32
(int index, ConfUInt32 val) Deprecated.void
setUInt64
(int index, ConfUInt64 val) Deprecated.void
Deprecated.void
When all of the parameterized values have been filled in, this method is intended to be invoked for a final set operation with the given values.void
setValues
(NavuContext context) When all of the parameterized values have been filled in, this method is intended to be invoked for a final set operation with the given values.void
Similar tosetValues(NavuContext)
but uses the context of the supplied node.void
Variant ofsetValues()
with FastMap support.void
sharedSetValues
(NavuContext context) Variant ofsetValues(NavuContext)
with FastMap support.void
sharedSetValues
(NavuNode node) Variant ofsetValues(NavuNode)
with FastMap support.
-
Constructor Details
-
Method Details
-
put
Populate the parameterized value at positionindex
with the valueval
. The first parameter has index 0.- Parameters:
index
- zero-based index of the parameterval
- the value to give to the parameter
-
put
Populate the parameterized value at positionindex
with the valuestrval
. The first parameter has index 0. The input string is converted to the appropriate data type as specified by the current schema.- Parameters:
index
- zero-based index of the parameterstrval
- string representation of the value to give to the parameter
-
reset
public void reset() -
setUInt8
Deprecated.This method is deprecated, useput(int, ConfObject)
instead. Set the parameter at indexindex
with the corresponding ConfUInt8 value.- Parameters:
index
- The Index positionval
- The value at position index
-
setUInt16
Deprecated.This method is deprecated, useput(int, ConfObject)
instead. Set the parameter at indexindex
with the corresponding ConfUInt16 value.- Parameters:
index
- The Index positionval
- The value at position index
-
setUInt32
Deprecated.This method is deprecated, useput(int, ConfObject)
instead. Set the parameter at indexindex
with the corresponding ConfUInt32 value.- Parameters:
index
- The Index positionval
- The value at position index
-
setUInt64
Deprecated.This method is deprecated, useput(int, ConfObject)
instead. Set the parameter at indexindex
with the corresponding ConfUInt64 value.- Parameters:
index
- The Index positionval
- The value at position index
-
setInt8
Deprecated.This method is deprecated, useput(int, ConfObject)
instead. Set the parameter at indexindex
with the corresponding ConfInt8 value.- Parameters:
index
- The Index positionval
- The value at position index
-
setInt16
Deprecated.This method is deprecated, useput(int, ConfObject)
instead. Set the parameter at indexindex
with the corresponding ConfUInt16 value.- Parameters:
index
- The Index positionval
- The value at position index
-
setInt32
Deprecated.This method is deprecated, useput(int, ConfObject)
instead. Set the parameter at indexindex
with the corresponding ConfUInt32 value.- Parameters:
index
- The Index positionval
- The value at position index
-
setInt64
Deprecated.This method is deprecated, useput(int, ConfObject)
instead. Set the parameter at indexindex
with the corresponding ConfUInt64 value.- Parameters:
index
- The Index positionval
- The value at position index
-
setIPv4
Deprecated.This method is deprecated, useput(int, ConfObject)
instead. Set the parameter at indexindex
with the corresponding ConfIPv4 value.- Parameters:
index
- The Index positionval
- The value at position index
-
setIPv4Prefix
Deprecated.This method is deprecated, useput(int, ConfObject)
instead. Set the parameter at indexindex
with the corresponding ConfIPv4Prefix value.- Parameters:
index
- The Index positionval
- The value at position index
-
setIPv6
Deprecated.This method is deprecated, useput(int, ConfObject)
instead. Set the parameter at indexindex
with the corresponding ConfIPv4Prefix value.- Parameters:
index
- The Index positionval
- The value at position index
-
setIPv6Prefix
Deprecated.This method is deprecated, useput(int, ConfObject)
instead. Set the parameter at indexindex
with the corresponding ConfIPv6Prefix value.- Parameters:
index
- The Index positionval
- The value at position index
-
setBinary
Deprecated.This method is deprecated, useput(int, ConfObject)
instead. Set the parameter at indexindex
with the corresponding ConfBinary value.- Parameters:
index
- The Index positionval
- The value at position index
-
setHexList
Deprecated.This method is deprecated, useput(int, ConfObject)
instead. Set the parameter at indexindex
with the corresponding ConfHexList value.- Parameters:
index
- The Index positionval
- The value at position index
-
setBit32
Deprecated.This method is deprecated, useput(int, ConfObject)
instead. Set the parameter at indexindex
with the corresponding ConfBit32value.- Parameters:
index
- The Index positionval
- The value at position index
-
setBit64
Deprecated.This method is deprecated, useput(int, ConfObject)
instead. Set the parameter at indexindex
with the corresponding ConfBit64value.- Parameters:
index
- The Index positionval
- The value at position index
-
setBool
Deprecated.This method is deprecated, useput(int, ConfObject)
instead. Set the parameter at indexindex
with the corresponding ConfBool.- Parameters:
index
- The Index positionval
- The value at position index
-
setBool
Deprecated.This method is deprecated, useput(int, ConfObject)
instead. Set the parameter at indexindex
with the corresponding ConfBool.- Parameters:
index
- The Index positionval
- The value at position index
-
setBuf
Deprecated.This method is deprecated, useput(int, ConfObject)
instead. Set the parameter at indexindex
with the corresponding ConfBuf.- Parameters:
index
- The Index positionval
- The value at position index
-
setBuf
Deprecated.This method is deprecated, useput(int, ConfObject)
instead. Set the parameter at indexindex
with the corresponding ConfBuf.- Parameters:
index
- The Index positionval
- The value at position index
-
setDate
Deprecated.This method is deprecated, useput(int, ConfObject)
instead. Set the parameter at indexindex
with the corresponding ConfDate.- Parameters:
index
- The Index positionval
- The value at position index
-
setDatetime
Deprecated.This method is deprecated, useput(int, ConfObject)
instead. Set the parameter at indexindex
with the corresponding ConfDatetime.- Parameters:
index
- The Index positionval
- The value at position index
-
setDuration
Deprecated.This method is deprecated, useput(int, ConfObject)
instead. Set the parameter at indexindex
with the corresponding ConfDuration.- Parameters:
index
- The Index positionval
- The value at position index
-
setEnumeration
Deprecated.This method is deprecated, useput(int, ConfObject)
instead. Set the parameter at indexindex
with the corresponding ConfEnumeration.- Parameters:
index
- The Index positionval
- The value at position index
-
setDecimal64
Deprecated.This method is deprecated, useput(int, ConfObject)
instead. Set the parameter at indexindex
with the corresponding ConfDecimal64.- Parameters:
index
- The Index positionval
- The value at position index
-
setConfDouble
Deprecated.This method is deprecated, useput(int, ConfObject)
instead. Set the parameter at indexindex
with the corresponding ConfDouble.- Parameters:
index
- The Index positionval
- The value at position index
-
setConfFloat
Deprecated.This method is deprecated, useput(int, ConfObject)
instead. Set the parameter at indexindex
with the corresponding ConfDouble.- Parameters:
index
- The Index positionval
- The value at position index
-
setConfIdentityRef
Deprecated.This method is deprecated, useput(int, ConfObject)
instead. Set the parameter at indexindex
with the corresponding ConfIdentityRef.- Parameters:
index
- The Index positionval
- The value at position index
-
setConfObjectRef
Deprecated.This method is deprecated, useput(int, ConfObject)
instead. Set the parameter at indexindex
with the corresponding ConfIdentityRef.- Parameters:
index
- The Index positionval
- The value at position index
-
setConfHexList
Deprecated.This method is deprecated, useput(int, ConfObject)
instead. Set the parameter at indexindex
with the corresponding ConfIdentityRef.- Parameters:
index
- The Index positionval
- The value at position index
-
setConfKey
Deprecated.This method is deprecated, useput(int, ConfObject)
instead. -
getConfXMLParams
-
set
Deprecated.This method is deprecated, usesetValues()
instead- Throws:
NavuException
-
setValues
When all of the parameterized values have been filled in, this method is intended to be invoked for a final set operation with the given values.- Throws:
NavuException
-