java.lang.Object | |
↳ | com.datalogic.device.configuration.ConfigurationManager |
ConfigurationManager
gives the developer the ability to browse and set the configuration properties of the device. The device, as a managed device, exposes properties organized in a tree. Each property has a unique identifier used to uniquely identify the property.
ConfigurationManager is the sdk access point to the whole of properties that describes and allows the configuration of the device.
Using ConfigurationManager the user can read and modify the value of any property.
The properties are organized in a tree where the leaves are the properties and the intermediate nodes are the groups. A group is a functional collection of property.
A group cannot be modified, only the contained properties can be modified.
A property is uniquely identified by an integer identifier PropertyID
.
A group is uniquely identified by an integer identifier PropertyGroupID
..
The ConfigurationManager offers methods:
A Property
offers methods to get/set the value.
When the value of a property is modified it is not directly applied to the device.
The change is only kept in the sdk local image of the configuration that’s the tree of properties.
To actually apply the change to the device the ConfigurationManager commit() method must be called.
A group PropertyGroup
offers methods:
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This is the constructor of ConfigurationManager.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Applies all the modified values since the last
commit() to the device
and also commits them to the persistent storage. | |||||||||||
Returns the
Property whose identifier has the given integer value PropertyID . | |||||||||||
Gets the
Property whose identifier has the integer value defined by the given constant PropertyID . | |||||||||||
Gets the
PropertyGroup whose identifier has the given integer value PropertyGroupID . | |||||||||||
Gets the
PropertyGroup whose identifier has the integer value defined by the given string PropertyGroupID . | |||||||||||
Returns the
PropertyGroup root of the tree of Property s of the configuration. | |||||||||||
Register the
ConfigurationChangeListener . | |||||||||||
Unegister the
ConfigurationChangeListener . |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
This is the constructor of ConfigurationManager.
context | Context context of the caller application |
---|
ConfigException | in case of error. |
---|
Applies all the modified values since the last commit()
to the device
and also commits them to the persistent storage.
All the properties committed in this way will maintain the set value between reboots.
It works in best effort. If the application of some properties failed, the list of their identifiers
is returned through the exception bad_id_buffer
.
SUCCESS
in case of success, otherwise a possible error
code, matching one of the ConfigException
error constants.ConfigException | in case of error, when exceptions are enabled through the ErrorManager singleton.
|
---|
Returns the Property
whose identifier has the given integer value PropertyID
.
If a property with the given id is not found NULL is returned.
If the returned property is not supported, get and set on the property will fail.
id | int unique identifier of the requested property |
---|
Gets theProperty
whose identifier has the integer value defined by the given constant PropertyID
.
If a property with the given name is not found NULL is returned.
If the returned property is not supported, get and set on the property will fail.
name | String defining string of the unique identifier of the requested property |
---|
Gets the PropertyGroup
whose identifier has the given integer value PropertyGroupID
.
If a propertyGroup with the given id is not found NULL is returned.
id | int integer value of the identifier of the requested group |
---|
Gets the PropertyGroup
whose identifier has the integer value defined by the given string PropertyGroupID
.
If a propertyGroup with the given name is not found NULL is returned.
name | String name of the requested group |
---|
Returns the PropertyGroup
root of the tree of Property
s of the configuration.
PropertyGroup
representing the root of the configuration tree.
Register the ConfigurationChangeListener
.
listener | ConfigurationChangeListener listener used to be notified of a change of the configuration |
---|
SUCCESS
in case of success, otherwise a possible error
code, matching one of the ConfigException
error constants.
Unegister the ConfigurationChangeListener
.
listener | ConfigurationChangeListener listener to be notified of a change of the configuration |
---|
SUCCESS
in case of success, otherwise a possible error
code, matching one of the ConfigException
error constants.