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,
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:
MODE_GET |
Modifier and Type | Method and Description |
---|---|
Map<Integer,Object[]> |
getParamIndexes()
Helper array for parser mode
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, int mode) throws NavuException
MODE_GET
Parsing the xml as preparation for a
NavuNode.getValues(ConfXMLParam[])
request.
MODE_SET
Parsing the xml as preparation for a
NavuNode.setValues(ConfXMLParam[])
request.
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 MODE_GET
, MODE_SET
or
MODE_SET_PREPARE
NavuException
public Map<Integer,Object[]> getParamIndexes()
MODE_SET_PREPARE
needed to
superpose "?" arguments.public ConfXMLParam[] parse() throws NavuException
NavuException