to top
Datalogic APIs
public abstract class

Property

extends Object
java.lang.Object
   ↳ com.datalogic.device.configuration.Property<T>
Known Direct Subclasses

Class Overview

Property is the abstract class that represents a generic Property of type T.

Summary

Public Constructors
Property(int id)
Constructor of Property.
Public Methods
static Property findPropertybyId(ArrayList<Property> list, int id)
Finds the corresponding Property matching the passed ID, in a list of Properties.
T get()
Gets the current value of the Property.
T getDefault()
Gets the default value of the Property.
int getId()
Gets the integer value of the unique identifier PropertyID of the property.
String getName()
Gets the name of the unique identifier PropertyID of the property.
boolean getNeedReboot()
Returns whether a Property needs a device reboot to be applied or not.
PropertyType getType()
Gets the type of the Property.
boolean isReadOnly()
Returns whether a Property is read only or not.
boolean isSupported()
Returns whether a Property is supported or not.
int load(PropertyGetter from)
Loads the property with the current set values, through a PropertyGetter.
static int loadlist(PropertyGetter from, ArrayList list)
Loads and sync the current set values into all the Properties contained in the passed list.
int set(T value)
Sets the value of the property, it is not applied to the device.
int setToDefault()
Resets to the default value the property.
int store(PropertyEditor to)
Stores the Property value, applying them.
static int storelist(PropertyEditor to, ArrayList list)
Stores and applies all the Properties and their current associated values.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public Property (int id)

Added in revision 1

Constructor of Property.

Parameters
id int a corresponding numeric ID.

Public Methods

public static Property findPropertybyId (ArrayList<Property> list, int id)

Added in revision 1

Finds the corresponding Property matching the passed ID, in a list of Properties.

Parameters
list The ArrayList containing all the Properties.
id The int representing the ID that should be found.
Returns
  • Property corresponding to the passed ID, null in case of error.

public T get ()

Added in revision 1

Gets the current value of the Property.

Returns
  • T The current value if the property is supported, null if the property is not supported.
Throws
ConfigException when the property is not supported, when exceptions are enabled through the ErrorManager singleton.

public T getDefault ()

Added in revision 32

Gets the default value of the Property. This method is meaningless if the property is get through the BarcodeManager interface.

Returns
  • T Default value of the property.

public int getId ()

Added in revision 1

Gets the integer value of the unique identifier PropertyID of the property.

Returns
  • int The PropertyID, as a number.

public String getName ()

Added in revision 27

Gets the name of the unique identifier PropertyID of the property.

Returns
  • String

public boolean getNeedReboot ()

Added in revision 32

Returns whether a Property needs a device reboot to be applied or not. This method is meaningless if the property is get through the BarcodeManager interface.

Returns
  • boolean value representing whether the Property needs a device reboot to be applied or not.

public PropertyType getType ()

Added in revision 27

Gets the type of the Property. This method is meaningless if the property is get through the BarcodeManager interface.

Returns

public boolean isReadOnly ()

Added in revision 29

Returns whether a Property is read only or not. This method is meaningless if the property is get through the BarcodeManager interface.

Returns
  • boolean value representing whether the Property is read only or not.

public boolean isSupported ()

Added in revision 1

Returns whether a Property is supported or not.

Returns
  • boolean value representing whether the Property is supported or not.

public int load (PropertyGetter from)

Added in revision 1

Loads the property with the current set values, through a PropertyGetter.

Parameters
from The PropertyGetter called to synchronize the current values.
Returns
  • int SUCCESS in case of success, otherwise a possible error code, matching one of the ConfigException error constants.
Throws
ConfigException in case of error, when exceptions are enabled through the ErrorManager singleton.

public static int loadlist (PropertyGetter from, ArrayList list)

Added in revision 1

Loads and sync the current set values into all the Properties contained in the passed list.

Parameters
from The PropertyGetter used to sync all the active values associated to the Properties.
list The ArrayList containing the Properties to be loaded.
Returns
  • int SUCCESS in case of success, otherwise a possible error code, matching one of the ConfigException error constants.
Throws
ConfigException in case of error, when exceptions are enabled through the ErrorManager singleton.

public int set (T value)

Added in revision 1

Sets the value of the property, it is not applied to the device. To apply the value of the property to the device and make it persistent the method commit() of ConfigurationManager must be called.

Parameters
value The value to be set.
Returns
  • int SUCCESS in case of success otherwise a possible error code, matching one of the ConfigException error constants. In case of error, when exceptions are enabled through the ErrorManager singleton, an exception is thrown.
Throws
ConfigException ACCESS_VIOLATION_ERROR if the property is read-only.
ConfigException SUPPORT_ERROR if the property is not supported.
ConfigException VALUE_ERROR if the value is not an allowed value, e.g: an out of range integer or char value or a profiled enumerated value.

public int setToDefault ()

Added in revision 34

Resets to the default value the property. To apply the value of the property to the device and make it persistent the method commit() of ConfigurationManager must be called.

Returns
  • int SUCCESS in case of success otherwise a possible error code, matching one of the ConfigException error constants.
Throws
ConfigException ACCESS_VIOLATION_ERROR if the property is read-only.
ConfigException SUPPORT_ERROR if the property is not supported.

public int store (PropertyEditor to)

Added in revision 1

Stores the Property value, applying them. The change is not persistent across system reboot. See the BarcodeManager persistance note.

Parameters
to The PropertyEditor in charge of applying the desired values.
Returns
  • int SUCCESS in case of success, otherwise a possible error code, matching one of the ConfigException error constants.
Throws
ConfigException in case of error, when exceptions are enabled through the ErrorManager singleton.

public static int storelist (PropertyEditor to, ArrayList list)

Added in revision 1

Stores and applies all the Properties and their current associated values. The change is not persistent across system reboot. See the BarcodeManager persistance note.

Parameters
to The PropertyEditor used to store all the values.
list The ArrayList containing the Properties.
Returns
  • int SUCCESS in case of success, otherwise a possible error code, matching one of the ConfigException error constants.
Throws
ConfigException in case of error, when exceptions are enabled through the ErrorManager singleton.