public class NavuParser extends Object
NavuNode.getValues(String)
, NavuNode.setValues(String)
and
PreparedXMLStatement
will give necessary support for xml snippets.Modifier and Type | Field and Description |
---|---|
static int |
MODE_GET
parse xml as preparation for a getValues call
|
static int |
MODE_SET
parse xml as preparation for a setValues call
|
static int |
MODE_SET_PREPARE
parse xml with "?" arguments as preparation for a setValues call
|
Constructor and Description |
---|
NavuParser(String xml,
MaapiSchemas.CSNode node,
ConfPath path,
int mode)
Constructor for the XML parser
The xml snippet must have root tag that corresponds to the root CSNode
The parser works in one of three modes:
NavuParser.MODE_GET |
Modifier and Type | Method and Description |
---|---|
Map<Integer,Object[]> |
getParamIndexes()
Helper array for parser mode
NavuParser.MODE_SET_PREPARE needed to
superpose "?" arguments. |
ConfXMLParam[] |
parse()
Parses the xml and produces ConfXMLParam[]
|
public static final int MODE_GET
public static final int MODE_SET
public static final int MODE_SET_PREPARE
public NavuParser(String xml, MaapiSchemas.CSNode node, ConfPath path, int mode) throws NavuException
NavuParser.MODE_GET
Parsing the xml as preparation for a
NavuNode.getValues(ConfXMLParam[])
request.
NavuParser.MODE_SET
Parsing the xml as preparation for a
NavuNode.setValues(ConfXMLParam[])
request.
NavuParser.MODE_SET_PREPARE
Parsing the xml as preparation for a
NavuNode.setValues(ConfXMLParam[])
request.
In this mode the xml snippet is expected to contain "?" as leaf values
to be superposed before using the output.
This superposing is handled by the PreparedXMLStatement
class
which should be used in this case
xml
- the xml snippetnode
- the root node start parsing frommode
- one of NavuParser.MODE_GET
, NavuParser.MODE_SET
or
NavuParser.MODE_SET_PREPARE
NavuException
public ConfXMLParam[] parse() throws NavuException
NavuException
public Map<Integer,Object[]> getParamIndexes()
NavuParser.MODE_SET_PREPARE
needed to
superpose "?" arguments.