Package com.nt.udc.ndk.node
Class NPLDeclarations
java.lang.Object
com.nt.udc.ndk.node.NPLDeclarations
- All Implemented Interfaces:
ConfigIfc
The main purpose of this class is to provide a clean
interface to declarations in an NPL file. The user of this
class must provide an NPLProgram object, and then will
be able to query the NPLProgram object through the ConfigIfc
interface. The query should be constructed according to the
"block", "sub-block", and "setting" desired.
Consider the following 2 examples.
Given a ConfigIfc object "cfgifc", and a NPL declaration
as follows,
Config {
ConfigSetting1 "true";
ConfigSetting2 "false";
}
Expose for SomeAttrIDList {
in.1;
in.2;
}
then a query for the value of "ConfigSetting1" looks like this,
Config.ConfigSetting1
which would return a value of:
"true"
from the following Java method call:
String value = cfgifc.getItem("Config.ConfigSetting1");
and a query for the "SomeAttrIDList" declarations looks like this,
Expose.SomeAttrIDList
which would return a value of:
"1,2"
from the following Java method call:
String value = cfgifc.getItem("Expose.SomeAttrIDList");
-
Constructor Summary
ConstructorsConstructorDescriptionNPLDeclarations
(NPLProgramIfc nplProgram) Creates an NPLDeclarations object with the given NPL program. -
Method Summary
-
Constructor Details
-
NPLDeclarations
Creates an NPLDeclarations object with the given NPL program.- Parameters:
nplProgram
- NPL Program, containing the NPL declarations
-
-
Method Details
-
getItem
Returns the desired NPL declaration's value. -
setItem
This method is not supported in this implementation of ConfigIfc. -
main
-